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 85918 Details for
Bug 214002
[dom] NPE in MethodBinding.getParameterAnnotations()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test case
bug214002.txt (text/plain), 1.77 KB, created by
Walter Harley
on 2007-12-28 19:39:22 EST
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2007-12-28 19:39:22 EST
Size:
1.77 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java,v >retrieving revision 1.4 >diff -u -r1.4 ASTConverterBugsTest.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java 20 Dec 2007 15:18:02 -0000 1.4 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java 29 Dec 2007 00:38:22 -0000 >@@ -446,4 +446,33 @@ > ); > } > >+/** >+ * @bug 214002: [dom] IMethodBinding.getParameterAnnotations throws NPE for non-annotated parameters >+ * @test Ensures that all parameter annotations of a the method binding are correctly returned, including >+ * parameters with no annotations. >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=214002" >+ */ >+public void testBug214002() throws CoreException, IOException { >+ workingCopies = new ICompilationUnit[1]; >+ workingCopies[0] = getWorkingCopy("/Converter15/src/Test.java", >+ "public class Test {\n" + >+ " void m(String str, @Bar @Foo Object obj, @Annot int x) {}\n" + >+ "}\n" + >+ "@interface Foo {}\n" + >+ "@interface Bar {}\n" + >+ "@interface Annot {}\n" >+ ); >+ >+ CompilationUnit unit = (CompilationUnit) runConversion(workingCopies[0], true, false, true); >+ MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0); >+ checkParameterAnnotations(methodDeclaration+" has invalid parameter annotations!", >+ "----- param 1-----\n" + >+ "----- param 2-----\n" + >+ "@LTest~Bar;\n" + >+ "@LTest~Foo;\n" + >+ "----- param 3-----\n" + >+ "@LTest~Annot;\n", >+ methodDeclaration.resolveBinding() >+ ); >+} > }
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 214002
:
85918
|
85920
|
85949