Bug 89312 - API: BindingKey should probably be final
Summary: API: BindingKey should probably be final
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-28 19:22 EST by Jim des Rivieres CLA
Modified: 2005-03-30 19:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2005-03-28 19:22:07 EST
The new API class BindingKey does not look like it should be subclassed.
If that is indeed the case, it should be marked final.

Here's a patch to the spec:

Index: BindingKey.java
===================================================================
RCS 
file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BindingKey.
java,v
retrieving revision 1.8
diff -u -r1.8 BindingKey.java
--- BindingKey.java	24 Mar 2005 09:46:11 -0000	1.8
+++ BindingKey.java	29 Mar 2005 00:18:00 -0000
@@ -15,11 +15,14 @@
 
 /**
  * Utility class to decode or create a binding key.
+ * <p>
+ * This class is not intended to be subclassed by clients.
+ * </p>
  * 
  * @see org.eclipse.jdt.core.dom.IBinding#getKey()
  * @since 3.1
  */
-public class BindingKey {
+public final class BindingKey {
 	
 	private String key;
Comment 1 Jerome Lanneluc CLA 2005-03-29 02:58:45 EST
Thanks Jim. I applied your patch and released it.
Comment 2 Olivier Thomann CLA 2005-03-30 19:01:43 EST
Verified in 20050330-0500