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 22128 Details for
Bug 93377
[1.5][compiler] Multiple auto-build failures when using generics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Batch compiler test case that covers more of the original
patch_org.eclipse.jdt.core.tests.compiler_93377_04.txt (text/plain), 5.39 KB, created by
Maxime Daniel
on 2005-06-01 05:27:29 EDT
(
hide
)
Description:
Batch compiler test case that covers more of the original
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2005-06-01 05:27:29 EDT
Size:
5.39 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.17 >diff -u -r1.17 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Jun 2005 09:06:31 -0000 1.17 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Jun 2005 09:24:49 -0000 >@@ -1562,6 +1562,148 @@ > "incorrect classpath: dummy\n", > false); > } >+// Extraneous auto-build error message - https://bugs.eclipse.org/bugs/show_bug.cgi?id=93377 >+// More complex test case than _test30 >+public void _test032(){ >+ this.runConformTest( >+ new String[] { >+ "p/X.java", >+ "package p;\n" + >+ "import java.io.Serializable;\n" + >+ "public interface X<T extends X<T, U, V>, \n" + >+ " U extends X.XX<T, V>, \n" + >+ " V extends X.XY> {\n" + >+ " public interface XX<TT extends X<TT, ?, UU>, \n" + >+ " UU extends X.XY> \n" + >+ " extends Serializable {\n" + >+ " }\n" + >+ " public interface XY extends Serializable {\n" + >+ " }\n" + >+ "}\n", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p/X.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -proceedOnError -referenceInfo" >+ + " -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ true); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "package p;\n" + >+ "import java.util.*;\n" + >+ "import p.X.*;\n" + >+ "public class Y<T extends X<T, U, V>, \n" + >+ " U extends X.XX<T, V>, \n" + >+ " V extends X.XY> {\n" + >+ " private final Map<U, V> m1 = new HashMap<U, V>();\n" + >+ " private final Map<U, T> m2 = new HashMap<U, T>();\n" + >+ " private final Z m3;\n" + >+ "\n" + >+ " public Y(final Z p1) {\n" + >+ " this.m3 = p1;\n" + >+ " }\n" + >+ "\n" + >+ " public void foo1(final U p1, final V p2, final T p3) {\n" + >+ " m1.put(p1, p2);\n" + >+ " m2.put(p1, p3);\n" + >+ " m3.foo2(p1, p2);\n" + >+ " }\n" + >+ "\n" + >+ " public void foo3(final U p1) {\n" + >+ " assert m1.containsKey(p1);\n" + >+ " m1.remove(p1);\n" + >+ " m2.remove(p1);\n" + >+ " m3.foo2(p1, null);\n" + >+ " }\n" + >+ "\n" + >+ " public Collection<T> foo4() {\n" + >+ " return Collections.unmodifiableCollection(m2.values());\n" + >+ " }\n" + >+ "\n" + >+ " public void foo5(final Map<XX<?, ?>, XY> p1) {\n" + >+ " p1.putAll(m1);\n" + >+ " }\n" + >+ "\n" + >+ " public void foo6(final Map<XX<?, ?>, XY> p1) {\n" + >+ " m1.keySet().retainAll(p1.keySet());\n" + >+ " m2.keySet().retainAll(p1.keySet());\n" + >+ " }\n" + >+ "}\n", >+ "p/Z.java", >+ "package p;\n" + >+ "\n" + >+ "import java.util.*;\n" + >+ "\n" + >+ "import p.X.*;\n" + >+ "\n" + >+ "public class Z {\n" + >+ " private final Map<Class<? extends X>, \n" + >+ " Y<?, ? extends XX<?, ?>, ? extends XY>> \n" + >+ " m1 = new HashMap<Class<? extends X>, \n" + >+ " Y<?, ? extends XX<?, ?>, ? extends XY>>();\n" + >+ "\n" + >+ " private Map<X.XX<?, XY>, \n" + >+ " X.XY> \n" + >+ " m2 = new HashMap<X.XX<?, XY>, \n" + >+ " X.XY>();\n" + >+ "\n" + >+ " public <T extends X<T, U, V>, \n" + >+ " U extends X.XX<T, V>, \n" + >+ " V extends X.XY> \n" + >+ " Y<T, U, V> foo1(final Class<T> p1) {\n" + >+ " Y l1 = m1.get(p1);\n" + >+ " if (l1 == null) {\n" + >+ " l1 = new Y<T, U, V>(this);\n" + >+ " m1.put(p1, l1);\n" + >+ " }\n" + >+ " return l1;\n" + >+ " }\n" + >+ "\n" + >+ " public <TT extends X.XX<?, UU>, \n" + >+ " UU extends X.XY> \n" + >+ " void foo2(final TT p1, final UU p2) {\n" + >+ " m2.put((XX<?, XY>) p1, p2);\n" + >+ " }\n" + >+ "\n" + >+ " public Map<XX<?, ?>, XY> foo3() {\n" + >+ " final Map<XX<?, ?>, \n" + >+ " XY> l1 = new HashMap<XX<?, ?>, \n" + >+ " XY>();\n" + >+ " for (final Y<?, \n" + >+ " ? extends XX<?, ?>, \n" + >+ " ? extends XY> \n" + >+ " i : m1.values()) {\n" + >+ " i.foo5(l1);\n" + >+ " }\n" + >+ " return l1;\n" + >+ " }\n" + >+ "\n" + >+ " public void foo4(final Object p1, final Map<XX<?, ?>, \n" + >+ " XY> p2) {\n" + >+ " for (final Y<?, \n" + >+ " ? extends XX<?, ?>, \n" + >+ " ? extends XY> i : m1.values()) {\n" + >+ " i.foo6(p2);\n" + >+ " }\n" + >+ " for (final Map.Entry<XX<?, ?>, \n" + >+ " XY> i : p2.entrySet()) {\n" + >+ " final XX<?, XY> l1 = (XX<?, XY>) i.getKey();\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p/Y.java\"" >+ + " \"" + OUTPUT_DIR + File.separator + "p/Z.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -cp \"" + OUTPUT_DIR + File.separator + "\"" >+ + " -proceedOnError -referenceInfo" >+ + " -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ false); >+} > public static Class testClass() { > return BatchCompilerTest.class; > }
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 93377
:
20572
|
22053
|
22128
|
22412