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 83432 Details for
Bug 210404
Method parameters are not recovered when followed by an annotation with a syntax error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug210404_001.txt (text/plain), 2.87 KB, created by
David Audel
on 2007-11-21 10:02:52 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2007-11-21 10:02:52 EST
Size:
2.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java,v >retrieving revision 1.13 >diff -u -r1.13 AnnotationDietRecoveryTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java 21 Nov 2007 14:11:22 -0000 1.13 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationDietRecoveryTest.java 21 Nov 2007 15:00:12 -0000 >@@ -628,4 +628,47 @@ > expectedCompletionDietUnitToString, > testName); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=210404 >+public void test0012() { >+ >+ String s = >+ "package a; \n" >+ + "public class X { \n" >+ + " void foo(int var1, @Annot(at1=zzz, at2=@Annot(at3=zzz, at4)) int var2 { \n" >+ + " } \n" >+ + "} \n"; >+ >+ String expectedDietUnitToString = >+ "package a;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo(int var1) {\n" + >+ " }\n" + >+ "}\n"; >+ >+ String expectedDietPlusBodyUnitToString = >+ "package a;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " }\n" + >+ " void foo(int var1) {\n" + >+ " }\n" + >+ "}\n"; >+ >+ String expectedFullUnitToString = expectedDietUnitToString; >+ >+ String expectedCompletionDietUnitToString = >+ expectedDietUnitToString; >+ >+ String testName = "<generic type recovery>"; >+ checkParse( >+ s.toCharArray(), >+ expectedDietUnitToString, >+ expectedDietPlusBodyUnitToString, >+ expectedFullUnitToString, >+ expectedCompletionDietUnitToString, >+ testName); >+} > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java,v >retrieving revision 1.60 >diff -u -r1.60 RecoveredMethod.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java 28 Sep 2007 08:39:54 -0000 1.60 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java 21 Nov 2007 15:00:15 -0000 >@@ -371,7 +371,7 @@ > > // remove unfinished annotation nodes > MemberValuePair[] memberValuePairs = null; >- if (argLength > 0 && parser.astStack[parser.astPtr] instanceof MemberValuePair) { >+ while (argLength > 0 && parser.astStack[parser.astPtr] instanceof MemberValuePair) { > System.arraycopy(parser.astStack, argStart, memberValuePairs = new MemberValuePair[argLength], 0, argLength); > parser.astLengthPtr--; > parser.astPtr -= argLength;
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 210404
: 83432