diff options
37 files changed, 793 insertions, 343 deletions
diff --git a/org.eclipse.jdt.annotation/about.html b/org.eclipse.jdt.annotation/about.html index c258ef55d8..164f781a8f 100644 --- a/org.eclipse.jdt.annotation/about.html +++ b/org.eclipse.jdt.annotation/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 5, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.annotation_v1/about.html b/org.eclipse.jdt.annotation_v1/about.html index c258ef55d8..164f781a8f 100644 --- a/org.eclipse.jdt.annotation_v1/about.html +++ b/org.eclipse.jdt.annotation_v1/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 5, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.apt.core/about.html b/org.eclipse.jdt.apt.core/about.html index 3648a8f5c4..5c0148b2d4 100644 --- a/org.eclipse.jdt.apt.core/about.html +++ b/org.eclipse.jdt.apt.core/about.html @@ -2,28 +2,36 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>May 31, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> + + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - <h3>Third Party Content</h3> <p>The Content includes items that have been sourced from third parties as set out below. If you diff --git a/org.eclipse.jdt.apt.pluggable.core/about.html b/org.eclipse.jdt.apt.pluggable.core/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.apt.pluggable.core/about.html +++ b/org.eclipse.jdt.apt.pluggable.core/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.apt.pluggable.tests/about.html b/org.eclipse.jdt.apt.pluggable.tests/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.apt.pluggable.tests/about.html +++ b/org.eclipse.jdt.apt.pluggable.tests/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.apt.tests/about.html b/org.eclipse.jdt.apt.tests/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.apt.tests/about.html +++ b/org.eclipse.jdt.apt.tests/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.apt.ui/about.html b/org.eclipse.jdt.apt.ui/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.apt.ui/about.html +++ b/org.eclipse.jdt.apt.ui/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.compiler.apt.tests/about.html b/org.eclipse.jdt.compiler.apt.tests/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.compiler.apt.tests/about.html +++ b/org.eclipse.jdt.compiler.apt.tests/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.compiler.apt/about.html b/org.eclipse.jdt.compiler.apt/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.compiler.apt/about.html +++ b/org.eclipse.jdt.compiler.apt/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.compiler.tool.tests/about.html b/org.eclipse.jdt.compiler.tool.tests/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.compiler.tool.tests/about.html +++ b/org.eclipse.jdt.compiler.tool.tests/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.compiler.tool/about.html b/org.eclipse.jdt.compiler.tool/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.compiler.tool/about.html +++ b/org.eclipse.jdt.compiler.tool/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core.internal.tools/about.html b/org.eclipse.jdt.core.internal.tools/about.html index c36c17e16d..164f781a8f 100644 --- a/org.eclipse.jdt.core.internal.tools/about.html +++ b/org.eclipse.jdt.core.internal.tools/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>November 2, 2016</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core.tests.builder/about.html b/org.eclipse.jdt.core.tests.builder/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.core.tests.builder/about.html +++ b/org.eclipse.jdt.core.tests.builder/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core.tests.compiler/about.html b/org.eclipse.jdt.core.tests.compiler/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.core.tests.compiler/about.html +++ b/org.eclipse.jdt.core.tests.compiler/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java index fc297928cd..e42b622e44 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java @@ -122,7 +122,28 @@ public class RunCompletionParserTests extends junit.framework.TestCase { TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_8, tests_1_8)); } - + if ((possibleComplianceLevels & AbstractCompilerTest.F_9) != 0) { + ArrayList tests_9 = (ArrayList)testClasses.clone(); + tests_9.addAll(TEST_CLASSES_1_5); + // Reset forgotten subsets tests + TestCase.TESTS_PREFIX = null; + TestCase.TESTS_NAMES = null; + TestCase.TESTS_NUMBERS= null; + TestCase.TESTS_RANGE = null; + TestCase.RUN_ONLY_ID = null; + all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK9, tests_9)); + } + if ((possibleComplianceLevels & AbstractCompilerTest.F_10) != 0) { + ArrayList tests_10 = (ArrayList)testClasses.clone(); + tests_10.addAll(TEST_CLASSES_1_5); + // Reset forgotten subsets tests + TestCase.TESTS_PREFIX = null; + TestCase.TESTS_NAMES = null; + TestCase.TESTS_NUMBERS= null; + TestCase.TESTS_RANGE = null; + TestCase.RUN_ONLY_ID = null; + all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK10, tests_10)); + } return all; } } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated9Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated9Test.java index 2b46cee0ea..e00c0a0834 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated9Test.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated9Test.java @@ -873,6 +873,51 @@ public class Deprecated9Test extends AbstractRegressionTest9 { this.javaClassLib = save; } } + public void testBug534304() throws Exception { + runNegativeTest( + new String[] { + "p1/C1.java", + "package p1;\n" + + "\n" + + "import pdep.Dep1;\n" + + "\n" + + "public class C1 {\n" + + " Dep1 f;\n" + + "}\n", + "pdep/Dep1.java", + "package pdep;\n" + + "\n" + + "import pmissing.CMissing;\n" + + "\n" + + "@Deprecated(since=\"13\")\n" + + "@CMissing\n" + + "public class Dep1 {\n" + + "\n" + + "}\n" + }, + "----------\n" + + "1. WARNING in p1\\C1.java (at line 3)\n" + + " import pdep.Dep1;\n" + + " ^^^^^^^^^\n" + + "The type Dep1 is deprecated since version 13\n" + + "----------\n" + + "2. WARNING in p1\\C1.java (at line 6)\n" + + " Dep1 f;\n" + + " ^^^^\n" + + "The type Dep1 is deprecated since version 13\n" + + "----------\n" + + "----------\n" + + "1. ERROR in pdep\\Dep1.java (at line 3)\n" + + " import pmissing.CMissing;\n" + + " ^^^^^^^^\n" + + "The import pmissing cannot be resolved\n" + + "----------\n" + + "2. ERROR in pdep\\Dep1.java (at line 6)\n" + + " @CMissing\n" + + " ^^^^^^^^\n" + + "CMissing cannot be resolved to a type\n" + + "----------\n"); + } public static Class<?> testClass() { return Deprecated9Test.class; } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java index 8eb270a59c..d846c9201e 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java @@ -8982,4 +8982,25 @@ public void testBug508834_comment0() { "}" }); } + public void testBug535969() { + runConformTest( + new String[] { + "Test.java", + "import java.util.List;\n" + + "import java.util.stream.Collectors;\n" + + "import java.util.stream.Stream;\n" + + "\n" + + "public class Test {\n" + + " public static void main(String[] args) {\n" + + " List<String> strings = Stream.of(1, 2, 3).map(i -> {\n" + + " return new Object() {\n" + + " final Integer myInt = i;\n" + + " };\n" + + " }).map(o -> {\n" + + " return o.myInt.toString();\n" + + " }).collect(Collectors.toList());\n" + + " }\n" + + "}\n" + }); + } } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTests9.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTests9.java index b6b3a1ef91..49f2c69819 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTests9.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTests9.java @@ -16,6 +16,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.tests.util.Util; import org.eclipse.jdt.internal.compiler.CompilationResult; @@ -23,6 +24,7 @@ import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.batch.BasicModule; import org.eclipse.jdt.internal.compiler.batch.CompilationUnit; import org.eclipse.jdt.internal.compiler.batch.FileSystem; +import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.eclipse.jdt.internal.compiler.env.IModule; import org.eclipse.jdt.internal.compiler.env.INameEnvironment; @@ -356,4 +358,71 @@ public class NullAnnotationTests9 extends AbstractNullAnnotationTest { "----------\n"; runner.runNegativeTest(); } + public void testBug536037a() { + if (this.complianceLevel < ClassFileConstants.JDK10) return; + runConformTestWithLibs( + new String[] { + "Bar.java", + "@org.eclipse.jdt.annotation.NonNullByDefault\n" + + "public class Bar {\n" + + " static void bar(Iterable<String> list) {\n" + + " for(var s : list);\n" + + " }\n" + + "}\n" + }, + null, + ""); + } + public void testBug536037b() { + // tests combination of declaration null-annotations & 'var': + if (this.complianceLevel < ClassFileConstants.JDK10) return; + Map<String, String> options = getCompilerOptions(); + options.put(JavaCore.COMPILER_NONNULL_ANNOTATION_NAME, "test.NonNull"); + options.put(JavaCore.COMPILER_NULLABLE_ANNOTATION_NAME, "test.Nullable"); + runNegativeTestWithLibs( + new String[] { + "test/NonNull.java", + "package test;\n" + + "import java.lang.annotation.*;\n" + + "@Target({ElementType.LOCAL_VARIABLE,ElementType.PARAMETER}) public @interface NonNull {}\n", + "test/Nullable.java", + "package test;\n" + + "import java.lang.annotation.*;\n" + + "@Target({ElementType.LOCAL_VARIABLE,ElementType.PARAMETER}) public @interface Nullable {}\n", + "Bar.java", + "import test.*;\n" + + "public class Bar {\n" + + " static void bar1(@Nullable String s1, Iterable<String> list) {\n" + + " @NonNull var s2 = s1;\n" + + " for (@NonNull var s : list);\n" + + " }\n" + + " static void bar2(int[] array) {\n" + + " @NonNull var i1 = 3;\n" + + " for (@NonNull var s : array);\n" + + " }\n" + + "}\n" + }, + options, + "----------\n" + + "1. ERROR in Bar.java (at line 4)\n" + + " @NonNull var s2 = s1;\n" + + " ^^\n" + + "Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + + "----------\n" + + "2. WARNING in Bar.java (at line 5)\n" + + " for (@NonNull var s : list);\n" + + " ^^^^\n" + + "Null type safety: The expression of type \'String\' needs unchecked conversion to conform to \'@NonNull String\'\n" + + "----------\n" + + "3. ERROR in Bar.java (at line 8)\n" + + " @NonNull var i1 = 3;\n" + + " ^^^^^^^^\n" + + "The nullness annotation @NonNull is not applicable for the primitive type int\n" + + "----------\n" + + "4. ERROR in Bar.java (at line 9)\n" + + " for (@NonNull var s : array);\n" + + " ^^^^^^^^\n" + + "The nullness annotation @NonNull is not applicable for the primitive type int\n" + + "----------\n"); + } } diff --git a/org.eclipse.jdt.core.tests.model/about.html b/org.eclipse.jdt.core.tests.model/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.core.tests.model/about.html +++ b/org.eclipse.jdt.core.tests.model/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java index 4b33235fce..0b9b529ab8 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java @@ -1424,7 +1424,19 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases { String javaHome = System.getProperty("java.home") + File.separator; Path bootModPath = new Path(javaHome +"/lib/jrt-fs.jar"); Path sourceAttachment = new Path(javaHome +"/lib/src.zip"); - IClasspathEntry jrtEntry = JavaCore.newLibraryEntry(bootModPath, sourceAttachment, null, null, attributes, false); + IClasspathEntry jrtEntry; + String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$ + if (javaVersion != null && javaVersion.startsWith("1.8")) { //$NON-NLS-1$ + // fall back to a regular JCL to provide access via the unnamed module: + jrtEntry = JavaCore.newVariableEntry(new Path("JCL18_LIB"), sourceAttachment, null); + try { + setUpJCLClasspathVariables("1.8"); + } catch (IOException e) { + throw new CoreException(new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, e.getMessage(), e)); + } + } else { + jrtEntry = JavaCore.newLibraryEntry(bootModPath, sourceAttachment, null, null, attributes, false); + } IJavaProject project = this.createJavaProject(name, srcFolders, new String[0], new String[0], "bin", compliance); IClasspathEntry[] old = project.getRawClasspath(); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java index b82e6a71cd..5cea1b71df 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java @@ -116,6 +116,12 @@ public void tearDownSuite() throws Exception { deleteProject("Reconciler9"); super.tearDownSuite(); } +private String deprecatedForRemoval(String element) { + if (isJRE9) + return element + " has been deprecated and marked for removal\n"; + else + return element + " is deprecated\n"; +} /* * Ensures that the delta is correct when adding an annotation */ @@ -314,22 +320,35 @@ public void testTerminalDeprecation1() throws CoreException { public void testTerminalDeprecation2() throws CoreException, IOException { try { IJavaProject p1 = createJava9Project("P1"); - createJar( - new String[] { - "p/X1.java", - "package p;\n" + + String x1Source = "package p;\n" + "@Deprecated(forRemoval=true)\n" + - "public class X1 {}", - "/P1/src/p/X2.java", - "package p;\n" + - "public class X2 {\n" + - " @Deprecated(forRemoval=true)\n" + - " public Object field;\n" + - " @Deprecated(forRemoval=true)\n" + - " public void m() {}\n" + - " @Deprecated public void m2() {}\n" + - "}\n" - }, + "public class X1 {}"; + String x2Source = "package p;\n" + + "public class X2 {\n" + + " @Deprecated(forRemoval=true)\n" + + " public Object field;\n" + + " @Deprecated(forRemoval=true)\n" + + " public void m() {}\n" + + " @Deprecated public void m2() {}\n" + + "}\n"; + String[] allJarSources = (isJRE9) + ? new String[] { + "p/X1.java", + x1Source, + "/P1/src/p/X2.java", + x2Source } + : new String[] { + "java/lang/Deprecated.java", + "package java.lang;\n" + + "public @interface Deprecated {\n" + + " boolean forRemoval() default false;" + + "}\n", + "p/X1.java", + x1Source, + "/P1/src/p/X2.java", + x2Source }; + createJar( + allJarSources, p1.getProject().getLocation().append("lib.jar").toOSString(), null, "9"); @@ -350,12 +369,12 @@ public void testTerminalDeprecation2() throws CoreException, IOException { "1. WARNING in /P1/src/Y.java (at line 1)\n" + " public class Y extends p.X1 {\n" + " ^^\n" + - "The type X1 has been deprecated and marked for removal\n" + + deprecatedForRemoval("The type X1") + "----------\n" + "2. WARNING in /P1/src/Y.java (at line 3)\n" + " x2.m();\n" + " ^^^\n" + - "The method m() from the type X2 has been deprecated and marked for removal\n" + + deprecatedForRemoval("The method m() from the type X2") + "----------\n" + "3. WARNING in /P1/src/Y.java (at line 4)\n" + " x2.m2();\n" + @@ -365,7 +384,7 @@ public void testTerminalDeprecation2() throws CoreException, IOException { "4. WARNING in /P1/src/Y.java (at line 5)\n" + " return x2.field;\n" + " ^^^^^\n" + - "The field X2.field has been deprecated and marked for removal\n" + + deprecatedForRemoval("The field X2.field") + "----------\n"); } finally { deleteProject("P1"); diff --git a/org.eclipse.jdt.core.tests.performance/about.html b/org.eclipse.jdt.core.tests.performance/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.core.tests.performance/about.html +++ b/org.eclipse.jdt.core.tests.performance/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core/about.html b/org.eclipse.jdt.core/about.html index e2de55aa2f..f0810d12f3 100644 --- a/org.eclipse.jdt.core/about.html +++ b/org.eclipse.jdt.core/about.html @@ -2,28 +2,37 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>April 2, 2015</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> + + <h3>Disassembler</h3> <p>This plug-in contains a bytecode disassembler ("Disassembler") that can produce a listing of the Java assembler mnemonics ("Assembler Mnemonics") for a Java method. If you use the Disassembler to view the Assembler Mnemonics for a method, you should ensure that doing so will not violate the terms of any licenses that apply to your use of that method, as diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java index e3edb55ee8..22a0f2dbb6 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java @@ -703,6 +703,8 @@ public abstract class ASTNode implements TypeConstants, TypeIds { // additional checks, because LE.resolveType may return a valid binding even in the presence of structural errors if (!lambda.isCompatibleWith(parameterType, scope) || lambda.hasErrors()) continue; + // avoid that preliminary local type bindings escape beyond this point: + lambda.updateLocalTypesInMethod(candidateMethod); } else { updatedArgumentType = argument.resolveType(scope); } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java index 5088c8be5b..fc6f5c9724 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java @@ -484,6 +484,10 @@ public class ForeachStatement extends Statement { } else { elementType = this.elementVariable.patchType(elementType); } + // additional check deferred from LocalDeclaration.resolve(): + if (this.elementVariable.binding != null && this.elementVariable.binding.isValidBinding()) { + this.elementVariable.validateNullAnnotations(this.scope); + } } TypeBinding expectedCollectionType = null; diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java index cb84509c65..0f5f9d2ca2 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java @@ -52,6 +52,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; +import java.util.Map; import java.util.Set; import org.eclipse.jdt.core.compiler.CategorizedProblem; @@ -79,6 +80,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ClassScope; import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers; import org.eclipse.jdt.internal.compiler.lookup.InferenceContext18; import org.eclipse.jdt.internal.compiler.lookup.IntersectionTypeBinding18; +import org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding; import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding; import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment; import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; @@ -90,6 +92,8 @@ import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons; import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.eclipse.jdt.internal.compiler.lookup.Scope; import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; +import org.eclipse.jdt.internal.compiler.lookup.Substitution; +import org.eclipse.jdt.internal.compiler.lookup.Substitution.NullSubstitution; import org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding; import org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding; import org.eclipse.jdt.internal.compiler.lookup.TagBits; @@ -98,6 +102,7 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; import org.eclipse.jdt.internal.compiler.lookup.TypeIds; import org.eclipse.jdt.internal.compiler.lookup.VariableBinding; import org.eclipse.jdt.internal.compiler.lookup.WildcardBinding; +import org.eclipse.jdt.internal.compiler.lookup.Scope.Substitutor; import org.eclipse.jdt.internal.compiler.parser.Parser; import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; import org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit; @@ -131,6 +136,8 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre private HashMap<TypeBinding, LambdaExpression> copiesPerTargetType; protected Expression [] resultExpressions = NO_EXPRESSIONS; public InferenceContext18 inferenceContext; // when performing tentative resolve keep a back reference to the driving context + private Map<Integer/*sourceStart*/, LocalTypeBinding> localTypes; // support look-up of a local type from this lambda copy + public LambdaExpression(CompilationResult compilationResult, boolean assistNode, boolean requiresGenericSignature) { super(compilationResult); @@ -462,6 +469,8 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre if (this.shouldCaptureInstance && this.scope.isConstructorCall) { this.scope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this); } + // beyond this point ensure that all local type bindings are their final binding: + updateLocalTypes(); return (argumentsHaveErrors|parametersHaveErrors) ? null : this.resolvedType; } @@ -1433,4 +1442,74 @@ public class LambdaExpression extends FunctionalExpression implements IPolyExpre } return this.classType = new LambdaTypeBinding(); } + + public void addLocalType(LocalTypeBinding localTypeBinding) { + if (this.localTypes == null) + this.localTypes = new HashMap<>(); + this.localTypes.put(localTypeBinding.sourceStart, localTypeBinding); + } + + /** + * During inference, several copies of a lambda may be created. + * If a lambda body contains a local type declaration, one binding may be created + * within each of the lambda copies. Once inference finished, we need to map all + * such local type bindings to the instance from the correct lambda copy. + * <p> + * When a local type binding occurs as a field of another type binding (e.g., + * type argument), the local type will be replaced in-place, assuming that the + * previous binding should never escape the context of resolving this lambda. + * </p> + */ + class LocalTypeSubstitutor extends Substitutor { + Map<Integer,LocalTypeBinding> localTypes2; + + public LocalTypeSubstitutor(Map<Integer, LocalTypeBinding> localTypes) { + this.localTypes2 = localTypes; + } + + @Override + public TypeBinding substitute(Substitution substitution, TypeBinding originalType) { + if (originalType.isLocalType()) { + LocalTypeBinding orgLocal = (LocalTypeBinding) originalType; + MethodScope lambdaScope2 = orgLocal.scope.enclosingLambdaScope(); + if (lambdaScope2 != null) { + if (((LambdaExpression) lambdaScope2.referenceContext).sourceStart == LambdaExpression.this.sourceStart) { + // local type within this lambda needs replacement: + TypeBinding substType = this.localTypes2.get(orgLocal.sourceStart); + if (substType != null) + return substType; + } + } + return originalType; + } + return super.substitute(substitution, originalType); + } + } + + private void updateLocalTypes() { + if (this.descriptor == null || this.localTypes == null) + return; + LocalTypeSubstitutor substor = new LocalTypeSubstitutor(this.localTypes); + NullSubstitution subst = new NullSubstitution(this.scope.environment()); + updateLocalTypesInMethod(this.binding, substor, subst); + updateLocalTypesInMethod(this.descriptor, substor, subst); + this.resolvedType = substor.substitute(subst, this.resolvedType); + } + + /** + * Perform substitution with a {@link LocalTypeSubstitutor} on all types mentioned in the given method binding. + */ + void updateLocalTypesInMethod(MethodBinding method) { + if (this.localTypes == null) + return; + updateLocalTypesInMethod(method, new LocalTypeSubstitutor(this.localTypes), new NullSubstitution(this.scope.environment())); + } + + private void updateLocalTypesInMethod(MethodBinding method, Substitutor substor, Substitution subst) { + method.declaringClass = (ReferenceBinding) substor.substitute(subst, method.declaringClass); + method.returnType = substor.substitute(subst, method.returnType); + for (int i = 0; i < method.parameters.length; i++) { + method.parameters[i] = substor.substitute(subst, method.parameters[i]); + } + } } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java index 54d49f16bc..153465c4d0 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java @@ -349,10 +349,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl return; } - boolean mayRequireTypeInference = scope.environment().usesNullTypeAnnotations() + boolean mayRequireTargetedTypeInference = scope.environment().usesNullTypeAnnotations() + && !isTypeNameVar // 'var' does not provide a target type && variableType.isValidBinding() && (this.initialization instanceof Invocation || this.initialization instanceof ConditionalExpression); - if (mayRequireTypeInference) { + if (mayRequireTargetedTypeInference) { // these are definitely no constants, so resolving annotations early should be safe resolveAnnotations(scope, this.annotations, this.binding, true); // for type inference having null annotations upfront gives better results @@ -409,9 +410,13 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl : Constant.NotAConstant); } // if init could be a constant only resolve annotation at the end, for constant to be positioned before (96991) - if (!mayRequireTypeInference) + if (!mayRequireTargetedTypeInference) resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); + validateNullAnnotations(scope); + } + + void validateNullAnnotations(BlockScope scope) { if (!scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations)) this.binding.tagBits &= ~TagBits.AnnotationNullMASK; } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java index 2c653662e6..35d7872459 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2018 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 @@ -18,6 +18,7 @@ package org.eclipse.jdt.internal.compiler.lookup; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.CaseStatement; +import org.eclipse.jdt.internal.compiler.ast.LambdaExpression; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.ast.TypeReference; @@ -47,6 +48,10 @@ public LocalTypeBinding(ClassScope scope, SourceTypeBinding enclosingType, CaseS if (methodBinding != null) { this.enclosingMethod = methodBinding; } + MethodScope lambdaScope = scope.enclosingLambdaScope(); + if (lambdaScope != null) { + ((LambdaExpression) lambdaScope.referenceContext).addLocalType(this); + } } public LocalTypeBinding(LocalTypeBinding prototype) { diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java index 8cc013b1b5..52ee471fff 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java @@ -5123,7 +5123,7 @@ public abstract class Scope { } public boolean validateNullAnnotation(long tagBits, TypeReference typeRef, Annotation[] annotations) { - if (typeRef == null) + if (typeRef == null || typeRef.resolvedType == null) return true; TypeBinding type = typeRef.resolvedType; diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java index fe85d0ef82..87a416fcbf 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceModuleBinding.java @@ -40,8 +40,6 @@ public class SourceModuleBinding extends ModuleBinding { public void setRequires(ModuleBinding[] requires, ModuleBinding[] requiresTransitive) { // TODO(SHMOD): it's a bit awkward that we may get called after applyModuleUpdates() has already worked. ModuleBinding javaBase = this.environment.javaBaseModule(); - if (javaBase.isUnnamed()) // happens when no java.base can be found in the name environment. - javaBase = null; this.requires = merge(this.requires, requires, javaBase, ModuleBinding[]::new); this.requiresTransitive = merge(this.requiresTransitive, requiresTransitive, null, ModuleBinding[]::new); } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Substitution.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Substitution.java index bdd7cb9cec..95642e96cc 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Substitution.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Substitution.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2018 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 @@ -16,6 +16,30 @@ package org.eclipse.jdt.internal.compiler.lookup; public interface Substitution { /** + * Don't substitute any type variables. + * Enables the use of {@link Scope.Substitutor} for other purposes. + */ + public static class NullSubstitution implements Substitution { + LookupEnvironment environment; + + public NullSubstitution(LookupEnvironment environment) { + this.environment = environment; + } + @Override + public TypeBinding substitute(TypeVariableBinding typeVariable) { + return typeVariable; + } + @Override + public boolean isRawSubstitution() { + return false; + } + @Override + public LookupEnvironment environment() { + return this.environment; + } + } + + /** * Returns the type substitute for a given type variable, or itself * if no substitution got performed. */ diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java index 347995bad6..7dbd365fd2 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java @@ -1612,6 +1612,10 @@ public static boolean equalsEquals(TypeBinding that, TypeBinding other) { return false; if (that.id != TypeIds.NoId && that.id == other.id) return true; + if (that instanceof LocalTypeBinding && other instanceof LocalTypeBinding) { + // while a lambda is being resolved, consider a local type as equal to its variant from another lambda copy + return ((LocalTypeBinding) that).sourceStart == ((LocalTypeBinding) other).sourceStart; + } return false; } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java index 35b012cb4e..2006074f9d 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBound.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2015 GK Software AG and others. + * Copyright (c) 2013, 2018 GK Software AG 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 @@ -11,7 +11,6 @@ *******************************************************************************/ package org.eclipse.jdt.internal.compiler.lookup; -import org.eclipse.jdt.core.compiler.CharOperation; /** * Implementation of 18.1.3 in JLS8 @@ -38,7 +37,7 @@ public class TypeBound extends ReductionResult { TypeBound(InferenceVariable inferenceVariable, TypeBinding typeBinding, int relation, boolean isSoft) { this.left = inferenceVariable; - this.right = safeType(typeBinding); + this.right = typeBinding; if (((inferenceVariable.tagBits | this.right.tagBits) & TagBits.AnnotationNullMASK) != 0) { if ((inferenceVariable.tagBits & TagBits.AnnotationNullMASK) == (this.right.tagBits & TagBits.AnnotationNullMASK)) { // strip off identical nullness on both sides: @@ -58,20 +57,6 @@ public class TypeBound extends ReductionResult { this.relation = relation; this.isSoft = isSoft; } - - private TypeBinding safeType(TypeBinding type) { - if (type != null && type.isLocalType()) { - MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; - if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) { - // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable - if (type.superclass().id == TypeIds.T_JavaLangObject && type.superInterfaces().length > 0) - return type.superInterfaces()[0]; - return type.superclass(); - } - } - return type; - } - /** distinguish bounds from dependencies. */ boolean isBound() { diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java index c80b579683..64ab179e51 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java @@ -1871,14 +1871,19 @@ public void deprecatedModule(ModuleReference moduleReference, ModuleBinding requ } String deprecatedSinceValue(Supplier<AnnotationBinding[]> annotations) { if (this.options != null && this.options.complianceLevel >= ClassFileConstants.JDK9) { - for (AnnotationBinding annotationBinding : annotations.get()) { - if (annotationBinding.getAnnotationType().id == TypeIds.T_JavaLangDeprecated) { - for (ElementValuePair elementValuePair : annotationBinding.getElementValuePairs()) { - if (CharOperation.equals(elementValuePair.getName(), TypeConstants.SINCE) && elementValuePair.value instanceof StringConstant) - return ((StringConstant) elementValuePair.value).stringValue(); + ReferenceContext contextSave = this.referenceContext; + try { + for (AnnotationBinding annotationBinding : annotations.get()) { + if (annotationBinding.getAnnotationType().id == TypeIds.T_JavaLangDeprecated) { + for (ElementValuePair elementValuePair : annotationBinding.getElementValuePairs()) { + if (CharOperation.equals(elementValuePair.getName(), TypeConstants.SINCE) && elementValuePair.value instanceof StringConstant) + return ((StringConstant) elementValuePair.value).stringValue(); + } + break; } - break; } + } finally { + this.referenceContext = contextSave; } } return null; @@ -10229,7 +10234,8 @@ public void illegalAnnotationForBaseType(TypeReference type, Annotation[] annota char[][] annotationNames = (nullAnnotationTagBit == TagBits.AnnotationNonNull) ? this.options.nonNullAnnotationName : this.options.nullableAnnotationName; - String[] args = new String[] { new String(annotationNames[annotationNames.length-1]), new String(type.getLastToken()) }; + String typeName = new String(type.resolvedType.leafComponentType().readableName()); // use the actual name (accounting for 'var') + String[] args = new String[] { new String(annotationNames[annotationNames.length-1]), typeName }; Annotation annotation = findAnnotation(annotations, typeBit); int start = annotation != null ? annotation.sourceStart : type.sourceStart; int end = annotation != null ? annotation.sourceEnd : type.sourceEnd; diff --git a/org.eclipse.jdt.core/scripts/about.html b/org.eclipse.jdt.core/scripts/about.html index 460233046e..164f781a8f 100644 --- a/org.eclipse.jdt.core/scripts/about.html +++ b/org.eclipse.jdt.core/scripts/about.html @@ -2,27 +2,35 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>About</title> </head> <body lang="EN-US"> -<h2>About This Content</h2> - -<p>June 2, 2006</p> -<h3>License</h3> + <h2>About This Content</h2> -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> + <p>November 30, 2017</p> + <h3>License</h3> -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + <p> + The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + + <p> + If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at <a + href="http://www.eclipse.org/">http://www.eclipse.org</a>. + </p> </body> </html>
\ No newline at end of file diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java index 90c5f4c6b0..f88ea99696 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2018 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 @@ -11,6 +11,7 @@ package org.eclipse.jdt.internal.core.index; import java.io.*; +import java.util.regex.Pattern; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.search.*; @@ -63,6 +64,9 @@ public static boolean isMatch(char[] pattern, char[] word, int matchRule) { return patternLength == wordLength && CharOperation.equals(pattern, word, false); case SearchPattern.R_PREFIX_MATCH : return patternLength <= wordLength && CharOperation.prefixEquals(pattern, word, false); + case SearchPattern.R_REGEXP_MATCH : + Pattern regexPattern = Pattern.compile(new String(pattern)); + return regexPattern.matcher(new String(word)).matches(); case SearchPattern.R_PATTERN_MATCH : return CharOperation.match(pattern, word, false); case SearchPattern.R_CAMELCASE_MATCH: diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java index f499b83941..73ecb57df5 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java @@ -1036,7 +1036,9 @@ public void saveIndexes() { } public void scheduleDocumentIndexing(final SearchDocument searchDocument, IPath container, final IndexLocation indexLocation, final SearchParticipant searchParticipant) { IPath targetLocation = JavaIndex.getLocationForPath(new Path(searchDocument.getPath())); - this.indexer.makeDirty(targetLocation); + if (targetLocation != null) { + this.indexer.makeDirty(targetLocation); + } request(new IndexRequest(container, this) { @Override public boolean execute(IProgressMonitor progressMonitor) { |