aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Dahlstrom <dahlstrom@google.com>2020-01-30 12:00:00 -0800
committerDana Dahlstrom <dahlstrom@google.com>2020-01-30 12:00:00 -0800
commit51eb787927ef5850ad61e9d365e286074b9d0123 (patch)
tree36a631fb364337c4375623d770802c3a1cefd224
parent05349e4b22689e4bd69834576a55b43eb7eb9161 (diff)
parentbed2f8da1eeb903c159b28ae9a3ab8f969858b40 (diff)
downloadjdk8u_langtools-51eb787927ef5850ad61e9d365e286074b9d0123.tar.gz
Merge tag jb8u232-b1638.6
Change-Id: Ibed2f8da1eeb903c159b28ae9a3ab8f969858b40
-rw-r--r--.hgtags21
-rw-r--r--THIRD_PARTY_README278
-rw-r--r--src/share/classes/com/sun/tools/javac/comp/Check.java6
-rw-r--r--src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java10
-rw-r--r--src/share/classes/com/sun/tools/javac/resources/compiler.properties5
-rw-r--r--src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java36
-rw-r--r--test/Makefile155
-rw-r--r--test/ProblemList.txt26
-rw-r--r--test/TEST.ROOT18
-rw-r--r--test/TEST.groups32
-rw-r--r--test/tools/javac/annotations/8218152/MalformedAnnotationProcessorTests.java158
-rw-r--r--test/tools/javac/diags/examples.not-yet.txt1
-rw-r--r--test/tools/javadoc/TestScriptInComment.java6
-rw-r--r--test/tools/javadoc/api/basic/GetTask_DocletClassTest.java1
14 files changed, 526 insertions, 227 deletions
diff --git a/.hgtags b/.hgtags
index cdbfde5b..46307aa6 100644
--- a/.hgtags
+++ b/.hgtags
@@ -1003,3 +1003,24 @@ f301c2612d6092ca64b0ba1807a07cf25941bc3b jdk8u212-b01
4c4c8a86bcb2130dca9581a9aad6a60c01bfeeb0 jdk8u212-b03
075e7154cddf75a861c657c6177797fdfbf36d3f jdk8u212-b04
4c4c8a86bcb2130dca9581a9aad6a60c01bfeeb0 jdk8u212-ga
+1f6b4d9449772ea511e1772c3bdd840e0e550e8c jdk8u222-b01
+d91f70a5eb9d97d2ec52d3d63a512030b151250c jdk8u222-b02
+12045c5cae334679b31386ddb790c3b7394525ea jdk8u222-b03
+a5c129168bd3a65209f0b3e53d13b04a5134f07f jdk8u222-b04
+2ad39b194cc1b7fa1f368b044e86f43a2b6552b1 jdk8u222-b05
+563e06335c252222c825a1fd67425b99581dbac2 jdk8u222-b06
+1b641cb01496dfa3d13b7587e76b22d76bfe51c6 jdk8u222-b07
+e5ee6728508d72b987758116d9b0a23e4f3830c1 jdk8u222-b08
+6aa4f05982eb70dc746f84a152c4e5e0b4a7261e jdk8u222-b09
+32df4483e2e387a85688bad69c398dc4c7bc2cfa jdk8u222-b10
+32df4483e2e387a85688bad69c398dc4c7bc2cfa jdk8u222-ga
+d859443cacf81207f0879e9f21810b102afdb240 jdk8u232-b01
+19908109cb37637cebab5d6e9cc6c151836cbc27 jdk8u232-b02
+671c4ba50c6f4f9780d40de2549d91f15fcb88d1 jdk8u232-b03
+3de2732a8241c8c85a85942f7341ad48491976d9 jdk8u232-b04
+415c49110391d46dbb9be24154c2ad1b4157790a jdk8u232-b05
+dd568d0e5e10a0dfc05ace7f16bbac5ad6eddde5 jdk8u232-b06
+3b3a43588afb9fbdb1b95c475a11d3529a3d9cb5 jdk8u232-b07
+4bc16c3608302128648e92c80f3b396372471383 jdk8u232-b08
+735048c9f2d6835b76a436beffd29565f28a2a36 jdk8u232-b09
+735048c9f2d6835b76a436beffd29565f28a2a36 jdk8u232-ga
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index 22473560..7dc54a05 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -1470,60 +1470,90 @@ included with JDK 8 and OpenJDK 8 source distributions.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to libpng 1.6.35, which may be
+%% This notice is provided with respect to libpng 1.6.37, which may be
included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+PNG Reference Library License version 2
+---------------------------------------
-If you modify libpng you may insert additional notices immediately following
-this sentence.
+ * Copyright (c) 1995-2019 The PNG Reference Library Authors.
+ * Copyright (c) 2018-2019 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
-This code is released under the libpng license.
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement. In no event shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
-libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the product
+ documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
+
+libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
- Simon-Pierre Cadieux
- Eric S. Raymond
- Mans Rullgard
- Cosmin Truta
- Gilles Vollant
- James Yu
- Mandar Sahastrabuddhe
- Google Inc.
- Vadim Barkov
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
+ Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
+ There is no warranty against interference with your enjoyment of
+ the library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is
+ with the user.
Some files in the "contrib" directory and some configure-generated
-files that are distributed with libpng have other copyright owners and
+files that are distributed with libpng have other copyright owners, and
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
-license as libpng-0.96, with the following individuals added to the list
-of Contributing Authors:
+license as libpng-0.96, with the following individuals added to the
+list of Contributing Authors:
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
@@ -1531,14 +1561,14 @@ and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
-Some files in the "scripts" directory have other copyright owners
+Some files in the "scripts" directory have other copyright owners,
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
@@ -1547,39 +1577,38 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose. The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
- 1. The origin of this source code must not be misrepresented.
-
- 2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
+ 1. The origin of this source code must not be misrepresented.
- 3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
-END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
+The Contributing Authors and Group 42, Inc. specifically permit,
+without fee, and encourage the use of this source code as a component
+to supporting the PNG file format in commercial products. If you use
+this source code in a product, acknowledgment is not required but would
+be appreciated.
TRADEMARK:
@@ -1612,7 +1641,7 @@ July 15, 2018
-------------------------------------------------------------------------------
-%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3,
+%% This notice is provided with respect to GIFLIB 5.1.8 & libungif 4.1.3,
which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1682,7 +1711,7 @@ which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions.
--- begin of LICENSE ---
Mesa 3-D graphics library
- Version: 4.1
+ Version: 5.0
Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
@@ -2101,13 +2130,13 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
-------------------------------------------------------------------------------
-%% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
+%% This notice is provided with respect to PC/SC Lite v1.8.24,
which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
--- begin of LICENSE ---
-Copyright (c) 1999-2004 David Corcoran <corcoran@linuxnet.com>
-Copyright (c) 1999-2004 Ludovic Rousseau <ludovic.rousseau (at) free.fr>
+Copyright (c) 1999-2003 David Corcoran <corcoran@linuxnet.com>
+Copyright (c) 2001-2011 Ludovic Rousseau <ludovic.rousseau@free.fr>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -2119,15 +2148,10 @@ are met:
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by:
- David Corcoran <corcoran@linuxnet.com>
- http://www.linuxnet.com (MUSCLE)
-4. The name of the author may not be used to endorse or promote products
+3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
-Changes to this license can be made only by the copyright author with
+Changes to this license can be made only by the copyright author with
explicit written consent.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
@@ -2797,61 +2821,8 @@ Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from the X Consortium.
-___________________________
-The files in motif/lib/Xm/util included this copyright:mkdirhier.man,
-xmkmf.man, chownxterm.c, makeg.man, mergelib.cpp, lndir.man, makestrs.man,
-checktree.c, lndir.c, makestrs.c
-Copyright (c) 1993, 1994 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not
-be used in advertising or otherwise to promote the sale, use or other
-dealing in this Software without prior written authorization from the
-X Consortium.
-_____________________________
-Xmos_r.h:
-/*
-Copyright (c) 1996 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-*/
+--- end of LICENSE ---
_____________________________
Copyright notice for HPkeysym.h:
/*
@@ -2906,55 +2877,6 @@ consequential damages in connection with the furnishing,
performance, or use of this material.
*/
-_____________________________________
-Copyright notice in keysym2ucs.h:
-
-Copyright 1987, 1994, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
-
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-*/
--- end of LICENSE ---
@@ -3000,7 +2922,7 @@ included with JRE 8, JDK 8, and OpenJDK 8.
Apache Jakarta BCEL 5.1
Apache Jakarta Regexp 1.4
Apache Santuario XML Security for Java 1.5.4
- Apache Xalan-Java 2.7.1
+ Apache Xalan-Java 2.7.2
Apache Xerces Java 2.10.0
Apache XML Resolver 1.1
diff --git a/src/share/classes/com/sun/tools/javac/comp/Check.java b/src/share/classes/com/sun/tools/javac/comp/Check.java
index d5e9c47a..82fd354f 100644
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/src/share/classes/com/sun/tools/javac/comp/Check.java
@@ -2340,7 +2340,9 @@ public class Check {
List<MethodSymbol> potentiallyAmbiguousList = List.nil();
boolean overridesAny = false;
- for (Symbol m1 : types.membersClosure(site, false).getElementsByName(sym.name, cf)) {
+ ArrayList<Symbol> symbolsByName = new ArrayList<>();
+ types.membersClosure(site, false).getElementsByName(sym.name, cf).forEach(symbolsByName::add);
+ for (Symbol m1 : symbolsByName) {
if (!sym.overrides(m1, site.tsym, types, false)) {
if (m1 == sym) {
continue;
@@ -2358,7 +2360,7 @@ public class Check {
}
//...check each method m2 that is a member of 'site'
- for (Symbol m2 : types.membersClosure(site, false).getElementsByName(sym.name, cf)) {
+ for (Symbol m2 : symbolsByName) {
if (m2 == m1) continue;
//if (i) the signature of 'sym' is not a subsignature of m1 (seen as
//a member of 'site') and (ii) m1 has the same erasure as m2, issue an error
diff --git a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
index 54942c46..ec931cbd 100644
--- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
+++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -350,6 +350,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
log.error("proc.bad.config.file", sce.getLocalizedMessage());
throw new Abort(sce);
} catch (Throwable t) {
+ log.error("proc.bad.config.file", t.getLocalizedMessage());
throw new Abort(t);
}
}
@@ -360,7 +361,14 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
} catch (ServiceConfigurationError sce) {
log.error("proc.bad.config.file", sce.getLocalizedMessage());
throw new Abort(sce);
+ } catch (UnsupportedClassVersionError ucve) {
+ log.error("proc.cant.load.class", ucve.getLocalizedMessage());
+ throw new Abort(ucve);
+ } catch (ClassFormatError cfe) {
+ log.error("proc.cant.load.class", cfe.getLocalizedMessage());
+ throw new Abort(cfe);
} catch (Throwable t) {
+ log.error("proc.bad.config.file", t.getLocalizedMessage());
throw new Abort(t);
}
}
diff --git a/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/share/classes/com/sun/tools/javac/resources/compiler.properties
index 3e3af9ca..1d447c49 100644
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -869,6 +869,9 @@ compiler.err.proc.service.problem=\
compiler.err.proc.bad.config.file=\
Bad service configuration file, or exception thrown while constructing Processor object: {0}
+compiler.err.proc.cant.load.class=\
+ Could not load processor class file due to ''{0}''.
+
compiler.err.proc.cant.create.loader=\
Could not create class loader for annotation processors: {0}
diff --git a/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java b/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java
index 2ef0d7a2..fa94444b 100644
--- a/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java
+++ b/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java
@@ -68,12 +68,10 @@ public class JavaScriptScanner {
private boolean newline = true;
Map<String, TagParser> tagParsers;
- Set<String> eventAttrs;
Set<String> uriAttrs;
public JavaScriptScanner() {
initTagParsers();
- initEventAttrs();
initURIAttrs();
}
@@ -100,7 +98,11 @@ public class JavaScriptScanner {
private void checkHtmlAttr(String name, String value) {
String n = name.toLowerCase(Locale.ENGLISH);
- if (eventAttrs.contains(n)
+ // https://www.w3.org/TR/html52/fullindex.html#attributes-table
+ // See https://www.w3.org/TR/html52/webappapis.html#events-event-handlers
+ // An event handler has a name, which always starts with "on" and is followed by
+ // the name of the event for which it is intended.
+ if (n.startsWith("on")
|| uriAttrs.contains(n)
&& value != null && value.toLowerCase(Locale.ENGLISH).trim().startsWith("javascript:")) {
reporter.report();
@@ -1060,34 +1062,6 @@ public class JavaScriptScanner {
}
- private void initEventAttrs() {
- eventAttrs = new HashSet<>(Arrays.asList(
- // See https://www.w3.org/TR/html-markup/global-attributes.html#common.attrs.event-handler
- "onabort", "onblur", "oncanplay", "oncanplaythrough",
- "onchange", "onclick", "oncontextmenu", "ondblclick",
- "ondrag", "ondragend", "ondragenter", "ondragleave",
- "ondragover", "ondragstart", "ondrop", "ondurationchange",
- "onemptied", "onended", "onerror", "onfocus", "oninput",
- "oninvalid", "onkeydown", "onkeypress", "onkeyup",
- "onload", "onloadeddata", "onloadedmetadata", "onloadstart",
- "onmousedown", "onmousemove", "onmouseout", "onmouseover",
- "onmouseup", "onmousewheel", "onpause", "onplay",
- "onplaying", "onprogress", "onratechange", "onreadystatechange",
- "onreset", "onscroll", "onseeked", "onseeking",
- "onselect", "onshow", "onstalled", "onsubmit", "onsuspend",
- "ontimeupdate", "onvolumechange", "onwaiting",
-
- // See https://www.w3.org/TR/html4/sgml/dtd.html
- // Most of the attributes that take a %Script are also defined as event handlers
- // in HTML 5. The one exception is onunload.
- // "onchange", "onclick", "ondblclick", "onfocus",
- // "onkeydown", "onkeypress", "onkeyup", "onload",
- // "onmousedown", "onmousemove", "onmouseout", "onmouseover",
- // "onmouseup", "onreset", "onselect", "onsubmit",
- "onunload"
- ));
- }
-
private void initURIAttrs() {
uriAttrs = new HashSet<>(Arrays.asList(
// See https://www.w3.org/TR/html4/sgml/dtd.html
diff --git a/test/Makefile b/test/Makefile
index 2238b291..7815edf1 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -16,6 +16,44 @@
# JPRT may invoke this Makefile directly, as part of a langtools build,
# or indirectly, via FOREST/test/Makefile, as part of a control build.
+
+# Utilities used
+AWK = awk
+CAT = cat
+CD = cd
+CHMOD = chmod
+CP = cp
+CUT = cut
+DIRNAME = dirname
+ECHO = echo
+EGREP = egrep
+EXPAND = expand
+FIND = find
+MKDIR = mkdir
+PWD = pwd
+SED = sed
+SORT = sort
+TEE = tee
+UNAME = uname
+UNIQ = uniq
+WC = wc
+ZIP = zip
+
+# Get OS name from uname (Cygwin inexplicably adds _NT-5.1)
+UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_)
+
+# Commands to run on paths to make mixed paths for java on windows
+ifeq ($(UNAME_S), CYGWIN)
+ # Location of developer shared files
+ SLASH_JAVA = J:
+ GETMIXEDPATH = cygpath -m
+else
+ # Location of developer shared files
+ SLASH_JAVA = /java
+
+ GETMIXEDPATH=$(ECHO)
+endif
+
# Get OS/ARCH specifics
OSNAME = $(shell uname -s)
ifeq ($(OSNAME), SunOS)
@@ -183,7 +221,7 @@ ifdef JTREG_TIMEOUT_FACTOR
endif
# Default verbosity setting for jtreg
-JTREG_VERBOSE = fail,error,nopass
+JTREG_VERBOSE = fail,error,summary
# Default verbosity setting for jck
JCK_VERBOSE = non-pass
@@ -218,14 +256,16 @@ TESTDIRS = $(DEFAULT_TESTDIRS)
# Root of all test results
TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
-ABS_TEST_OUTPUT_DIR := \
- $(shell mkdir -p $(TEST_OUTPUT_DIR); \
- cd $(TEST_OUTPUT_DIR); \
- pwd $(CYGPATH))
+ifdef ALT_OUTPUTDIR
+ ABS_OUTPUTDIR := $(shell cd $(ALT_OUTPUTDIR) && pwd $(CYGPATH))
+else
+ ABS_OUTPUTDIR := $(shell mkdir -p $(TEST_OUTPUT_DIR); cd $(TEST_OUTPUT_DIR) && pwd $(CYGPATH))
+endif
+ABS_TEST_OUTPUT_DIR := $(ABS_OUTPUTDIR)/testoutput/$(UNIQUE_DIR)
# Subdirectories for different test runs
-JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
-JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
-JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
+JTREG_OUTPUT_DIR = $(ABS_OUTPUTDIR)/jtreg
+JCK_COMPILER_OUTPUT_DIR = $(ABS_OUTPUTDIR)/jck-compiler
+JCK_RUNTIME_OUTPUT_DIR = $(ABS_OUTPUTDIR)/jck-runtime-Xcompile
# Default make rule -- warning, may take a while
all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary
@@ -240,6 +280,8 @@ jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compil
jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
@echo "Testing completed successfully"
+tier1: jtreg-tests-tier1
+
# for use with JPRT -testrule
all: JTREG_TESTDIRS = .
jtreg: JTREG_TESTDIRS = .
@@ -305,7 +347,6 @@ jtreg-summary: FRC
# Check to make sure these directories exist
check-jtreg: $(PRODUCT_HOME) $(JTREG)
-
# Run JCK-compiler tests
#
# JCK_HOME
@@ -434,11 +475,105 @@ clean:
# Used to force a target rules to run
FRC:
+#
+# Tier 1 langtools testing logic
+#
+
+ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
+
+# How to create the test bundle (pass or fail, we want to create this)
+# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
+ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \
+ && $(CD) $(ABS_TEST_OUTPUT_DIR) \
+ && $(CHMOD) -R a+r . \
+ && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
+
+# important results files
+SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt")
+STATS_TXT_NAME = Stats.txt
+STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)")
+RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt")
+PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt")
+FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/faillist.txt")
+EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/exitcode.txt")
+
+TESTEXIT = \
+ if [ ! -s $(EXITCODE) ] ; then \
+ $(ECHO) "ERROR: EXITCODE file not filled in."; \
+ $(ECHO) "1" > $(EXITCODE); \
+ fi ; \
+ testExitCode=`$(CAT) $(EXITCODE)`; \
+ $(ECHO) "EXIT CODE: $${testExitCode}"; \
+ exit $${testExitCode}
+
+BUNDLE_UP_AND_EXIT = \
+( \
+ jtregExitCode=$$? && \
+ _summary="$(SUMMARY_TXT)"; \
+ $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
+ $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
+ if [ -r "$${_summary}" ] ; then \
+ $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
+ $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
+ $(EGREP) ' Passed\.' $(RUNLIST) \
+ | $(EGREP) -v ' Error\.' \
+ | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
+ ( $(EGREP) ' Failed\.' $(RUNLIST); \
+ $(EGREP) ' Error\.' $(RUNLIST); \
+ $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
+ | $(SORT) | $(UNIQ) > $(FAILLIST); \
+ if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
+ $(EXPAND) $(FAILLIST) \
+ | $(CUT) -d' ' -f1 \
+ | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
+ if [ $${jtregExitCode} = 0 ] ; then \
+ jtregExitCode=1; \
+ fi; \
+ fi; \
+ runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+ passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+ failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+ exclc="FIXME CODETOOLS-7900176"; \
+ $(ECHO) "TEST STATS: name=$(UNIQUE_DIR) run=$${runc} pass=$${passc} fail=$${failc}" \
+ >> $(STATS_TXT); \
+ else \
+ $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
+ fi; \
+ if [ -f $(STATS_TXT) ] ; then \
+ $(CAT) $(STATS_TXT); \
+ fi; \
+ $(ZIP_UP_RESULTS) ; \
+ $(TESTEXIT) \
+)
+
+prep-tier1:
+ @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
+
+# Run tier1 jtreg
+jtreg-tests-tier1: check-jtreg prep-tier1 FRC
+ ( \
+ ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
+ export JT_HOME; \
+ $(shell $(GETMIXEDPATH) "$(JTREG)") \
+ -J-Xmx512m \
+ -vmoption:-Xmx768m \
+ -a -ignore:quiet $(if $(JTREG_VERBOSE),-v:$(JTREG_VERBOSE)) \
+ -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \
+ -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork") \
+ -jdk:$(shell $(GETMIXEDPATH) "$(TESTJAVA)") \
+ $(JAVA_ARGS:%=-vmoption:%) \
+ $(JTREG_OPTIONS) \
+ :langtools_tier1 \
+ ) ; \
+ $(BUNDLE_UP_AND_EXIT) \
+ ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
+
# Phony targets (e.g. these are not filenames)
.PHONY: all clean \
jtreg javac javadoc javah javap jdeps jtreg-tests jtreg-summary check-jtreg \
jck-compiler jck-compiler-tests jck-compiler-summary \
- jck-runtime jck-runtime-tests jck-runtime-summary check-jck
+ jck-runtime jck-runtime-tests jck-runtime-summary check-jck prep-tier1 \
+ jtreg-tests-tier1 tier1
# No use of suffix rules
.SUFFIXES:
diff --git a/test/ProblemList.txt b/test/ProblemList.txt
new file mode 100644
index 00000000..434b3ff4
--- /dev/null
+++ b/test/ProblemList.txt
@@ -0,0 +1,26 @@
+###########################################################################
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+###########################################################################
+
+# No langtools tests are on the problem list.
diff --git a/test/TEST.ROOT b/test/TEST.ROOT
index 6512c340..f26bcb43 100644
--- a/test/TEST.ROOT
+++ b/test/TEST.ROOT
@@ -1,6 +1,18 @@
# This file identifies the root of the test-suite hierarchy.
# It also contains test-suite configuration information.
-# DO NOT EDIT without first contacting jdk-regtest@sun.com.
-# The list of keywords supported in the entire test suite
-keys=2d dnd i18n
+# The list of keywords supported in the entire test suite. The
+# "intermittent" keyword marks tests known to fail intermittently.
+# The "randomness" keyword marks tests using randomness with test
+# cases differing from run to run. (A test using a fixed random seed
+# would not count as "randomness" by this definition.) Extra care
+# should be taken to handle test failures of intermittent or
+# randomness tests.
+
+keys=intermittent randomness
+
+# Group definitions
+groups=TEST.groups
+
+# Tests using jtreg 4.1 b11 features
+requiredVersion=4.1 b11
diff --git a/test/TEST.groups b/test/TEST.groups
new file mode 100644
index 00000000..01d148e7
--- /dev/null
+++ b/test/TEST.groups
@@ -0,0 +1,32 @@
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Tiered testing definitions
+
+# All langtools tests are tier 1
+langtools_tier1 = \
+ tools \
+ com \
+ lib
+
+# No langtools tests are tier 2
+langtools_tier2 =
diff --git a/test/tools/javac/annotations/8218152/MalformedAnnotationProcessorTests.java b/test/tools/javac/annotations/8218152/MalformedAnnotationProcessorTests.java
new file mode 100644
index 00000000..19b8c60c
--- /dev/null
+++ b/test/tools/javac/annotations/8218152/MalformedAnnotationProcessorTests.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8218152
+ * @summary A bad annotation processor class file should fail with an error
+ * @author Steven Groeger
+ *
+ * @library /tools/javac/lib
+ * @build ToolBox
+ * @run main MalformedAnnotationProcessorTests
+ */
+
+import java.io.*;
+import java.util.*;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import javax.annotation.processing.Processor;
+
+public class MalformedAnnotationProcessorTests {
+ public static void main(String... args) throws Exception {
+ new MalformedAnnotationProcessorTests().run();
+ }
+
+ void run() throws Exception {
+ testBadAnnotationProcessor(Paths.get("."));
+ testMissingAnnotationProcessor(Paths.get("."));
+ testWrongClassFileVersion(Paths.get("."));
+ }
+
+ public void testBadAnnotationProcessor(Path base) throws Exception {
+ Path apDir = base.resolve("annoprocessor");
+ ToolBox.writeFile(apDir.resolve("META-INF").resolve("services")
+ .resolve(Processor.class.getCanonicalName()), "BadAnnoProcessor");
+ ToolBox.writeFile(apDir.resolve("BadAnnoProcessor.class"), "badannoprocessor");
+
+ Path classes = base.resolve("classes");
+ Files.createDirectories(classes);
+
+ List<String> actualErrors = new ArrayList<>();
+ ToolBox.JavaToolArgs args = new ToolBox.JavaToolArgs();
+ args.setSources("package test; public class Test {}")
+ .appendArgs("-XDrawDiagnostics",
+ "-d", classes.toString(),
+ "-classpath", "",
+ "-processorpath", apDir.toString())
+ .set(ToolBox.Expect.FAIL)
+ .setErrOutput(actualErrors);
+ ToolBox.javac(args);
+
+ System.out.println(actualErrors.get(0));
+ if (!actualErrors.get(0).contains("- compiler.err.proc.cant.load.class: " +
+ "Incompatible magic value")) {
+ throw new AssertionError("Unexpected errors reported: " + actualErrors);
+ }
+ }
+
+ public void testMissingAnnotationProcessor(Path base) throws Exception {
+ Path apDir = base.resolve("annoprocessor");
+ ToolBox.writeFile(apDir.resolve("META-INF").resolve("services").resolve(Processor.class.getCanonicalName()),
+ "MissingAnnoProcessor");
+
+ Path classes = base.resolve("classes");
+ Files.createDirectories(classes);
+
+ List<String> actualErrors = new ArrayList<>();
+ ToolBox.JavaToolArgs args = new ToolBox.JavaToolArgs();
+ args.setSources("package test; public class Test {}")
+ .appendArgs("-XDrawDiagnostics",
+ "-d", classes.toString(),
+ "-classpath", "",
+ "-processorpath", apDir.toString())
+ .set(ToolBox.Expect.FAIL)
+ .setErrOutput(actualErrors);
+ ToolBox.javac(args);
+
+ if (!actualErrors.get(0).contains("- compiler.err.proc.bad.config.file: " +
+ "javax.annotation.processing.Processor: Provider MissingAnnoProcessor not found")) {
+ throw new AssertionError("Unexpected errors reported: " + actualErrors);
+ }
+ }
+
+ public void testWrongClassFileVersion(Path base) throws Exception {
+ Path apDir = base.resolve("annoprocessor");
+ ToolBox.writeFile(apDir.resolve("META-INF").resolve("services").resolve(Processor.class.getCanonicalName()),
+ "WrongClassFileVersion");
+
+ ToolBox.JavaToolArgs args = new ToolBox.JavaToolArgs();
+ args.setSources("class WrongClassFileVersion {}")
+ .appendArgs("-d", apDir.toString())
+ .set(ToolBox.Expect.SUCCESS);
+ ToolBox.javac(args);
+
+ increaseMajor(apDir.resolve("WrongClassFileVersion.class"), 1);
+
+ Path classes = base.resolve("classes");
+ Files.createDirectories(classes);
+
+ List<String> actualErrors = new ArrayList<>();
+ args = new ToolBox.JavaToolArgs();
+ args.setSources("package test; public class Test {}")
+ .appendArgs("-XDrawDiagnostics",
+ "-d", classes.toString(),
+ "-classpath", "",
+ "-processorpath", apDir.toString())
+ .set(ToolBox.Expect.FAIL)
+ .setErrOutput(actualErrors);
+ ToolBox.javac(args);
+
+ if (!actualErrors.get(0).contains("- compiler.err.proc.cant.load.class: " +
+ "WrongClassFileVersion has been compiled by a more recent version")) {
+ throw new AssertionError("Unexpected errors reported: " + actualErrors);
+ }
+ }
+
+ // Increase class file cfile's major version by delta
+ // (note: based on test/langtools/tools/javac/6330997/T6330997.java)
+ static void increaseMajor(Path cfile, int delta) {
+ try (RandomAccessFile cls =
+ new RandomAccessFile(cfile.toFile(), "rw");
+ FileChannel fc = cls.getChannel()) {
+ ByteBuffer rbuf = ByteBuffer.allocate(2);
+ fc.read(rbuf, 6);
+ ByteBuffer wbuf = ByteBuffer.allocate(2);
+ wbuf.putShort(0, (short)(rbuf.getShort(0) + delta));
+ fc.write(wbuf, 6);
+ fc.force(false);
+ } catch (Exception e){
+ throw new RuntimeException("Failed: unexpected exception");
+ }
+ }
+}
diff --git a/test/tools/javac/diags/examples.not-yet.txt b/test/tools/javac/diags/examples.not-yet.txt
index 0e042275..a0abe067 100644
--- a/test/tools/javac/diags/examples.not-yet.txt
+++ b/test/tools/javac/diags/examples.not-yet.txt
@@ -32,6 +32,7 @@ compiler.err.proc.cant.create.loader # security exception fro
compiler.err.proc.no.service # JavacProcessingEnvironment: no service loader available
compiler.err.proc.processor.bad.option.name # cannot happen? masked by javac.err.invalid.A.key
compiler.err.proc.service.problem # JavacProcessingEnvironment: catch Throwable from service loader
+compiler.err.proc.cant.load.class # JavacProcessingEnvironment: cant load the class/jar file
compiler.err.signature.doesnt.match.intf # UNUSED
compiler.err.signature.doesnt.match.supertype # UNUSED
compiler.err.source.cant.overwrite.input.file
diff --git a/test/tools/javadoc/TestScriptInComment.java b/test/tools/javadoc/TestScriptInComment.java
index bda3aca7..e16a5502 100644
--- a/test/tools/javadoc/TestScriptInComment.java
+++ b/test/tools/javadoc/TestScriptInComment.java
@@ -25,7 +25,7 @@
/**
* @test
- * @bug 8138725
+ * @bug 8138725 8226765
* @summary test --allow-script-in-comments
* @run main TestScriptInComment
*/
@@ -65,6 +65,10 @@ public class TestScriptInComment {
WS("< script >#ALERT</script>", false, "-Xdoclint:none"), // script tag with invalid white space
SA("<script src=\"file\"> #ALERT </script>", true), // script tag with an attribute
ON("<a onclick='#ALERT'>x</a>", true), // event handler attribute
+ OME("<img alt='1' onmouseenter='#ALERT'>", true), // onmouseenter event handler attribute
+ OML("<img alt='1' onmouseleave='#ALERT'>", true), // onmouseleave event handler attribute
+ OFI("<a href='#' onfocusin='#ALERT'>x</a>", true), // onfocusin event handler attribute
+ OBE("<a onbogusevent='#ALERT'>x</a>", true), // bogus/future event handler attribute
URI("<a href='javascript:#ALERT'>x</a>", true); // javadcript URI
/**
diff --git a/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java b/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java
index c5085043..bc8858a8 100644
--- a/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java
+++ b/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java
@@ -27,6 +27,7 @@
* @summary javadoc should have a javax.tools.Tool service provider
* @build APITest
* @run main GetTask_DocletClassTest
+ * @key randomness
*/
import com.sun.javadoc.DocErrorReporter;