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 37325 Details for
Bug 131519
JDK with attached source unnavigable.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch and regression test
131519.txt (text/plain), 3.01 KB, created by
Jerome Lanneluc
on 2006-03-30 11:04:02 EST
(
hide
)
Description:
Proposed patch and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2006-03-30 11:04:02 EST
Size:
3.01 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java,v >retrieving revision 1.49 >diff -u -r1.49 ResolveTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 29 Mar 2006 04:03:07 -0000 1.49 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 30 Mar 2006 16:03:38 -0000 >@@ -10,8 +10,10 @@ > *******************************************************************************/ > package org.eclipse.jdt.core.tests.model; > >+import java.io.IOException; >+ >+import org.eclipse.core.runtime.CoreException; > import org.eclipse.jdt.core.*; >-import org.eclipse.jdt.core.ICompilationUnit; > > import junit.framework.*; > >@@ -2236,4 +2238,33 @@ > elements > ); > } >+ >+/* >+ * Ensure that resolving a binary synthetic contructor call in a generic class returns the member type >+ * (regression test for bug 131519 JDK with attached source unnavigable.) >+ */ >+public void test101() throws CoreException,IOException { >+ try { >+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] {"JCL15_LIB"}, "", "1.5"); >+ String source = >+ "public class X<E> {\n" + >+ " private class Y {\n" + >+ " }\n" + >+ " Object foo() {\n" + >+ " return new Y();\n" + >+ " }\n" + >+ "}"; >+ addLibrary(project, "lib15.jar", "lib15.zip", new String[] {"X.java", source}, "1.5"); >+ IClassFile classFile = getClassFile("P", "/P/lib15.jar", "", "X.class"); >+ int start = source.indexOf("Y()"); >+ int end = source.indexOf("();"); >+ IJavaElement[] elements = classFile.codeSelect(start, end-start); >+ assertElementsEqual( >+ "Unexpected selection", >+ "Y [in X$Y.class [in <default> [in lib15.jar [in P]]]]", >+ elements); >+ } finally { >+ deleteProject("P"); >+ } >+} > } >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/SelectionRequestor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SelectionRequestor.java,v >retrieving revision 1.66 >diff -u -r1.66 SelectionRequestor.java >--- model/org/eclipse/jdt/internal/core/SelectionRequestor.java 29 Mar 2006 03:08:48 -0000 1.66 >+++ model/org/eclipse/jdt/internal/core/SelectionRequestor.java 30 Mar 2006 16:03:40 -0000 >@@ -429,7 +429,7 @@ > > parameterPackageNames[0] = declaringDeclaringType.getPackageFragment().getElementName().toCharArray(); > parameterTypeNames[0] = declaringDeclaringType.getTypeQualifiedName().toCharArray(); >- parameterSignatures[0] = enclosingDeclaringTypeSignature; >+ parameterSignatures[0] = Signature.getTypeErasure(enclosingDeclaringTypeSignature); > } > > acceptBinaryMethod(type, selector, parameterPackageNames, parameterTypeNames, parameterSignatures, uniqueKey, isConstructor);
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 131519
: 37325