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 15594 Details for
Bug 77422
[1.5][compiler] ArrayIndexOutOfBoundsException with vararg constructor of generic superclass
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed regression test
org.eclipse.jdt.core.tests.model_patch.txt (text/plain), 2.20 KB, created by
Jerome Lanneluc
on 2004-11-03 07:02:45 EST
(
hide
)
Description:
Proposed regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2004-11-03 07:02:45 EST
Size:
2.20 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java,v >retrieving revision 1.22 >diff -u -r1.22 CompilationUnitTests.java >--- src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java 26 Oct 2004 15:13:52 -0000 1.22 >+++ src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java 3 Nov 2004 11:45:34 -0000 >@@ -53,6 +53,8 @@ > " }\n" + > " void testIsVarArgs(String s, Object ... args) {\n" + > " }\n" + >+ " X(String... s) {\n" + >+ " }\n" + > "}\n" + > "/** @deprecated\n */" + > "interface I {\n" + >@@ -316,7 +318,15 @@ > IMethod method = type.getMethod("testIsVarArgs", new String[]{"QString;", "[QObject;"}); > assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags())); > } >- >+/** >+ * Ensures that a constructor has the correct AccVarargs flag set. >+ * (regression test for bug 77422 [1.5] ArrayIndexOutOfBoundsException with vararg constructor of generic superclass) >+ */ >+public void testGetMethod3() throws JavaModelException { >+ IType type = this.cu.getType("X"); >+ IMethod method = type.getMethod("X", new String[]{"[QString;"}); >+ assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags())); >+} > /** > * Ensures that correct number of methods with the correct names and modifiers > * exist in a type. >@@ -324,8 +334,8 @@ > public void testGetMethods() throws JavaModelException { > IType type = this.cu.getType("X"); > IMethod[] methods= type.getMethods(); >- String[] methodNames = new String[] {"foo", "bar", "fred", "testIsVarArgs"}; >- String[] flags = new String[] {"public", "protected static", "private", ""}; >+ String[] methodNames = new String[] {"foo", "bar", "fred", "testIsVarArgs", "X"}; >+ String[] flags = new String[] {"public", "protected static", "private", "", ""}; > assertEquals("Wrong number of methods returned", methodNames.length, methods.length); > for (int i = 0; i < methods.length; i++) { > assertEquals("Incorrect name for the " + i + " method", methodNames[i], methods[i].getElementName());
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 77422
:
15530
|
15593
| 15594