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 119419 Details for
Bug 257384
AIOOBE during problem reporting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch with testcase
patch.txt (text/plain), 3.03 KB, created by
Kent Johnson
on 2008-12-03 14:49:19 EST
(
hide
)
Description:
Proposed patch with testcase
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2008-12-03 14:49:19 EST
Size:
3.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java,v >retrieving revision 1.16 >diff -u -r1.16 ProblemTypeAndMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 18 Nov 2008 22:57:01 -0000 1.16 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 3 Dec 2008 19:48:47 -0000 >@@ -4916,4 +4916,48 @@ > "Zork cannot be resolved to a type\n" + > "----------\n"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=257384 >+public void test096() { >+ this.runNegativeTest( >+ new String[] { >+ "p2/B.java", // ================= >+ "package p2;\n" + >+ "import p1.A;\n" + >+ "public abstract class B {\n" + >+ " public static A foo() {}\n" + >+ "}\n", >+ "p3/C.java", // ================= >+ "package p3;\n" + >+ "import p1.A;\n" + >+ "public abstract class C extends p2.B {\n" + >+ " public static A foo() {}\n" + >+ "}\n", >+ "p/D.java", // ================= >+ "package p;\n" + >+ "public class D extends p3.C {}" >+ }, >+ "----------\n" + >+ "1. ERROR in p2\\B.java (at line 2)\n" + >+ " import p1.A;\n" + >+ " ^^\n" + >+ "The import p1 cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in p2\\B.java (at line 4)\n" + >+ " public static A foo() {}\n" + >+ " ^\n" + >+ "A cannot be resolved to a type\n" + >+ "----------\n" + >+ "----------\n" + >+ "1. ERROR in p3\\C.java (at line 2)\n" + >+ " import p1.A;\n" + >+ " ^^\n" + >+ "The import p1 cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in p3\\C.java (at line 4)\n" + >+ " public static A foo() {}\n" + >+ " ^\n" + >+ "A cannot be resolved to a type\n" + >+ "----------\n" >+ ); >+} > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java,v >retrieving revision 1.99 >diff -u -r1.99 MethodVerifier.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 20 Nov 2008 16:32:29 -0000 1.99 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 3 Dec 2008 19:48:50 -0000 >@@ -363,6 +363,7 @@ > for (int i = 0; i < length; i++) > if (methods[i].isAbstract()) > abstractMethods[index++] = methods[i]; >+ if (index == 0) return; // can happen with methods that contain 'equal' Missing Types, see bug 257384 > if (index < abstractMethods.length) > System.arraycopy(abstractMethods, 0, abstractMethods = new MethodBinding[index], 0, index); > checkConcreteInheritedMethod(concreteMethod, abstractMethods);
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 257384
: 119419