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 226235 Details for
Bug 396139
[1.8] define which JRE8 build we are targeting in BETA_JAVA8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed Patch [b73]
Bug-396139--18-define-which-JRE8-build-we-are-target.b73.patch (text/plain), 40.23 KB, created by
Manoj N Palat
on 2013-01-28 23:22:35 EST
(
hide
)
Description:
Proposed Patch [b73]
Filename:
MIME Type:
Creator:
Manoj N Palat
Created:
2013-01-28 23:22:35 EST
Size:
40.23 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 5b50060..f451007 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 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 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 >@@ -82,155 +82,89 @@ > static final String ITERABLE_IMPL_JRE8; > static final String ITERABLE_RAW_IMPL_JRE8; > static final String ITERABLE_RAW_WITHOUT_IS_EMPTY_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 final String MAP_STREAM_IMPL_JRE8; >- static final String MAP_STREAM_RAW_IMPL_JRE8; >+ static final String STREAM_OVERRIDE_IMPL_JRE8; >+ static final String STREAM_OVERRIDE_RAW_IMPL_JRE8; >+ static final String STREAM_OVERRIDE_DECL_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 = >- " public java.util.Comparator<*> compose(java.util.Comparator<? super *> other) { return null; }\n" + >- " public java.util.Comparator<*> reverse() { return null; }\n"; >+ COMPARATOR_IMPL_JRE8 = // replace '*' with T, '%' with U >+ " public java.util.Comparator<*> reverseOrder() { return null;}\n" + >+ " public java.util.Comparator<*> thenComparing(java.util.Comparator<? super *> other) { 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<*> thenComparing(java.util.function.IntFunction<? super *> keyExtractor) { return null;}\n" + >+ " public java.util.Comparator<*> thenComparing(java.util.function.LongFunction<? super *> keyExtractor) { return null;}\n" + >+ " public java.util.Comparator<*> thenComparing(java.util.function.DoubleFunction<? super *> keyExtractor) { return null;}\n"; > COMPARATOR_RAW_IMPL_JRE8 = >- " public java.util.Comparator compose(java.util.Comparator other) { return null; }\n" + >- " public java.util.Comparator reverse() { return null; }\n"; >+ " public java.util.Comparator reverseOrder() { 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) { return null;}\n" + >+ " public java.util.Comparator thenComparing(java.util.function.IntFunction keyExtractor) { return null;}\n" + >+ " public java.util.Comparator thenComparing(java.util.function.LongFunction keyExtractor) { return null;}\n" + >+ " public java.util.Comparator thenComparing(java.util.function.DoubleFunction keyExtractor) { return null;}\n"; > COLLECTION_IMPL_JRE8 = >- " public boolean retainAll(java.util.functions.Predicate<? super *> filter) { return false; }\n" + >- " public boolean removeAll(java.util.functions.Predicate<? super *> filter) { return false; }\n" + >- " public void addAll(Iterable<? extends *> source) { }\n"; >+ " public boolean removeAll(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_RAW_IMPL_JRE8 = >- " public @SuppressWarnings(\"rawtypes\") boolean retainAll(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean removeAll(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") void addAll(Iterable source) { }\n"; >+ " public @SuppressWarnings(\"rawtypes\") boolean removeAll(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 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 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 boolean isEmpty() { return false; }\n" + >- " public long count() { return 0L; }\n" + >- " public * getOnly() { return null; }\n" + >- " public * getFirst() { return null; }\n" + >- " public * getAny() { return null; }\n" + >- " public * reduce(* base, java.util.functions.BinaryOperator<*> reducer) { return null; }\n" + >- " public <A extends java.util.Fillable<? super *>> A into(A target) { return null; }\n" + >- " public void forEach(java.util.functions.Block<? super *> block) {}\n" + >- " public Iterable<*> sorted(java.util.Comparator<? super *> comparator) { return null; }\n" + >- " public boolean anyMatch(java.util.functions.Predicate<? super *> filter) { return false; }\n" + >- " public boolean allMatch(java.util.functions.Predicate<? super *> filter) { return false; }\n" + >- " public boolean noneMatch(java.util.functions.Predicate<? super *> filter) { return false; }\n" + >- " public Iterable<*> cumulate(java.util.functions.BinaryOperator<*> op) { return null; }\n" + >- " public <U> MapStream<*,U> mapped(java.util.functions.Mapper<? super *, ? extends U> mapper) { return null; }\n" + >- " public Iterable<*> filter(java.util.functions.Predicate<? super *> predicate) { return null; }\n" + >- " public <U> Iterable<U> map(java.util.functions.Mapper<? super *, ? extends U> mapper) { return null; }\n" + >- " public double mapReduce(java.util.functions.DoubleMapper<? super *> mapper, double base, java.util.functions.DoubleBinaryOperator reducer) { return 0; }\n" + >- " public long mapReduce(java.util.functions.LongMapper<? super *> mapper, long base, java.util.functions.LongBinaryOperator reducer) { return 0; }\n" + >- " public int mapReduce(java.util.functions.IntMapper<? super *> mapper, int base, java.util.functions.IntBinaryOperator reducer) { return 0; }\n" + >- " public <U> U mapReduce(java.util.functions.Mapper<? super *, ? extends U> mapper, U base, java.util.functions.BinaryOperator<U> reducer) { return null; }\n" + >- " public <U> Iterable<U> flatMap(java.util.functions.Mapper<? super *, ? extends Iterable<U>> mapper) { return null; }\n" + >- " public <U> MapStream<U, Iterable<*>> groupBy(java.util.functions.Mapper<? super *, ? extends U> mapper) { return null; }\n" + >- " public <U> MapStream<U, Iterable<*>> groupByMulti(java.util.functions.Mapper<? super *, ? extends Iterable<U>> mapper) { return null; }\n" + >- " public Iterable<*> uniqueElements() { return null; }\n"; >+ " public void forEach(java.util.function.Block<? super *> block){}\n"; > ITERABLE_RAW_IMPL_JRE8 = >- " public boolean isEmpty() { return false; }\n" + >- " public long count() { return 0L; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getOnly() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getFirst() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getAny() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object reduce(Object base, java.util.functions.BinaryOperator reducer) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.Fillable into(java.util.Fillable target) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.functions.Block block) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable sorted(java.util.Comparator comparator) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean anyMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean allMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean noneMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable cumulate(java.util.functions.BinaryOperator op) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream mapped(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable filter(java.util.functions.Predicate predicate) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable map(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") double mapReduce(java.util.functions.DoubleMapper mapper, double base, java.util.functions.DoubleBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") long mapReduce(java.util.functions.LongMapper mapper, long base, java.util.functions.LongBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") int mapReduce(java.util.functions.IntMapper mapper, int base, java.util.functions.IntBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object mapReduce(java.util.functions.Mapper mapper, Object base, java.util.functions.BinaryOperator reducer) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable flatMap(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream groupBy(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream groupByMulti(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable uniqueElements() { return null; }\n"; >+ " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Block block) {}\n"; > ITERABLE_RAW_WITHOUT_IS_EMPTY_IMPL_JRE8 = >- " public long count() { return 0L; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getOnly() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getFirst() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object getAny() { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object reduce(Object base, java.util.functions.BinaryOperator reducer) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") java.util.Fillable into(java.util.Fillable target) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.functions.Block block) {}\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable sorted(java.util.Comparator comparator) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean anyMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean allMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") boolean noneMatch(java.util.functions.Predicate filter) { return false; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable cumulate(java.util.functions.BinaryOperator op) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream mapped(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable filter(java.util.functions.Predicate predicate) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable map(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") double mapReduce(java.util.functions.DoubleMapper mapper, double base, java.util.functions.DoubleBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") long mapReduce(java.util.functions.LongMapper mapper, long base, java.util.functions.LongBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") int mapReduce(java.util.functions.IntMapper mapper, int base, java.util.functions.IntBinaryOperator reducer) { return 0; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Object mapReduce(java.util.functions.Mapper mapper, Object base, java.util.functions.BinaryOperator reducer) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable flatMap(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream groupBy(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") MapStream groupByMulti(java.util.functions.Mapper mapper) { return null; }\n" + >- " public @SuppressWarnings(\"rawtypes\") Iterable uniqueElements() { return null; }\n"; >- MAP_IMPL_JRE8 = // '!' stands for 'K,V', '*' for 'K' >- " public Iterable<BiValue<!>> asIterable() { return null; }\n" + >- " public Iterable<*> inputs() { return null; }\n"; >+ " public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Block block) {}\n"; >+ ITERATOR_IMPL_JRE8 = // replace '*' with your concrete type argument >+ " public void forEach(java.util.function.Block<? super *> block){}\n"; >+ ITERATOR_RAW_IMPL_JRE8 = >+ " public void forEach(java.util.function.Block block){}\n"; >+ MAP_IMPL_JRE8 = // '*' for 'K', '%' for 'V' >+ " public boolean remove(Object key, Object value) { return false;}\n" + >+ " public void forEach(java.util.function.BiBlock<? super *, ? super %> block) {}\n" + >+ " public void replaceAll(java.util.function.BiFunction<*, %, %> 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 Iterable asIterable() { return null; }\n" + >- " public Iterable inputs() { return null; }\n"; >- MAP_STREAM_IMPL_JRE8 = // '*' stands for 'K', '%' for 'V' >- " public BiValue<*,%> getOnly() { return null; }\n" + >- " public <A extends Map<? super *, ? super %>> A into(A destination) { return null; }\n" + >- " public void forEach(java.util.functions.BiBlock<? super *, ? super %> block) {}\n" + >- " public MapStream<*, Iterable<%>> asMultiStream() { return null; }\n" + >- " public <W> MapStream<*, Iterable<W>> mapValuesMulti(final java.util.functions.BiMapper<? super *, ? super %, Iterable<W>> mapper) { return null; }\n" + >- " public MapStream<*,%> sorted(java.util.Comparator<? super *> comparator) { return null; }\n" + >- " public boolean anyMatch(java.util.functions.BiPredicate<? super *, ? super %> predicate) { return false; }\n" + >- " public boolean allMatch(java.util.functions.BiPredicate<? super *, ? super %> predicate) { return false; }\n" + >- " public boolean noneMatch(java.util.functions.BiPredicate<? super *, ? super %> predicate) { return false; }\n" + >- " public MapStream<*,%> merge(MapStream<*,%> other) { return null; }\n" + >- " public MapStream<*,%> filter(final java.util.functions.BiPredicate<? super *, ? super %> predicate) { return null; }\n" + >- " public MapStream<%,*> swap() { return null; }\n" + >- " public BiValue<*,%> getAny() { return null; }\n" + >- " public MapStream<*,%> filterKeys(final java.util.functions.Predicate<*> filter) { return null; }\n" + >- " public MapStream<*,%> filterValues(final java.util.functions.Predicate<%> filter) { return null; }\n" + >- " public <A extends Map<? super *, C>,C extends Collection<? super %>> A intoMulti(A destination, java.util.functions.Factory<C> factory) { return null; }\n" + >- " public <W> MapStream<*,W> mapValues(final java.util.functions.Mapper<%,W> mapper) { return null; }\n" + >- " public BiValue<*,%> getFirst() { return null; }\n" + >- " public <W> MapStream<*, W> map(final java.util.functions.BiMapper<*, %, W> mapper) { return null; }\n"; >- MAP_STREAM_RAW_IMPL_JRE8 = >- " public BiValue getOnly() { return null; }\n" + >- " public Map into(Map destination) { return null; }\n" + >- " public void forEach(java.util.functions.BiBlock block) {}\n" + >- " public MapStream asMultiStream() { return null; }\n" + >- " public MapStream mapValuesMulti(final java.util.functions.BiMapper mapper) { return null; }\n" + >- " public MapStream sorted(java.util.Comparator comparator) { return null; }\n" + >- " public boolean anyMatch(java.util.functions.BiPredicate predicate) { return false; }\n" + >- " public boolean allMatch(java.util.functions.BiPredicate predicate) { return false; }\n" + >- " public boolean noneMatch(java.util.functions.BiPredicate predicate) { return false; }\n" + >- " public MapStream merge(MapStream other) { return null; }\n" + >- " public MapStream filter(final java.util.functions.BiPredicate predicate) { return null; }\n" + >- " public MapStream swap() { return null; }\n" + >- " public BiValue getAny() { return null; }\n" + >- " public MapStream filterKeys(final java.util.functions.Predicate filter) { return null; }\n" + >- " public MapStream filterValues(final java.util.functions.Predicate filter) { return null; }\n" + >- " public Map intoMulti(Map destination, java.util.functions.Factory factory) { return null; }\n" + >- " public MapStream mapValues(final java.util.functions.Mapper mapper) { return null; }\n" + >- " public BiValue getFirst() { return null; }\n" + >- " public MapStream map(final java.util.functions.BiMapper mapper) { return null; }\n"; >+ " public boolean remove(Object key, Object value) { return false;}\n" + >+ " public void forEach(java.util.function.BiBlock block) {}\n" + >+ " public 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 Object computeIfAbsent(Object key, java.util.function.Function mappingFunction) { return null;}\n" + >+ " public Object computeIfPresent(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" + >+ " public Object compute(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" + >+ " public Object merge(Object key, Object value, java.util.function.BiFunction remappingFunction) { return null;}\n"; >+ STREAM_OVERRIDE_IMPL_JRE8 = // replace '*' with your concrete type argument >+ " public java.util.stream.Stream<*> stream() { return null;}\n" + >+ " public java.util.stream.Stream<*> parallelStream() { return null;}\n"; >+ STREAM_OVERRIDE_RAW_IMPL_JRE8 = >+ " public java.util.stream.Stream stream() { return null;}\n" + >+ " public java.util.stream.Stream parallelStream() { return null;}\n"; >+ STREAM_OVERRIDE_DECL_JRE8 = // replace '*' with your concrete type argument >+ " public java.util.stream.Stream<*> stream();\n" + >+ " public java.util.stream.Stream<*> parallelStream();\n"; > } else { > COMPARATOR_IMPL_JRE8 = ""; > COMPARATOR_RAW_IMPL_JRE8 = ""; >@@ -241,10 +175,13 @@ > ITERABLE_IMPL_JRE8 = ""; > ITERABLE_RAW_IMPL_JRE8 = ""; > ITERABLE_RAW_WITHOUT_IS_EMPTY_IMPL_JRE8 = ""; >+ ITERATOR_IMPL_JRE8 = "\n"; >+ ITERATOR_RAW_IMPL_JRE8 = "\n"; > MAP_IMPL_JRE8 = ""; > MAP_RAW_IMPL_JRE8 = ""; >- MAP_STREAM_IMPL_JRE8 = ""; >- MAP_STREAM_RAW_IMPL_JRE8 = ""; >+ STREAM_OVERRIDE_IMPL_JRE8 = "\n\n"; >+ STREAM_OVERRIDE_RAW_IMPL_JRE8 = "\n\n"; >+ STREAM_OVERRIDE_DECL_JRE8 = ""; > } > } > String getListRawImplJRE8() { >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 8b28e45..054553d 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 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 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 >@@ -504,6 +504,7 @@ > "T.java", > "import java.util.*;\n" + > "public class T {\n" + >+ " @SuppressWarnings(\"null\")\n" + > " void test() {\n" + > " OrderedSet<String> os = null;\n" + > " os.add(\"hello\");\n" + >@@ -511,7 +512,10 @@ > " os2.add(1);\n" + > " }\n" + > "}" + >- "interface OrderedSet<E> extends List<E>, Set<E> { boolean add(E o); }\n" >+ "interface OrderedSet<E> extends List<E>, Set<E> {\n " + >+ " boolean add(E o);\n" + >+ STREAM_OVERRIDE_DECL_JRE8.replaceAll("\\*", "E") + >+ " }\n" > }, > "" > ); >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 575a113..498a56a 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 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 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 >@@ -1630,6 +1630,7 @@ > " }\n" + > " public void remove() {\n" + > " }\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > "}\n" + > "class Bar implements Iterable<String> {\n" + > " public Iterator<String> iterator() {\n" + >@@ -1724,6 +1725,7 @@ > " }\n" + > " public void remove() {\n" + > " }\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > "}\n" + > "interface IFoo extends Iterable<String> {\n" + > "}\n" + >@@ -2021,16 +2023,18 @@ > " System.out.println(\"remove\");\n" + > " this.iterator.remove();\n" + > " }\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > " }\n" + > " \n" + > " static Set<Object> initForEach() {\n" + > " System.out.println(\"initForEach\");\n" + > " HashSet<Object> set = new HashSet<Object>() {\n" + > " private static final long serialVersionUID = 1L;\n" + >- " public Iterator<Object> iterator() {\n" + >+ " @Override public Iterator<Object> iterator() {\n" + > " System.out.println(\"iterator\");\n" + > " return new MyIterator<Object>(super.iterator());\n" + > " }\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "Object") + > " };\n" + > " for (int i = 0; i < 3; i++) set.add(i);\n" + > " return set;\n" + >@@ -2117,16 +2121,18 @@ > " System.out.println(\"remove\");\n" + > " this.iterator.remove();\n" + > " }\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") + > " }\n" + > " \n" + > " static Set<Object> initForEach() {\n" + > " System.out.println(\"initForEach\");\n" + > " HashSet<Object> set = new HashSet<Object>() {\n" + > " private static final long serialVersionUID = 1L;\n" + >- " public Iterator<Object> iterator() {\n" + >+ " @Override public Iterator<Object> iterator() {\n" + > " System.out.println(\"iterator\");\n" + > " return new MyIterator<Object>(super.iterator());\n" + > " }\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "Object") + > " };\n" + > " for (int i = 0; i < 3; i++) set.add(i);\n" + > " return set;\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 fb8d3ec..ade7f7d 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 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 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 >@@ -7805,7 +7805,9 @@ > new String[] { > "X.java", > "public class X<T> {\n" + >- " public abstract class M extends java.util.AbstractList<T> {}\n" + >+ " public abstract class M extends java.util.AbstractList<T> {\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "T") + >+ " }\n" + > "}\n" + > "class Y<T> extends T {}\n" + > "class Z<T> {\n" + >@@ -7813,12 +7815,12 @@ > "}\n" > }, > "----------\n" + >- "1. ERROR in X.java (at line 4)\n" + >+ "1. ERROR in X.java (at line 7)\n" + > " class Y<T> extends T {}\n" + > " ^\n" + > "Cannot refer to the type parameter T as a supertype\n" + > "----------\n" + >- "2. ERROR in X.java (at line 6)\n" + >+ "2. ERROR in X.java (at line 9)\n" + > " class M extends T {}\n" + > " ^\n" + > "Cannot refer to the type parameter T as a supertype\n" + >@@ -8849,8 +8851,8 @@ > " public Set<Map.Entry<String, V>> entrySet() {\n" + > " return this.backingMap.entrySet();\n" + > " }\n" + >- MAP_STREAM_IMPL_JRE8.replaceAll("\\*", "String").replace('%', 'V') + >- MAP_IMPL_JRE8.replaceAll("!", "String,V").replaceAll("\\*", "String")+ >+ //MAP_STREAM_IMPL_JRE8.replaceAll("\\*", "String").replace('%', 'V') + >+ MAP_IMPL_JRE8.replaceAll("\\*", "String").replace('%', 'V') + > "}\n", > }, > "----------\n" + >@@ -9321,7 +9323,9 @@ > " xe.element().add(this);\n" + > " xe.element().run();\n" + > " }\n" + >- " abstract class XM implements List, Runnable {}\n" + >+ " abstract class XM implements List, Runnable {\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "Object") + >+ " }\n" + > " Zork z;\n" + > "}\n" > }, >@@ -9347,11 +9351,11 @@ > "Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E> should be parameterized\n" + > "----------\n" + > "5. WARNING in X.java (at line 19)\n" + >- " abstract class XM implements List, Runnable {}\n" + >+ " abstract class XM implements List, Runnable {\n" + > " ^^^^\n" + > "List is a raw type. References to generic type List<E> should be parameterized\n" + > "----------\n" + >- "6. ERROR in X.java (at line 20)\n" + >+ "6. ERROR in X.java (at line 23)\n" + > " Zork z;\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + >@@ -10755,7 +10759,9 @@ > "X.java", > "import java.util.*;\n" + > "public class X {\n" + >- " class List1<E> extends LinkedList<E> {};\n" + >+ " class List1<E> extends LinkedList<E> {\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "E") + >+ "};\n" + > " public static void main (String[] args) {\n" + > " Map<String, List<Integer>> x = new HashMap<String, List<Integer>>();\n" + > " Map<String, List1<Integer>> m = new HashMap<String, List1<Integer>>();\n" + >@@ -10805,15 +10811,16 @@ > "import java.util.Iterator;\n" + > "import java.util.Map.Entry;\n" + > "public class Test extends AbstractSet<Entry<String,Integer>> {\n" + >- " public Iterator<Entry<String, Integer>> iterator() {\n" + >+ " @Override public Iterator<Entry<String, Integer>> iterator() {\n" + > " return new Iterator<Entry<String,Integer>>() {\n" + > " public boolean hasNext() {return false;}\n" + > " public Entry<String, Integer> next() {return null;}\n" + > " public void remove() {} \n" + >+ ITERABLE_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") + > " };\n" + > " }\n" + >- " public int size() {return 0;}\n" + >- COLLECTION_RAW_IMPL_JRE8 + >+ " @Override public int size() {return 0;}\n" + >+ COLLECTION_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") + > ITERABLE_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") + > "}" > } >@@ -13567,6 +13574,7 @@ > " public boolean hasNext() { return false; }\n" + > " public String next() { return null; }\n" + > " public void remove() {}\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n", > }, > ""); >@@ -17206,6 +17214,7 @@ > new String[] { > "X.java", > "class StringList extends java.util.LinkedList<String> {\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "String") + > "}\n" + > "\n" + > "public class X {\n" + >@@ -17222,7 +17231,7 @@ > " ^^^^^^^^^^\n" + > "The serializable class StringList does not declare a static final serialVersionUID field of type long\n" + > "----------\n" + >- "2. ERROR in X.java (at line 9)\n" + >+ "2. ERROR in X.java (at line 11)\n" + > " Zork z;\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + >@@ -19904,6 +19913,7 @@ > " }\n" + > " public void remove() {\n" + > " }\n" + >+ ITERATOR_IMPL_JRE8.replaceAll("\\*", "U") + > " }\n" + > " }\n" + > "}\n", >@@ -24928,7 +24938,7 @@ > }, > "SUCCESS"); > >- String constantPoolIdx = IS_JRE_8 ? "149" : "36"; // depends on whether or not stubs for JRE8 default methods are included >+ String constantPoolIdx = IS_JRE_8 ? "67" : "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" + >@@ -25882,6 +25892,7 @@ > " }\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" + >@@ -25913,27 +25924,27 @@ > "}\n", > }, > "----------\n" + >- "1. WARNING in X.java (at line 21)\n" + >+ "1. WARNING in X.java (at line 22)\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 22)\n" + >+ "2. ERROR in X.java (at line 23)\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 25)\n" + >+ "3. ERROR in X.java (at line 26)\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 35)\n" + >+ "4. WARNING in X.java (at line 36)\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 38)\n" + >+ "5. ERROR in X.java (at line 39)\n" + > " for (Node n : s) {\n" + > " ^\n" + > "Type mismatch: cannot convert from element type Object to Node\n" + >@@ -28724,6 +28735,7 @@ > " public int compareTo(Sequence<? extends E> o) {\n" + > " return 0;\n" + > " }\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "E") + > "}\n" + > "\n" + > "class Test<T extends Comparable<? super T>> {\n" + >@@ -33717,6 +33729,7 @@ > " super.add(-index-1,e);\n" + > " return true;\n" + > " }\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "E") + > "}", // ================= > }, > "----------\n" + >@@ -34421,7 +34434,7 @@ > "public int compare(T obj1, T obj2) {\n" + > " return obj1.compareTo(obj2);\n" + > "}\n" + >- COMPARATOR_IMPL_JRE8.replace('*', 'T') + >+ COMPARATOR_IMPL_JRE8.replaceAll("\\*", "T").replace('%', 'U') + > "}\n" + > "\n" + > "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n" + >@@ -34472,7 +34485,7 @@ > "public int compare(V obj1, V obj2) {\n" + > " return 0;\n" + > "}\n" + >- COMPARATOR_IMPL_JRE8.replace('*', 'V') + >+ COMPARATOR_IMPL_JRE8.replace('*', 'V').replace('%', 'U') + > "}", // ================= > > }, >@@ -36904,6 +36917,7 @@ > "\n" + > "class SerializableList extends LinkedList<Serializable> {\n" + > " private static final long serialVersionUID = 1L; \n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "Serializable") + > "}\n" + > "public class X {\n" + > " @SuppressWarnings({\"nls\", \"unused\"})\n" + >@@ -36921,22 +36935,22 @@ > "}\n", // ================= > }, > "----------\n" + >- "1. WARNING in X.java (at line 13)\n" + >+ "1. WARNING in X.java (at line 15)\n" + > " java.util.List<String> b = (LinkedList<String>) a; // unchecked\n" + > " ^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: Unchecked cast from List<capture#1-of ? extends Serializable> to LinkedList<String>\n" + > "----------\n" + >- "2. WARNING in X.java (at line 14)\n" + >+ "2. WARNING in X.java (at line 16)\n" + > " java.util.List<Integer> c = (LinkedList<Integer>) a; // unchecked\n" + > " ^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: Unchecked cast from List<capture#2-of ? extends Serializable> to LinkedList<Integer>\n" + > "----------\n" + >- "3. WARNING in X.java (at line 15)\n" + >+ "3. WARNING in X.java (at line 17)\n" + > " java.util.List<Runtime> d = (LinkedList<Runtime>) a; // inconvertible / unchecked ?\n" + > " ^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: Unchecked cast from List<capture#3-of ? extends Serializable> to LinkedList<Runtime>\n" + > "----------\n" + >- "4. ERROR in X.java (at line 18)\n" + >+ "4. ERROR in X.java (at line 20)\n" + > " Zork z;\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + >@@ -46756,6 +46770,7 @@ > " class Inter {\n" + > " private class Private {}\n" + > " }\n" + >+ STREAM_OVERRIDE_IMPL_JRE8.replaceAll("\\*", "X.Inter.Private") + > " Inter.Private field;\n" + > "}\n", // ================= > }, >@@ -49725,6 +49740,7 @@ > " public boolean hasNext() {\n" + > " return false;\n" + > " }\n" + >+ ITERATOR_RAW_IMPL_JRE8 + > " };\n" + > " }\n" + > " Zork z;\n" + >@@ -49756,7 +49772,7 @@ > " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Unnecessary cast from Iterator to Iterator<String>\n" + > "----------\n" + >- "6. ERROR in X.java (at line 36)\n" + >+ "6. ERROR in X.java (at line 37)\n" + > " Zork z;\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + >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 83753dc..664c804 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 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 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 >@@ -1823,7 +1823,6 @@ > "public class X extends java.util.AbstractMap {\n" + > " public java.util.Set entrySet() { return null; }\n" + > MAP_RAW_IMPL_JRE8 + >- MAP_STREAM_RAW_IMPL_JRE8 + > "}\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 e2752d0..347bbe6 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 >@@ -1,9 +1,13 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2012 IBM Corporation and others. >+ * Copyright (c) 2005, 2013 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 > * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * This is an implementation of an early-draft specification developed under the Java >+ * Community Process (JCP) and is made available for testing and evaluation purposes >+ * only. The code is not compatible with any specification of the JCP. > * > * Contributors: > * IBM Corporation - initial API and implementation >@@ -2478,6 +2482,7 @@ > " 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" + >@@ -2486,7 +2491,7 @@ > }, > this.complianceLevel < ClassFileConstants.JDK1_7 ? > "----------\n" + >- "1. WARNING in X.java (at line 18)\n" + >+ "1. WARNING in X.java (at line 19)\n" + > " new IteratorChain<Number>(null, null);\n" + > " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + > "Type safety: A generic array of Collection<? extends Number> is created for a varargs parameter\n" + >@@ -2497,7 +2502,7 @@ > " ^^^^^^^^^^^\n" + > "Type safety: Potential heap pollution via varargs parameter collections\n" + > "----------\n" + >- "2. WARNING in X.java (at line 18)\n" + >+ "2. WARNING in X.java (at line 19)\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
Actions:
View
|
Diff
Attachments on
bug 396139
: 226235