Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177882 Details for
Bug 258905
making java.lang.AssertionError accessible thru resolveWellKnownType method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_258905.txt (text/plain), 5.80 KB, created by
Olivier Thomann
on 2010-08-31 16:07:41 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-08-31 16:07:41 EDT
Size:
5.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/core/dom/AST.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java,v >retrieving revision 1.166 >diff -u -r1.166 AST.java >--- dom/org/eclipse/jdt/core/dom/AST.java 21 Feb 2010 03:35:50 -0000 1.166 >+++ dom/org/eclipse/jdt/core/dom/AST.java 31 Aug 2010 20:07:03 -0000 >@@ -1132,6 +1132,7 @@ > * <li><code>"long"</code></li> > * <li><code>"short"</code></li> > * <li><code>"void"</code></li> >+ * <li><code>"java.lang.AssertionError"</code> (since 3.7)</li> > * <li><code>"java.lang.Boolean"</code> (since 3.1)</li> > * <li><code>"java.lang.Byte"</code> (since 3.1)</li> > * <li><code>"java.lang.Character"</code> (since 3.1)</li> >Index: dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java,v >retrieving revision 1.169 >diff -u -r1.169 DefaultBindingResolver.java >--- dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java 21 Feb 2010 03:35:51 -0000 1.169 >+++ dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java 31 Aug 2010 20:07:03 -0000 >@@ -1718,6 +1718,8 @@ > typeBinding = this.getTypeBinding(this.scope.getType(TypeConstants.JAVA_LANG_SHORT, 3)); > } else if ("java.lang.Void".equals(name)) {//$NON-NLS-1$ > typeBinding = this.getTypeBinding(this.scope.getType(TypeConstants.JAVA_LANG_VOID, 3)); >+ } else if ("java.lang.AssertionError".equals(name)) { //$NON-NLS-1$ >+ typeBinding = this.getTypeBinding(this.scope.getType(TypeConstants.JAVA_LANG_ASSERTIONERROR, 3)); > } > } catch (AbortCompilation e) { > // ignore missing types >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java,v >retrieving revision 1.174 >diff -u -r1.174 ASTConverterTestAST3_2.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 17 Mar 2010 16:10:01 -0000 1.174 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 31 Aug 2010 20:07:04 -0000 >@@ -122,7 +122,7 @@ > static { > // TESTS_NAMES = new String[] {"test0602"}; > // TESTS_RANGE = new int[] { 713, -1 }; >-// TESTS_NUMBERS = new int[] { 653 }; >+ TESTS_NUMBERS = new int[] { 719 }; > } > public static Test suite() { > return buildModelTestSuite(ASTConverterTestAST3_2.class); >@@ -10497,4 +10497,65 @@ > } > } > } >+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=258905 >+ public void test0719() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); >+ String contents = >+ "public class X {}"; >+ >+ CompilationUnit unit = (CompilationUnit) buildAST( >+ contents, >+ workingCopy, >+ true); >+ final AST currentAst = unit.getAST(); >+ // well known bindings >+ String[] wkbs = { >+ "byte", "char", "short", "int", "long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ >+ "boolean", "float", "double", "void", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ >+ "java.lang.AssertionError", //$NON-NLS-1$ >+ "java.lang.Class", //$NON-NLS-1$ >+ "java.lang.Cloneable", //$NON-NLS-1$ >+ "java.lang.Error", //$NON-NLS-1$ >+ "java.lang.Exception", //$NON-NLS-1$ >+ "java.lang.Object", //$NON-NLS-1$ >+ "java.lang.RuntimeException", //$NON-NLS-1$ >+ "java.lang.String", //$NON-NLS-1$ >+ "java.lang.StringBuffer", //$NON-NLS-1$ >+ "java.lang.Throwable", //$NON-NLS-1$ >+ "java.io.Serializable", //$NON-NLS-1$ >+ "java.lang.Boolean", //$NON-NLS-1$ >+ "java.lang.Byte", //$NON-NLS-1$ >+ "java.lang.Character", //$NON-NLS-1$ >+ "java.lang.Double", //$NON-NLS-1$ >+ "java.lang.Float", //$NON-NLS-1$ >+ "java.lang.Integer", //$NON-NLS-1$ >+ "java.lang.Long", //$NON-NLS-1$ >+ "java.lang.Short", //$NON-NLS-1$ >+ "java.lang.Void", //$NON-NLS-1$ >+ }; >+ >+ // no-so-well-known bindings >+ String[] nwkbs = { >+ "verylong", //$NON-NLS-1$ >+ "java.lang.Math", //$NON-NLS-1$ >+ "com.example.MyCode", //$NON-NLS-1$ >+ }; >+ >+ // none of the well known bindings resolve in a plain AST >+ for (int i = 0; i<wkbs.length; i++) { >+ assertNotNull("No binding for " + wkbs[i], currentAst.resolveWellKnownType(wkbs[i])); >+ } >+ >+ // none of the no so well known bindings resolve either >+ for (int i = 0; i<nwkbs.length; i++) { >+ assertNull("Binding for " + nwkbs[i], currentAst.resolveWellKnownType(nwkbs[i])); >+ } >+ } finally { >+ if (workingCopy != null) { >+ workingCopy.discardWorkingCopy(); >+ } >+ } >+ } > } >\ No newline at end of file >Index: src/org/eclipse/jdt/core/tests/dom/ASTTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java,v >retrieving revision 1.69 >diff -u -r1.69 ASTTest.java >--- src/org/eclipse/jdt/core/tests/dom/ASTTest.java 19 Jul 2010 16:58:02 -0000 1.69 >+++ src/org/eclipse/jdt/core/tests/dom/ASTTest.java 31 Aug 2010 20:07:04 -0000 >@@ -1337,6 +1337,7 @@ > String[] wkbs = { > "byte", "char", "short", "int", "long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ > "boolean", "float", "double", "void", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ >+ "java.lang.AssertionError", //$NON-NLS-1$ > "java.lang.Class", //$NON-NLS-1$ > "java.lang.Cloneable", //$NON-NLS-1$ > "java.lang.Error", //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258905
:
120547
| 177882