@@ -50,11 +50,12 @@ private Bindings() {
5050 // No instance
5151 }
5252
53- private static final boolean CHECK_CORE_BINDING_IS_EQUAL_TO ;
54- static {
55- String value = Platform .getDebugOption ("org.eclipse.jdt.ui/debug/checkCoreBindingIsEqualTo" ); //$NON-NLS-1$
56- CHECK_CORE_BINDING_IS_EQUAL_TO = value != null && value .equalsIgnoreCase ("true" ); //$NON-NLS-1$
57- }
53+ // FIXME: commented-out code. To be removed after St. Olaf merge.
54+ // private static final boolean CHECK_CORE_BINDING_IS_EQUAL_TO;
55+ // static {
56+ // String value= Platform.getDebugOption("org.eclipse.jdt.ui/debug/checkCoreBindingIsEqualTo"); //$NON-NLS-1$
57+ // CHECK_CORE_BINDING_IS_EQUAL_TO= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
58+ // }
5859// private static final boolean CHECK_CORE_BINDING_GET_JAVA_ELEMENT;
5960// static {
6061// String value= Platform.getDebugOption("org.eclipse.jdt.ui/debug/checkCoreBindingGetJavaElement"); //$NON-NLS-1$
@@ -86,35 +87,9 @@ public static boolean equals(IBinding b1, IBinding b2) {
8687 isEqualTo = bb1Name .equals (bb2 .getBinaryName ());
8788 }
8889 }
89- if (CHECK_CORE_BINDING_IS_EQUAL_TO ) {
90- boolean originalEquals = originalEquals (b1 , b2 );
91- if (originalEquals != isEqualTo ) {
92- //String message= "Unexpected difference between Bindings.equals(..) and IBinding#isEqualTo(..)"; //$NON-NLS-1$
93- String detail = "\n b1 == " + b1 .getKey () + ",\n b2 == " + (b2 == null ? "null binding" : b2 .getKey ()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
94- try {
95- detail += "\n b1.getJavaElement() == " + b1 .getJavaElement () + ",\n b2.getJavaElement() == " + (b2 == null ? "null binding" : b2 .getJavaElement ().toString ()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
96- } catch (Exception e ) {
97- detail += "\n Exception in getJavaElement():\n " + e ; //$NON-NLS-1$
98- }
99- //JavaPlugin.logRepeatedMessage(message, detail);
100- }
101- }
10290 return isEqualTo ;
10391 }
10492
105- private static boolean originalEquals (IBinding b1 , IBinding b2 ) {
106- Assert .isNotNull (b1 );
107- if (b1 == b2 )
108- return true ;
109- if (b2 == null )
110- return false ;
111- String k1 = b1 .getKey ();
112- String k2 = b2 .getKey ();
113- if (k1 == null || k2 == null )
114- return false ;
115- return k1 .equals (k2 );
116- }
117-
11893 /**
11994 * Checks if the two arrays of bindings have the same length and
12095 * their elements are equal. Uses
0 commit comments