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 33892 Details for
Bug 125807
NPE in ResolvedMemberValuePair#init()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_125807_tests.txt (text/plain), 2.22 KB, created by
Olivier Thomann
on 2006-01-31 16:50:45 EST
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-01-31 16:50:45 EST
Size:
2.22 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.184 >diff -u -r1.184 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 30 Jan 2006 19:02:09 -0000 1.184 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 31 Jan 2006 21:52:17 -0000 >@@ -6280,4 +6280,36 @@ > assertNotNull("Should not be null", annotations); > assertEquals("Should be empty", 0, annotations.length); > } >+ >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=125807 >+ */ >+ public void test0208() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); >+ String contents = >+ "@Override(x= 1)\r\n" + >+ "public class X { }"; >+ ASTNode node = buildAST( >+ contents, >+ this.workingCopy, >+ false); >+ assertNotNull("No node", node); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit compilationUnit = (CompilationUnit) node; >+ String problems = >+ "The annotation @Override is disallowed for this location\n" + >+ "The attribute x is undefined for the annotation type Override"; >+ assertProblemsSize(compilationUnit, 2, problems); >+ node = getASTNode(compilationUnit, 0); >+ assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); >+ TypeDeclaration typeDeclaration = (TypeDeclaration) node; >+ List modifiers = typeDeclaration.modifiers(); >+ assertEquals("Wrong size", 2, modifiers.size()); >+ assertTrue("Wrong type", modifiers.get(0) instanceof NormalAnnotation); >+ NormalAnnotation normalAnnotation = (NormalAnnotation) modifiers.get(0); >+ IResolvedAnnotation resolvedAnnotation = normalAnnotation.resolveAnnotation(); >+ IResolvedMemberValuePair[] pairs = resolvedAnnotation.getDeclaredMemberValuePairs(); >+ assertEquals("Wrong size", 1, pairs.length); >+ assertNotNull("Should not be null", pairs[0].getValue()); >+ } > } >\ No newline at end of file
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 125807
:
33890
| 33892