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 248939 Details for
Bug 431911
Reconsider test tweaks for JRE 8 compatibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
patch.patch (text/plain), 30.03 KB, created by
shankha banerjee
on 2014-11-26 01:48:56 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
shankha banerjee
Created:
2014-11-26 01:48:56 EST
Size:
30.03 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java >index d039720..99e5c2d 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java >@@ -76,155 +76,6 @@ import java.util.regex.Pattern; > > public abstract class AbstractRegressionTest extends AbstractCompilerTest implements StopableTestCase { > >- // for compiling against JRE 8: >- static final boolean IS_JRE_8; >- static final String COMPARATOR_IMPL_JRE8; >- static final String COMPARATOR_RAW_IMPL_JRE8; >- static final String COLLECTION_IMPL_JRE8; >- static final String COLLECTION_RAW_IMPL_JRE8; >- static final String LIST_IMPL_JRE8; >- static final String COLLECTION_AND_LIST_IMPL_JRE8; >- static final String COLLECTION_AND_LIST_RAW_IMPL_JRE8; >- static final String LIST_RAW_IMPL_JRE8; >- static final String ITERABLE_IMPL_JRE8; >- static final String ITERABLE_RAW_IMPL_JRE8; >- static final String ITERATOR_IMPL_JRE8; >- static final String ITERATOR_RAW_IMPL_JRE8; >- static final String MAP_IMPL_JRE8; >- static final String MAP_RAW_IMPL_JRE8; >- >- static { >- String javaVersion = System.getProperty("java.specification.version"); >- IS_JRE_8 = "1.8".equals(javaVersion); >- if (IS_JRE_8) { // TODO(stephan) accommodate future versions ... >- COMPARATOR_IMPL_JRE8 = // replace '*' with T, '%' with U, $ with S >- " public java.util.Comparator<*> reverseOrder() { return null;}\n" + >- " public java.util.Comparator<*> reversed() { return null;}\n" + >- " public java.util.Comparator<*> thenComparing(java.util.Comparator<? super *> other) { return null;}\n" + >- " public <%> java.util.Comparator<*> thenComparing(java.util.function.Function<? super *, ? extends %> keyExtractor, java.util.Comparator<? super %> keyComparator) { return null;}\n" + >- " public <% extends java.lang.Comparable<? super %>> java.util.Comparator<*> thenComparing(java.util.function.Function<? super *, ? extends %> keyExtractor) { return null;}\n" + >- " public java.util.Comparator<*> thenComparingInt(java.util.function.ToIntFunction<? super *> keyExtractor) { return null;}\n" + >- " public java.util.Comparator<*> thenComparingLong(java.util.function.ToLongFunction<? super *> keyExtractor) { return null;}\n" + >- " public java.util.Comparator<*> thenComparingDouble(java.util.function.ToDoubleFunction<? super *> keyExtractor) { return null;}\n"; >- COMPARATOR_RAW_IMPL_JRE8 = >- " public java.util.Comparator reverseOrder() { return null;}\n" + >- " public java.util.Comparator reversed() { return null;}\n" + >- " public java.util.Comparator thenComparing(java.util.Comparator other) { return null;}\n" + >- " public java.util.Comparator thenComparing(java.util.function.Function keyExtractor, java.util.Comparator keyComparator) { return null;}\n" + >- " public java.util.Comparator thenComparing(java.util.function.Function keyExtractor) { return null;}\n" + >- " public java.util.Comparator thenComparingInt(java.util.function.ToIntFunction keyExtractor) { return null;}\n" + >- " public java.util.Comparator thenComparingLong(java.util.function.ToLongFunction keyExtractor) { return null;}\n" + >- " public java.util.Comparator thenComparingDouble(java.util.function.ToDoubleFunction keyExtractor) { return null;}\n"; >- COLLECTION_IMPL_JRE8 = >- " public boolean removeAll(java.util.function.Predicate<? super *> filter) { return false;}\n" + >- " public boolean removeIf(java.util.function.Predicate<? super *> filter) { return false;}\n" + >- " public java.util.stream.Stream<*> stream() { return null;}\n" + >- " public java.util.stream.Stream<*> parallelStream() { return null;}\n"; >- COLLECTION_AND_LIST_IMPL_JRE8 = >- " public boolean removeAll(java.util.function.Predicate<? super *> filter) { return false;}\n" + >- " public boolean removeIf(java.util.function.Predicate<? super *> filter) { return false;}\n" + >- " public java.util.stream.Stream<*> stream() { return null;}\n" + >- " public java.util.stream.Stream<*> parallelStream() { return null;}\n" + >- " public void sort(java.util.Comparator<? super *> comparator) {}\n" + >- " public void parallelSort(java.util.Comparator<? super *> comparator) {}\n" + >- " public void replaceAll(java.util.function.UnaryOperator<*> operator) {}\n"; >- COLLECTION_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") boolean removeAll(java.util.function.Predicate filter) { return false;}\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean removeIf(java.util.function.Predicate filter) { return false;}\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream stream() { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream parallelStream() { return null;}\n"; >- LIST_IMPL_JRE8 = // replace '*' with your concrete type argument >- " public void sort(java.util.Comparator<? super *> comparator) {}\n" + >- " public void parallelSort(java.util.Comparator<? super *> comparator) {}\n" + >- " public void replaceAll(java.util.function.UnaryOperator<*> operator) {}\n"; >- LIST_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") void sort(java.util.Comparator comparator) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void parallelSort(java.util.Comparator comparator) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.UnaryOperator operator) {}\n"; >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") boolean removeAll(java.util.function.Predicate filter) { return false;}\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean removeIf(java.util.function.Predicate filter) { return false;}\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream stream() { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream parallelStream() { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") void sort(java.util.Comparator comparator) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void parallelSort(java.util.Comparator comparator) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.UnaryOperator operator) {}\n"; >- ITERABLE_IMPL_JRE8 = // replace '*' with your concrete type argument >- " public void forEach(java.util.function.Consumer<? super *> block){}\n" + >- " public void forEachRemaining(java.util.function.Consumer<? super *> action) {}\n" + >- " public java.util.Spliterator<*> spliterator() {return null;}\n"; >- ITERABLE_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Consumer action) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void forEachRemaining(java.util.function.Consumer action) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.Spliterator spliterator() {return null;}\n"; >- ITERATOR_IMPL_JRE8 = // replace '*' with your concrete type argument >- "public void forEach(java.util.function.Consumer<? super *> action) {}\n" + >- "public void forEachRemaining(java.util.function.Consumer<? super *> action) {}\n"; >- ITERATOR_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Consumer block) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void forEachRemaining(java.util.function.Consumer action) {}\n"; >- MAP_IMPL_JRE8 = // '*' for 'K', '%' for 'V' >- " public boolean remove(Object key, Object value) { return false;}\n" + >- " public % getOrDefault(Object key, % defaultValue) {return defaultValue;}\n" + >- " public void forEach(java.util.function.BiConsumer<? super *, ? super %> block) {}\n" + >- " public void replaceAll(java.util.function.BiFunction<? super *, ? super %, ? extends %> function) {}\n" + >- " public % putIfAbsent(* key, % value) { return null;}\n" + >- " public boolean replace(* key, % oldValue, % newValue) { return false;}\n" + >- " public % replace(* key, % value) { return null;}\n" + >- " public % computeIfAbsent(* key, java.util.function.Function<? super *, ? extends %> mappingFunction) { return null;}\n" + >- " public % computeIfPresent(* key, java.util.function.BiFunction<? super *, ? super %, ? extends %> remappingFunction) { return null;}\n" + >- " public % compute(* key, java.util.function.BiFunction<? super *, ? super %, ? extends %> remappingFunction) { return null;}\n" + >- " public % merge(* key, % value, java.util.function.BiFunction<? super %, ? super %, ? extends %> remappingFunction) { return null;}\n"; >- MAP_RAW_IMPL_JRE8 = >- " public boolean remove(Object key, Object value) { return false;}\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getOrDefault(Object key, Object defaultValue) { return defaultValue;}\n" + >- " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.BiConsumer block) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.BiFunction function) {}\n" + >- " public Object putIfAbsent(Object key, Object value) { return null;}\n" + >- " public boolean replace(Object key, Object oldValue, Object newValue) { return false;}\n" + >- " public Object replace(Object key, Object value) { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") Object computeIfAbsent(Object key, java.util.function.Function mappingFunction) { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") Object computeIfPresent(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") Object compute(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" + >- " public @SuppressWarnings(\"rawtypes\") Object merge(Object key, Object value, java.util.function.BiFunction remappingFunction) { return null;}\n"; >- } else { >- COMPARATOR_IMPL_JRE8 = ""; >- COMPARATOR_RAW_IMPL_JRE8 = ""; >- COLLECTION_IMPL_JRE8 = ""; >- COLLECTION_RAW_IMPL_JRE8 = ""; >- LIST_IMPL_JRE8 = ""; >- COLLECTION_AND_LIST_IMPL_JRE8 = ""; >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 = ""; >- LIST_RAW_IMPL_JRE8 = ""; >- ITERABLE_IMPL_JRE8 = ""; >- ITERABLE_RAW_IMPL_JRE8 = ""; >- ITERATOR_IMPL_JRE8 = "\n\n"; >- ITERATOR_RAW_IMPL_JRE8 = "\n\n"; >- MAP_IMPL_JRE8 = ""; >- MAP_RAW_IMPL_JRE8 = ""; >- } >- } >- String getCollectionAndListRawImplJRE8() { >- if (this.complianceLevel < ClassFileConstants.JDK1_5) >- return COLLECTION_AND_LIST_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", ""); >- return COLLECTION_AND_LIST_RAW_IMPL_JRE8; >- } >- String getListRawImplJRE8() { >- if (this.complianceLevel < ClassFileConstants.JDK1_5) >- return LIST_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", ""); >- return LIST_RAW_IMPL_JRE8; >- } >- String getIterableRawImplJRE8() { >- if (this.complianceLevel < ClassFileConstants.JDK1_5) >- return ITERABLE_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", ""); >- return ITERABLE_RAW_IMPL_JRE8; >- } >- String getCollectionRawImplJRE8() { >- if (this.complianceLevel < ClassFileConstants.JDK1_5) >- return COLLECTION_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", ""); >- return COLLECTION_RAW_IMPL_JRE8; >- } >- > // javac comparison related types, fields and methods - see runJavac for > // details > static class JavacCompiler { >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java >index 9595fce..fd5f665 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java >@@ -514,7 +514,7 @@ sure, yet neither overrides the other > "}\n" + > "interface OrderedSet<E> extends List<E>, Set<E> { boolean add(E o); }\n" > }; >- if (!IS_JRE_8 || this.complianceLevel < ClassFileConstants.JDK1_8) >+ if (this.complianceLevel < ClassFileConstants.JDK1_8) > this.runConformTest(testFiles, ""); > else > this.runNegativeTest( >@@ -538,7 +538,7 @@ sure, yet neither overrides the other > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=123943 variant to make it pass on JRE8 > public void test009a() { >- if (!IS_JRE_8 || this.complianceLevel < ClassFileConstants.JDK1_8) >+ if (this.complianceLevel < ClassFileConstants.JDK1_8) > return; > this.runConformTest( > new String[] { >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java >index e437dc5..6b89efd 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java >@@ -1106,7 +1106,6 @@ public void test023() { > " public Iterator<String> iterator() {\n" + > " return null;\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n", > }, > "----------\n" + >@@ -1629,13 +1628,11 @@ public void test034() throws Exception { > " }\n" + > " public void remove() {\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > "}\n" + > "class Bar implements Iterable<String> {\n" + > " public Iterator<String> iterator() {\n" + > " return new ArrayIterator<String>(new String[]{\"a\",\"b\"});\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n", > }, > "ab"); >@@ -1724,7 +1721,6 @@ public void test035() throws Exception { > " }\n" + > " public void remove() {\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > "}\n" + > "interface IFoo extends Iterable<String> {\n" + > "}\n" + >@@ -1732,7 +1728,6 @@ public void test035() throws Exception { > " public Iterator<String> iterator() {\n" + > " return new ArrayIterator<String>(new String[]{\"a\",\"b\"});\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n", > }, > "ab"); >@@ -1808,7 +1803,6 @@ public void test036() throws Exception { > " X x = new X();\n" + > " x.foo(x);\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") + > "}", > }, > "ab"); >@@ -2023,7 +2017,6 @@ public void test039() throws Exception { > " System.out.println(\"remove\");\n" + > " this.iterator.remove();\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > " }\n" + > " \n" + > " static Set<Object> initForEach() {\n" + >@@ -2120,7 +2113,6 @@ public void test040() throws Exception { > " System.out.println(\"remove\");\n" + > " this.iterator.remove();\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > " }\n" + > " \n" + > " static Set<Object> initForEach() {\n" + >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >index 159196f..8c9df29 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >@@ -4456,8 +4456,6 @@ public class GenericTypeTest extends AbstractComparableTest { > " }\n" + > " public int size() { return 0; }\n" + > " public Object get(int index) { return null; }\n" + >- ITERABLE_RAW_IMPL_JRE8 + >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 + > "}\n" > }, > "SUCCESS"); >@@ -6189,7 +6187,6 @@ public class GenericTypeTest extends AbstractComparableTest { > " public int compare(X x1, X x2) {\n" + > " return comparator.compare(function.eval(x1),function.eval(x2));\n" + > " }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > "}\n", > }, > ""); >@@ -8890,7 +8887,6 @@ public class GenericTypeTest extends AbstractComparableTest { > " public Set<Map.Entry<String, V>> entrySet() {\n" + > " return this.backingMap.entrySet();\n" + > " }\n" + >- MAP_IMPL_JRE8.replaceAll("\\*", "String").replaceAll("\\%", "V")+ > "}\n", > }, > "----------\n" + >@@ -10850,12 +10846,9 @@ public class GenericTypeTest extends AbstractComparableTest { > " public boolean hasNext() {return false;}\n" + > " public Entry<String, Integer> next() {return null;}\n" + > " public void remove() {} \n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") + > " };\n" + > " }\n" + > " public int size() {return 0;}\n" + >- COLLECTION_RAW_IMPL_JRE8 + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") + > "}" > } > ); >@@ -11427,8 +11420,6 @@ public class GenericTypeTest extends AbstractComparableTest { > " }\n" + > " public Iterator<Runnable> iterator() {return null;}\n" + > " public int size() {return 0;}\n" + >- COLLECTION_RAW_IMPL_JRE8 + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "Runnable") + > "}" > } > ); >@@ -13608,7 +13599,6 @@ public class GenericTypeTest extends AbstractComparableTest { > " public boolean hasNext() { return false; }\n" + > " public String next() { return null; }\n" + > " public void remove() {}\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n", > }, > ""); >@@ -20044,7 +20034,6 @@ public void test0617() { > " }\n" + > " public void remove() {\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "U") + > " }\n" + > " }\n" + > "}\n", >@@ -25082,8 +25071,6 @@ public void test0779() throws Exception { > " List<String> list = new AbstractList<String>() {\n" + > " @Override public int size() { return 0; }\n" + > " @Override public String get(int i) { return args.get(i); }\n" + >- COLLECTION_AND_LIST_IMPL_JRE8.replaceAll("\\*", "String") + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") + > " };\n" + > " }\n" + > " }\n" + >@@ -25095,14 +25082,13 @@ public void test0779() throws Exception { > }, > "SUCCESS"); > >- String constantPoolIdx = IS_JRE_8 ? "73" : "36"; // depends on whether or not stubs for JRE8 default methods are included > String expectedOutput = > " // Method descriptor #31 (I)Ljava/lang/Object;\n" + > " // Stack: 2, Locals: 2\n" + > " public bridge synthetic java.lang.Object get(int arg0);\n" + > " 0 aload_0 [this]\n" + > " 1 iload_1 [arg0]\n" + >- " 2 invokevirtual X$Entry$1.get(int) : java.lang.String ["+constantPoolIdx+"]\n" + >+ " 2 invokevirtual X$Entry$1.get(int) : java.lang.String [36]\n" + > " 5 areturn\n" + > " Line numbers:\n" + > " [pc: 0, line: 1]\n"; >@@ -26172,7 +26158,6 @@ public void test0809() { > " }\n" + > " public void remove() {\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "N") + > "}\n" + > "interface Set3<N extends Node> extends Iterable<N> {\n" + > " SetIterator<N> iterator();\n" + >@@ -26204,27 +26189,27 @@ public void test0809() { > "}\n", > }, > "----------\n" + >- "1. WARNING in X.java (at line 23)\n" + >+ "1. WARNING in X.java (at line 21)\n" + > " void f1(Set1 s) {\n" + > " ^^^^\n" + > "Set1 is a raw type. References to generic type Set1<N> should be parameterized\n" + > "----------\n" + >- "2. ERROR in X.java (at line 24)\n" + >+ "2. ERROR in X.java (at line 22)\n" + > " Node n_ = s.iterator().next();\n" + > " ^^^^^^^^^^^^^^^^^^^\n" + > "Type mismatch: cannot convert from Object to Node\n" + > "----------\n" + >- "3. ERROR in X.java (at line 27)\n" + >+ "3. ERROR in X.java (at line 25)\n" + > " for (Node n : s) {\n" + > " ^\n" + > "Type mismatch: cannot convert from element type Object to Node\n" + > "----------\n" + >- "4. WARNING in X.java (at line 37)\n" + >+ "4. WARNING in X.java (at line 35)\n" + > " void f3(Set3 s) {\n" + > " ^^^^\n" + > "Set3 is a raw type. References to generic type Set3<N> should be parameterized\n" + > "----------\n" + >- "5. ERROR in X.java (at line 40)\n" + >+ "5. ERROR in X.java (at line 38)\n" + > " for (Node n : s) {\n" + > " ^\n" + > "Type mismatch: cannot convert from element type Object to Node\n" + >@@ -28413,8 +28398,6 @@ public void test0868() { > " // TODO Auto-generated method stub\n" + > " \n" + > " }" + >- COLLECTION_RAW_IMPL_JRE8 + >- ITERABLE_RAW_IMPL_JRE8 + > "}", > }, > "", >@@ -34741,7 +34724,6 @@ public void test1030() { > " public Iterator<W> iterator() {\n" + > " return theList.iterator();\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replace('*', 'W') + > " }\n" + > "\n" + > " private PointList<Waypoint> waypoints = new PointList<Waypoint>();\n" + >@@ -34995,7 +34977,6 @@ public void test1035() { > "public int compare(T obj1, T obj2) {\n" + > " return obj1.compareTo(obj2);\n" + > "}\n" + >- COMPARATOR_IMPL_JRE8.replace('*', 'T').replace('%', 'U').replace('$', 'S') + > "}\n" + > "\n" + > "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n" + >@@ -35046,7 +35027,6 @@ public void test1035() { > "public int compare(V obj1, V obj2) {\n" + > " return 0;\n" + > "}\n" + >- COMPARATOR_IMPL_JRE8.replace('*', 'V').replace('%', 'U').replace('$', 'S') + > "}", // ================= > > }); >@@ -50714,7 +50694,6 @@ public void test1444() { > " public boolean hasNext() {\n" + > " return false;\n" + > " }\n" + >- ITERATOR_RAW_IMPL_JRE8 + > " };\n" + > " }\n" + > " Zork z;\n" + >@@ -50747,9 +50726,9 @@ public void test1444() { > " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Unnecessary cast from Iterator to Iterator<String>\n" + > "----------\n" + >- "6. ERROR in X.java (at line 38)\n" >+ "6. ERROR in X.java (at line 36)\n" > : // secondary error no longer reported at 1.8+ >- "5. ERROR in X.java (at line 38)\n" >+ "5. ERROR in X.java (at line 36)\n" > ) + > " Zork z;\n" + > " ^^^^\n" + >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java >index ef0fd3f..98964b4 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java >@@ -6858,7 +6858,6 @@ public void test173() throws Exception { > " compare(yourList != null ? yourList : myList, yourList);\n" + > " return 0;\n" + > " }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > " };\n" + > " System.out.println(\"SUCCESS\");\n" + > " }\n" + >@@ -6889,7 +6888,6 @@ public void test174() throws Exception { > " private int foo(int i, int j) {\n" + > " return i - j;\n" + > " }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > " };\n" + > " System.out.println(\"SUCCESS\");\n" + > " }\n" + >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java >index 57b8e57..de01453 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2013 IBM Corporation and others. >+ * Copyright (c) 2000, 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -2563,8 +2563,6 @@ public void test075() { > " public int size() {\n" + > " return 0;\n" + > " }\n" + >- getCollectionAndListRawImplJRE8() + >- getIterableRawImplJRE8() + > "}", // ================= > }, > ""); >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >index ae8357b..b432e20 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >@@ -1825,7 +1825,6 @@ public class MethodVerifyTest extends AbstractComparableTest { > "import java.util.*;\n" + > "public class X extends java.util.AbstractMap {\n" + > " public java.util.Set entrySet() { return null; }\n" + >- MAP_RAW_IMPL_JRE8 + > "}\n" > }, > "" >@@ -6900,8 +6899,6 @@ X.java:7: name clash: <T#1>foo2(T#1) in X and <T#2>foo2(A) in Y have the same er > " public boolean hasNext() { return false; }\n" + > " public Object next() { return null; }\n" + > " public void remove() {}\n" + >- ITERABLE_RAW_IMPL_JRE8 + >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 + > "}\n", // ================= > }, > "----------\n" + >@@ -7022,8 +7019,6 @@ X.java:7: name clash: <T#1>foo2(T#1) in X and <T#2>foo2(A) in Y have the same er > " public boolean hasNext() { return false; }\n" + > " public Object next() { return null; }\n" + > " public void remove() {}\n" + >- ITERABLE_RAW_IMPL_JRE8 + >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 + > "}\n", // ================= > }, > "----------\n" + >@@ -7134,8 +7129,6 @@ X.java:7: name clash: <T#1>foo2(T#1) in X and <T#2>foo2(A) in Y have the same er > " public boolean hasNext() { return false; }\n" + > " public Object next() { return null; }\n" + > " public void remove() {}\n" + >- ITERABLE_RAW_IMPL_JRE8 + >- COLLECTION_AND_LIST_RAW_IMPL_JRE8 + > "}\n", // ================= > }, > "----------\n" + >@@ -11442,7 +11435,6 @@ public void test203() { > " return compare((I) o1, (I) o2);\n" + > " }\n" + > " public int compare(I o1, I o2) { return 0; }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > "}" > }, > "" >@@ -12355,7 +12347,6 @@ public void test331446() { > " public int compare(Object o1, Object o2) {\n" + > " return 0;\n" + > " }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > " };\n" + > " Test.assertEquals(\"Test\", comparator, new ArrayList(), new ArrayList());\n" + > " }\n" + >@@ -12426,7 +12417,6 @@ public void test331446a() { > " public int compare(Object o1, Object o2) {\n" + > " return 0;\n" + > " }\n" + >- COMPARATOR_RAW_IMPL_JRE8 + > " };\n" + > " Test.assertEquals(\"Test\", comparator, new ArrayList(), new ArrayList());\n" + > " }\n" + >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java >index 5458587..042f6a9 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2006, 2013 IBM Corporation and others. >+ * Copyright (c) 2006, 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -1788,7 +1788,6 @@ public class StackMapAttributeTest extends AbstractRegressionTest { > " public Iterator<Value_Type> iterator() {\n" + > " return null;\n" + > " }\n" + >- ITERABLE_IMPL_JRE8.replaceAll("\\*", "Value_Type") + > "}\n" + > "\n" + > "class BirBlock {\n" + >diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java >index 21e5431..a75c14a 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java >@@ -2494,7 +2494,6 @@ public class VarargsTest extends AbstractComparableTest { > " public void remove() {\n" + > " throw new UnsupportedOperationException();\n" + > " }\n" + >- ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > " }\n" + > " public static void main(String[] args) {\n" + > " new IteratorChain<Number>(null, null);\n" + >@@ -2503,7 +2502,7 @@ public class VarargsTest extends AbstractComparableTest { > }, > this.complianceLevel < ClassFileConstants.JDK1_7 ? > "----------\n" + >- "1. WARNING in X.java (at line 20)\n" + >+ "1. WARNING in X.java (at line 18)\n" + > " new IteratorChain<Number>(null, null);\n" + > " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: A generic array of Collection<? extends Number> is created for a varargs parameter\n" + >@@ -2514,7 +2513,7 @@ public class VarargsTest extends AbstractComparableTest { > " ^^^^^^^^^^^\n" + > "Type safety: Potential heap pollution via varargs parameter collections\n" + > "----------\n" + >- "2. WARNING in X.java (at line 20)\n" + >+ "2. WARNING in X.java (at line 18)\n" + > " new IteratorChain<Number>(null, null);\n" + > " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: A generic array of Collection<? extends Number> is created for a varargs parameter\n" +
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
Flags:
shankhba
:
review?
Actions:
View
|
Diff
Attachments on
bug 431911
: 248939