diff --git a/.hgtags b/.hgtags index a9515ecb57f..555f758c163 100644 --- a/.hgtags +++ b/.hgtags @@ -377,3 +377,4 @@ e613affb88d178dc7c589f1679db113d589bddb4 jdk-9+130 2e83d21d78cd9c1d52e6cd2599e9c8aa36ea1f52 jdk-9+132 e17429a7e843c4a4ed3651458d0f950970edcbcc jdk-9+133 a71210c0d9800eb6925b61ecd6198abd554f90ee jdk-9+134 +e384420383a5b79fa0012ebcb25d8f83cff7f777 jdk-9+135 diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 0c614608939..c9694066072 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -377,3 +377,4 @@ d94d54a3192fea79234c3ac55cd0b4052d45e954 jdk-9+130 a24702d4d5ab0015a5c553ed57f66fce7d85155e jdk-9+132 be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133 065724348690eda41fc69112278d8da6dcde548c jdk-9+134 +82b94cb5f342319d2cda77f9fa59703ad7fde576 jdk-9+135 diff --git a/corba/.hgtags b/corba/.hgtags index ee81ced5edd..3b09618de85 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -377,3 +377,4 @@ f7e1d5337c2e550fe553df7a3886bbed80292ecd jdk-9+131 1ab4b9399c4cba584f66c1c088188f2f565fbf9c jdk-9+132 2021bfedf1c478a4808a7711a6090682a12f4c0e jdk-9+133 1a497f5ca0cfd88115cc7daa8af8a62b8741caf2 jdk-9+134 +094d0db606db976045f594dba47d4593b715cc81 jdk-9+135 diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 4cc7243b9ce..a52c2a2a2da 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -537,3 +537,4 @@ e96b34b76d863ed1fa04e0eeb3f297ac17b490fd jdk-9+129 713951c08aa26813375175c2ab6cc99ff2a56903 jdk-9+132 a25e0fb6033245ab075136e744d362ce765464cd jdk-9+133 b8b694c6b4d2ab0939aed7adaf0eec1ac321a085 jdk-9+134 +3b1c4562953db47e36b237a500f368d5c9746d47 jdk-9+135 diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 25362b9eae8..19adf3a8769 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -377,3 +377,4 @@ e66cdc2de6b02443911d386fc9217b0d824d0686 jdk-9+130 907445d85e680ea410fe2c83c0ec64b5508e4f3e jdk-9+132 9490ba2e5e41685c858a0ca2a6ec87611eb011c6 jdk-9+133 1c6c21d87aa459d82425e1fddc9ce8647aebde34 jdk-9+134 +f695240370c77a25fed88225a392e7d530cb4d78 jdk-9+135 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TransletOutput.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TransletOutput.java index 99911f99628..4ca60383ea3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TransletOutput.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TransletOutput.java @@ -1,13 +1,14 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ + /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TransletOutput.java,v 1.2.4.1 2005/09/05 09:19:44 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; @@ -35,6 +33,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; +import jdk.xml.internal.JdkXmlFeatures; /** * @author Morten Jorgensen @@ -103,8 +102,10 @@ final class TransletOutput extends Instruction { final InstructionList il = methodGen.getInstructionList(); final boolean isSecureProcessing = classGen.getParser().getXSLTC() .isSecureProcessing(); + final boolean isExtensionFunctionEnabled = classGen.getParser().getXSLTC() + .getFeature(JdkXmlFeatures.XmlFeature.ENABLE_EXTENSION_FUNCTION); - if (isSecureProcessing) { + if (isSecureProcessing && !isExtensionFunctionEnabled) { int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "unallowed_extension_elementF", "(Ljava/lang/String;)V"); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java index 98db772821e..f47a3eb2305 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java @@ -111,6 +111,9 @@ public abstract class AbstractTranslet implements Translet { private boolean _useServicesMechanism; + // The OutputStream for redirect function + private FileOutputStream output = null; + /** * protocols allowed for external references set by the stylesheet processing instruction, Document() function, Import and Include element. */ @@ -567,9 +570,10 @@ public abstract class AbstractTranslet implements Translet { dir.mkdirs(); } + output = new FileOutputStream(filename, append); factory.setEncoding(_encoding); factory.setOutputMethod(_method); - factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); + factory.setOutputStream(new BufferedOutputStream(output)); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler @@ -594,6 +598,9 @@ public abstract class AbstractTranslet implements Translet { try { handler.endDocument(); handler.close(); + if (output != null) { + output.close(); + } } catch (Exception e) { // what can you do? diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java index bc98084c55b..82ea2e17329 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java @@ -1072,4 +1072,3 @@ public abstract class XMLGregorianCalendar @Override public abstract Object clone(); } - diff --git a/jaxp/src/java.xml/share/classes/module-info.java b/jaxp/src/java.xml/share/classes/module-info.java index 40ca6421302..2e21ed692cf 100644 --- a/jaxp/src/java.xml/share/classes/module-info.java +++ b/jaxp/src/java.xml/share/classes/module-info.java @@ -92,4 +92,3 @@ module java.xml { uses javax.xml.xpath.XPathFactory; uses org.xml.sax.XMLReader; } - diff --git a/jaxp/src/jdk.xml.dom/share/classes/module-info.java b/jaxp/src/jdk.xml.dom/share/classes/module-info.java index a75c8f36b78..af8529c3f80 100644 --- a/jaxp/src/jdk.xml.dom/share/classes/module-info.java +++ b/jaxp/src/jdk.xml.dom/share/classes/module-info.java @@ -30,4 +30,3 @@ module jdk.xml.dom { exports org.w3c.dom.stylesheets; exports org.w3c.dom.xpath; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/DurationTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/DurationTest.java index 2a27b942859..057414557a0 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/DurationTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/DurationTest.java @@ -587,4 +587,3 @@ public class DurationTest { private final BigInteger one = BigInteger.ONE; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/FactoryNewInstanceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/FactoryNewInstanceTest.java index 8f21a2b23a1..26aada36bcf 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/FactoryNewInstanceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/FactoryNewInstanceTest.java @@ -77,4 +77,3 @@ public class FactoryNewInstanceTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/XMLGregorianCalendarTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/XMLGregorianCalendarTest.java index bd98ec9690d..2f0281013fa 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/XMLGregorianCalendarTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/XMLGregorianCalendarTest.java @@ -358,4 +358,3 @@ public class XMLGregorianCalendarTest { private final int undef = DatatypeConstants.FIELD_UNDEFINED; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java index 9eec7901ffd..be2dcba2f4e 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DBFNamespaceTest.java @@ -105,5 +105,3 @@ public class DBFNamespaceTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderFactoryTest.java index 2419a23241e..bc5cc4c9fcc 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderFactoryTest.java @@ -531,5 +531,3 @@ public class DocumentBuilderFactoryTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderImpl01.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderImpl01.java index e805094f887..65028a582fc 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderImpl01.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/DocumentBuilderImpl01.java @@ -157,5 +157,3 @@ public class DocumentBuilderImpl01 implements EntityResolver { return null; } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/FactoryConfErrorTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/FactoryConfErrorTest.java index 32c25b30c0b..43527cf721a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/FactoryConfErrorTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/FactoryConfErrorTest.java @@ -86,5 +86,3 @@ public class FactoryConfErrorTest { DocumentBuilderFactory.newInstance(); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXFactoryNewInstanceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXFactoryNewInstanceTest.java index e4db5b4e3a2..aa8ba1337bb 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXFactoryNewInstanceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXFactoryNewInstanceTest.java @@ -78,5 +78,3 @@ public class SAXFactoryNewInstanceTest { } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserFactTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserFactTest.java index 6b8245a43cc..c294abe51fb 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserFactTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserFactTest.java @@ -229,5 +229,3 @@ public class SAXParserFactTest { assertFalse(spf.getFeature(EXTERNAL_P_ENTITIES)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest.java index adc1b657c23..ed702b24ec9 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest.java @@ -502,5 +502,3 @@ public class SAXParserTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest02.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest02.java index d7efae1b51a..1c7f410615f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest02.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest02.java @@ -269,5 +269,3 @@ public class SAXParserTest02 { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest03.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest03.java index e16a070bc2a..94273e722ee 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest03.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/parsers/ptests/SAXParserTest03.java @@ -116,5 +116,3 @@ public class SAXParserTest03 { } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java index 9d588c3dea0..b272cd10cac 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java @@ -82,4 +82,3 @@ public class XMLEventFactoryNewInstanceTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLInputFactoryNewInstanceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLInputFactoryNewInstanceTest.java index b983d76a7d8..9b77ac4b1af 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLInputFactoryNewInstanceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLInputFactoryNewInstanceTest.java @@ -82,4 +82,3 @@ public class XMLInputFactoryNewInstanceTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/Bug6384418Test.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/Bug6384418Test.java index 8fce6a80440..e3e46791768 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/Bug6384418Test.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/Bug6384418Test.java @@ -67,5 +67,3 @@ public class Bug6384418Test { } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/DOMResultTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/DOMResultTest.java index b1a86f73e64..b1a65ec6e9e 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/DOMResultTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/DOMResultTest.java @@ -118,5 +118,3 @@ public class DOMResultTest { writeNodes(kids.item(i), bWriter); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/ErrorListenerTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/ErrorListenerTest.java index 7d01e52de9a..eb9de80edc4 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/ErrorListenerTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/ErrorListenerTest.java @@ -104,5 +104,3 @@ public class ErrorListenerTest implements ErrorListener { this.status = ListenerStatus.FATAL; } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXSourceTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXSourceTest.java index 81f97cd909e..843b5571dbb 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXSourceTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXSourceTest.java @@ -105,5 +105,3 @@ public class SAXSourceTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest.java index 4721e7c9a61..16f2ba1b0e5 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest.java @@ -431,5 +431,3 @@ public class SAXTFactoryTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/StreamResultTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/StreamResultTest.java index 832c5383e29..cfa6d59a587 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/StreamResultTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/StreamResultTest.java @@ -106,5 +106,3 @@ public class StreamResultTest { }); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TfClearParamTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TfClearParamTest.java index b30cd90e4fc..10867c9f0d2 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TfClearParamTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TfClearParamTest.java @@ -239,5 +239,3 @@ public class TfClearParamTest { assertNull(transformer.getParameter(LONG_PARAM_NAME)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformTest.java index 038bb168407..b98272896cf 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformTest.java @@ -384,5 +384,3 @@ public class TransformTest { private Document xmlDoc; } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerExcpTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerExcpTest.java index 58d60763db5..cf70fdee7b3 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerExcpTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerExcpTest.java @@ -105,5 +105,3 @@ public class TransformerExcpTest { assertNotNull(te.initCause(null)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerFactoryTest.java index ae8a2bc6b8f..5f1fbb29500 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerFactoryTest.java @@ -141,5 +141,3 @@ public class TransformerFactoryTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java index a8d7e4705a7..14d463e4dae 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java @@ -207,5 +207,3 @@ class MyErrorListener implements ErrorListener { System.out.println(" In fatal"); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest02.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest02.java index 3a9a058abcb..57d47c2c72a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest02.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest02.java @@ -85,5 +85,3 @@ public class TransformerTest02 { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest03.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest03.java index d0330a783ec..3ea3b1b8639 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest03.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest03.java @@ -94,5 +94,3 @@ public class TransformerTest03 { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/URIResolverTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/URIResolverTest.java index d595b485115..c7c7fc3ee13 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/URIResolverTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/URIResolverTest.java @@ -262,5 +262,3 @@ public class URIResolverTest implements URIResolver { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/othervm/TFCErrorTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/othervm/TFCErrorTest.java index f86d4b90fdc..e0471aeb160 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/othervm/TFCErrorTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/othervm/TFCErrorTest.java @@ -54,5 +54,3 @@ public class TFCErrorTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/SchemaFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/SchemaFactoryTest.java index f18588acbaa..c3a12612a05 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/SchemaFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/SchemaFactoryTest.java @@ -404,4 +404,3 @@ public class SchemaFactoryTest { private Document xsdDoc2; private byte[] xml; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/TypeInfoProviderTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/TypeInfoProviderTest.java index 782981a49be..bc2b818fba7 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/TypeInfoProviderTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/TypeInfoProviderTest.java @@ -95,4 +95,3 @@ public class TypeInfoProviderTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorHandlerTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorHandlerTest.java index b80a9f5047e..686abe494c3 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorHandlerTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorHandlerTest.java @@ -148,4 +148,3 @@ public class ValidatorHandlerTest { private Schema schema; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorTest.java index 17015bf9cc7..ec50dd50bb5 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/validation/ptests/ValidatorTest.java @@ -209,4 +209,3 @@ public class ValidatorTest { private Document xmlDoc; } - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java index 585804cf995..4a7dca37be0 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java @@ -491,5 +491,3 @@ public class XPathExpressionTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFactoryTest.java index 517fecc020c..8a9c51aa284 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFactoryTest.java @@ -218,5 +218,3 @@ public class XPathFactoryTest { assertNotNull(XPathFactory.newInstance(DOM_OBJECT_MODEL)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFunctionResolverTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFunctionResolverTest.java index 8f19976cdb9..6f5e80abb7a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFunctionResolverTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathFunctionResolverTest.java @@ -82,5 +82,3 @@ public class XPathFunctionResolverTest { assertEquals(xpath.evaluate(null, "5"), "2"); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathTest.java b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathTest.java index f3f4a0d0563..86808d6b035 100644 --- a/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathTest.java @@ -757,5 +757,3 @@ public class XPathTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/AttrTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/AttrTest.java index e17afe6b80a..5c5405e63f0 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/AttrTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/AttrTest.java @@ -151,4 +151,3 @@ public class AttrTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/CommentTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/CommentTest.java index eda658bb960..8ded2ce6b51 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/CommentTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/CommentTest.java @@ -48,4 +48,3 @@ public class CommentTest extends AbstractCharacterDataTest { return document.createComment(text); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTest.java index fe309a81aaa..aa4f6ee4759 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTest.java @@ -175,4 +175,3 @@ public class DocumentTest { doc.createElement("!nc$%^*(!"); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTypeTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTypeTest.java index 63d23966131..9ac72f5c337 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTypeTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DocumentTypeTest.java @@ -92,4 +92,3 @@ public class DocumentTypeTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DomImplementationTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DomImplementationTest.java index 9e8c0247144..ebfe9295ddd 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DomImplementationTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/DomImplementationTest.java @@ -129,4 +129,3 @@ public class DomImplementationTest { assertEquals(documentType.getName(), name); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/ElementTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/ElementTest.java index 6726eb0ab8b..c67f32a840f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/ElementTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/ElementTest.java @@ -255,4 +255,3 @@ public class ElementTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/EntityChildTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/EntityChildTest.java index ffac684287d..78473f793bc 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/EntityChildTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/EntityChildTest.java @@ -61,4 +61,3 @@ public class EntityChildTest { assertEquals(nl.getLength(), 3); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NamedNodeMapTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NamedNodeMapTest.java index 405934b3c3d..b83bcf75f0d 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NamedNodeMapTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NamedNodeMapTest.java @@ -121,4 +121,3 @@ public class NamedNodeMapTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeListTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeListTest.java index 8d2d1556616..9d9cb491f2a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeListTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeListTest.java @@ -64,4 +64,3 @@ public class NodeListTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java index 25c047bdfd5..bb4d6b3574a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java @@ -211,4 +211,3 @@ public class NodeTest { transformer.transform(domSource, streamResult); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NotationTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NotationTest.java index 0b698f37bc5..46bb3d25ca6 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NotationTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NotationTest.java @@ -74,4 +74,3 @@ public class NotationTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/PITest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/PITest.java index 3ddf96e86a0..3b942942132 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/PITest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/PITest.java @@ -54,4 +54,3 @@ public class PITest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TextTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TextTest.java index 223853ebd05..3131e8d3de1 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TextTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TextTest.java @@ -74,4 +74,3 @@ public class TextTest extends AbstractCharacterDataTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TypeInfoTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TypeInfoTest.java index c407ff58a64..ca3f174ce39 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TypeInfoTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/TypeInfoTest.java @@ -140,4 +140,3 @@ public class TypeInfoTest { } - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttrImplTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttrImplTest.java index 2337dcec586..9c4910bc904 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttrImplTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttrImplTest.java @@ -202,5 +202,3 @@ public class AttrImplTest { attr.removeAttribute(1); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesNSTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesNSTest.java index f42dc9c50e2..f3115757e0f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesNSTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesNSTest.java @@ -74,5 +74,3 @@ public class AttributesNSTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesTest.java index e56e9458532..e6259be3a76 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/AttributesTest.java @@ -76,5 +76,3 @@ public class AttributesTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ContentHandlerTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ContentHandlerTest.java index bbcb4b40a4c..5ca0b94924a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ContentHandlerTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ContentHandlerTest.java @@ -264,5 +264,3 @@ class MyContentHandler extends XMLFilterImpl implements AutoCloseable { bWriter.close(); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/DefaultHandlerTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/DefaultHandlerTest.java index f8cce65cd30..6418fa264bd 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/DefaultHandlerTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/DefaultHandlerTest.java @@ -272,5 +272,3 @@ class MyDefaultHandler extends DefaultHandler { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/EHFatalTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/EHFatalTest.java index 9d4621a4dbf..173a5ca659f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/EHFatalTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/EHFatalTest.java @@ -135,5 +135,3 @@ class MyErrorHandler extends XMLFilterImpl implements AutoCloseable { bWriter.close(); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSSupportTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSSupportTest.java index 148f46a3950..695a3ec806a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSSupportTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSSupportTest.java @@ -131,5 +131,3 @@ public class NSSupportTest { assertNull(support.getURI(DC_PREFIX)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSTableTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSTableTest.java index 615554f1d4e..7fd27ffbbf5 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSTableTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/NSTableTest.java @@ -168,5 +168,3 @@ public class NSTableTest { assertFalse(spf.getFeature(NAMESPACE_PREFIXES)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ParserAdapterTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ParserAdapterTest.java index 4fb4de21bba..627134b5eaf 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ParserAdapterTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ParserAdapterTest.java @@ -265,5 +265,3 @@ public class ParserAdapterTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ResolverTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ResolverTest.java index 49796f21845..6822a88034c 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ResolverTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/ResolverTest.java @@ -143,5 +143,3 @@ class MyEntityResolver extends XMLFilterImpl implements AutoCloseable { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/SAXParserNSTableTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/SAXParserNSTableTest.java index 84d534ba4d4..71cad03dc9f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/SAXParserNSTableTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/SAXParserNSTableTest.java @@ -107,5 +107,3 @@ public class SAXParserNSTableTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterCBTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterCBTest.java index 9abea366b01..91dd02f8fb9 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterCBTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterCBTest.java @@ -285,5 +285,3 @@ class MyXMLFilter extends XMLFilterImpl implements AutoCloseable { bWriter.close(); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterTest.java index df6bce21461..4483942699f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLFilterTest.java @@ -246,5 +246,3 @@ public class XMLFilterTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderAdapterTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderAdapterTest.java index 9ea1a1a39bb..350074fbf2c 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderAdapterTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderAdapterTest.java @@ -112,5 +112,3 @@ public class XMLReaderAdapterTest { } } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderFactoryTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderFactoryTest.java index 221244b96de..7ee49f39076 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderFactoryTest.java @@ -76,5 +76,3 @@ public class XMLReaderFactoryTest { XMLReaderFactory.createXMLReader("org.apache.crimson.parser.ABCD"); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderNSTableTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderNSTableTest.java index 9f91ddee5f2..518dbc0f8bb 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderNSTableTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderNSTableTest.java @@ -131,5 +131,3 @@ public class XMLReaderNSTableTest { assertTrue(compareWithGold(goldFile, outputFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderTest.java b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderTest.java index 0ba1ae55e76..568548d919c 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderTest.java @@ -671,5 +671,3 @@ class MyDeclHandler implements DeclHandler { public void internalEntityDecl(String name, String value) { } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/AstroTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/AstroTest.java index 8671a12242e..b605137f48f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/AstroTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/AstroTest.java @@ -145,4 +145,3 @@ public class AstroTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java index 20179d5f46b..acfe988c13a 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java @@ -182,4 +182,3 @@ public class DocumentLSTest { return dbf.newDocumentBuilder(); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/NamespaceContextTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/NamespaceContextTest.java index e9584a99579..70771bfeacf 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/NamespaceContextTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/NamespaceContextTest.java @@ -89,4 +89,3 @@ public class NamespaceContextTest { assertEquals(QName.valueOf(qname.toString()), qname); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/SAX201Test.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/SAX201Test.java index d1bb70a3b8f..822140baccc 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/SAX201Test.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/SAX201Test.java @@ -48,4 +48,3 @@ public class SAX201Test { reader.setDTDHandler(null); // SAX 2.0.1 allows } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/SchemaValidationTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/SchemaValidationTest.java index 6c557fb032b..6ba78e9d817 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/SchemaValidationTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/SchemaValidationTest.java @@ -76,4 +76,3 @@ public class SchemaValidationTest { return spf.newSAXParser(); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/XPathAPITest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/XPathAPITest.java index ba3aae0fa2b..69ada828241 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/XPathAPITest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/XPathAPITest.java @@ -171,4 +171,3 @@ public class XPathAPITest { return new InputSource(filenameToURL(ASTROCAT)); } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java index 1238fb88967..5d3ea0317c5 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java @@ -366,5 +366,3 @@ public class AuctionController { assertTrue(roletypeInfo.getTypeNamespace().equals(PORTAL_ACCOUNT_NS)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java index 4ab09cf71c7..2bab94a41aa 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java @@ -371,5 +371,3 @@ public class AuctionItemRepository { assertTrue(compareDocumentWithGold(goldFile, resultFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java index 4ee18c423c4..5c4ac7c9bc6 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java @@ -304,5 +304,3 @@ public class UserController { assertTrue(compareDocumentWithGold(goldFile, resultFile)); } } - - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4511326.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4511326.java index 65e38a75e25..5c6c1b3e0be 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4511326.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4511326.java @@ -64,4 +64,3 @@ public class Bug4511326 { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4512806.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4512806.java index cfc74fd26f2..1778a20a031 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4512806.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4512806.java @@ -90,4 +90,3 @@ public class Bug4512806 { } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515047.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515047.java index a833c117a8f..7af1eb4235c 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515047.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515047.java @@ -62,4 +62,3 @@ public class Bug4515047 { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515660.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515660.java index bff0d401d25..15626ab1e71 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515660.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4515660.java @@ -128,4 +128,3 @@ public class Bug4515660 { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4693341.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4693341.java index 8db96ac91a6..f76670bd22e 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4693341.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4693341.java @@ -81,4 +81,3 @@ public class Bug4693341 { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4848653.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4848653.java index 4fa09ccc2dc..1ca0bcb77f3 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4848653.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4848653.java @@ -81,4 +81,3 @@ public class Bug4848653 { } } - diff --git a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4858685.java b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4858685.java index 7bb8ea574ad..f5deceb04f1 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4858685.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/gaptest/Bug4858685.java @@ -247,4 +247,3 @@ public class Bug4858685 { } } - diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/test/module-info.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/test/module-info.java index 9a1caa4e1f9..3cc31a4056f 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/test/module-info.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/test/module-info.java @@ -24,4 +24,4 @@ module test { requires java.xml; exports test; -} \ No newline at end of file +} diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/module-info.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/module-info.java index 5a5b1b01447..a4681d42a0a 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/module-info.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/module-info.java @@ -31,4 +31,4 @@ module xmlprovider1 { provides javax.xml.transform.TransformerFactory with xp1.TransformerFactoryImpl; provides javax.xml.validation.SchemaFactory with xp1.SchemaFactoryImpl; provides javax.xml.xpath.XPathFactory with xp1.XPathFactoryImpl; -} \ No newline at end of file +} diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/module-info.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/module-info.java index c8bc623aa7a..511c25b019d 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/module-info.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/module-info.java @@ -27,4 +27,4 @@ module xmlprovider2 { provides javax.xml.datatype.DatatypeFactory with xp2.DatatypeFactoryImpl; provides javax.xml.stream.XMLEventFactory with xp2.XMLEventFactoryImpl; provides org.xml.sax.XMLReader with xp2.XMLReaderImpl; -} \ No newline at end of file +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java index 210db35bfb2..aca1dcfe11a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java @@ -75,4 +75,3 @@ public class Bug6350682 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java index 8763290fe4e..f254c28ee49 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java @@ -68,4 +68,3 @@ public class Bug6723276Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java index 8bf9ea43c93..b372470990c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java @@ -486,4 +486,3 @@ public class Bug6941169Test { return document; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java index 2414288b218..771d26a4677 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java @@ -114,4 +114,3 @@ public class Bug7143711Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/Sources.java b/jaxp/test/javax/xml/jaxp/unittest/common/Sources.java index ec09062a626..ad5f815cbad 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/Sources.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Sources.java @@ -213,4 +213,3 @@ public class Sources { return r; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/TestSAXDriver.java b/jaxp/test/javax/xml/jaxp/unittest/common/TestSAXDriver.java index 1745e460a6d..033bbdefd6e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/TestSAXDriver.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/TestSAXDriver.java @@ -56,4 +56,3 @@ public class TestSAXDriver extends SAXParserImpl.JAXPSAXParser { private static final String ENT_EXP_LIMIT_PROP = "http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit"; } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java index bffaa4afe5e..1dbe4188330 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java @@ -105,4 +105,3 @@ public class TransformationWarningsTest extends WarningsTestBase { + ""; private static final String xml = ""; } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java index c1f4989a770..1e09a762f61 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java @@ -85,4 +85,3 @@ public class ValidationWarningsTest extends WarningsTestBase { private static final String xml = "Element"; } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java index 5f92bd0a587..e9609155807 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java @@ -108,4 +108,3 @@ public class Bug6320118 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java index 1c86badd13c..36de6637e6d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java @@ -57,4 +57,3 @@ public class Bug6937951Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java index 9caf929ccf9..3e1129d2acc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java @@ -270,4 +270,3 @@ public class Bug6937964Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java index f680336edc2..5e6e34b6af6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java @@ -60,4 +60,3 @@ public class Bug7042647Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java index 6ca2985348e..4029e2b21ae 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java @@ -640,4 +640,3 @@ public class DatatypeFactoryTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java index 76023529624..6b2204ef1e1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java @@ -484,4 +484,3 @@ public class DurationTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java index 915a63c71ee..2a1e2d6ea7f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java @@ -76,4 +76,3 @@ public class FactoryFindTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/JDK8068839Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/JDK8068839Test.java index dd0720ded6e..03412b59edb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/JDK8068839Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/JDK8068839Test.java @@ -51,4 +51,3 @@ public class JDK8068839Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java index 89c5fc63556..415d949c05d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java @@ -228,4 +228,3 @@ public class XMLGregorianCalendarTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java index 791146e6564..5ce2d195acd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java @@ -81,4 +81,3 @@ public class Bug4915524 { return docBuilder.parse(source); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java index e2186da9107..50a5ced37f4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java @@ -74,4 +74,3 @@ public class Bug4915748 { Assert.assertTrue(hadError[0]); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java index b24e9d5818b..30e1740f11c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java @@ -53,4 +53,3 @@ public class Bug4966082 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java index 43f1e1aa410..cdc96d140b9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java @@ -69,4 +69,3 @@ public class Bug4966138 { Assert.assertTrue(typeNs.length() != 0, "returned typeNamespace shouldn't be empty"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java index 5bd158e7723..ebd66a0a02b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java @@ -61,4 +61,3 @@ public class Bug4966142 { Assert.assertFalse(type.isDerivedFrom("testNS", "Test", TypeInfo.DERIVATION_UNION)); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java index 1cdbb466c14..4e42cb06b8c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java @@ -66,4 +66,3 @@ public class Bug4966143 { Assert.assertTrue(type.isDerivedFrom("testNS", "Test", 0)); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java index df2eaf3f955..d389516117e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java @@ -139,4 +139,3 @@ public class Bug6339023 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java index d2656690847..f0b557a24a7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java @@ -118,4 +118,3 @@ public class Bug6355326 { return p; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java index b1ce0a16db9..21284ee3902 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java @@ -52,4 +52,3 @@ public class Bug6367542 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java index b1381c0b8aa..22940e07b14 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java @@ -83,4 +83,3 @@ public class Bug6520131 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java index 300bde2159a..e051748fe7a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java @@ -77,4 +77,3 @@ public class Bug6521260 { Assert.assertEquals(systemId, systemId2); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java index 9108af3d7f6..23c872e8553 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java @@ -123,4 +123,3 @@ public class Bug6582545Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java index ff5cf2cda6a..1e0f9da9f24 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java @@ -78,4 +78,3 @@ public class Bug6879614Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java index f407e2612e8..a706ae2bb31 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java @@ -88,4 +88,3 @@ public class CR6333993Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java index c8ee54a3acc..90102a0afd2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java @@ -128,4 +128,3 @@ public class CR6517707Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java index 0b5d2e65b2f..0d73cd4fee7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java @@ -86,4 +86,3 @@ public class CR6517717Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java index 4b46cf9fb60..ea91169b203 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java @@ -72,4 +72,3 @@ public class CR6909336Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java index b4341558e8e..528736f11e8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java @@ -1628,4 +1628,3 @@ public class DOMConfigurationTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java index 672c38e5fda..b43e694a575 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java @@ -54,4 +54,3 @@ public class DOMXPathTest { Assert.assertEquals(domImpl.getFeature("+XPath", "3.0"), null); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java index ef87815d166..4319a0ad5a1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java @@ -135,4 +135,3 @@ public class ElementTraversal { return doc; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java index 19523434cf2..f07ac57c7b2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java @@ -46,4 +46,3 @@ public class JdkXmlDomTest { Assert.assertTrue(runWithAllPerm(() -> cls.getClassLoader()) != null); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java index 6dc3a24b68d..6f71906ee9d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java @@ -102,4 +102,3 @@ public class TCKEncodingTest { System.out.println("OK"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java index 42d8d2457d0..b6bdd0f606c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java @@ -204,4 +204,3 @@ class DOMErrorHandlerImpl implements DOMErrorHandler { return true; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java index f874107cf52..745c31c8d2b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java @@ -147,4 +147,3 @@ public class Bug6290947 { return src; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java index f693e33765a..91507e97700 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java @@ -142,4 +142,3 @@ public class Bug6354955 { return documentBuilder.newDocument(); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java index afd0458ab22..07541e8fee3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java @@ -121,4 +121,3 @@ public class Bug6376823 { return src; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java index 73584b3f16d..3f4f1ffb0c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java @@ -80,4 +80,3 @@ public class Bug6710741Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java index 3e4f8762b44..8c39f248400 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java @@ -584,4 +584,3 @@ public class LSParserTCKTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java index 1a3c5914942..18b50f2daed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java @@ -109,4 +109,3 @@ public class LSParserTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java index d30baa8945f..f1019369c4b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java @@ -319,4 +319,3 @@ public class LSSerializerTest { Assert.assertEquals(XML11_DOCUMENT_OUTPUT, defaultSerialization, "Invalid serialization of XML 1.1 document: "); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java index c0e833e318d..1713fff6d62 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java @@ -70,4 +70,3 @@ public class Bug4674384_MAX_OCCURS_Test { System.out.println("Success: File " + XML_FILE_NAME + " was parsed with a large value of maxOccurs."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java index 65943390953..743f236302b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java @@ -74,4 +74,3 @@ public class Bug4934208 { r.parse(is); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java index 308b5b11bf0..d0797a2f669 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java @@ -101,4 +101,3 @@ public class Bug4967002 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java index 7cc3313fad9..3fb179751e6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java @@ -68,4 +68,3 @@ public class Bug4985486 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java index 189f5efebee..c0be7b47a04 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java @@ -56,4 +56,3 @@ public class Bug4991020 { parser.parse(Bug4991020.class.getResource("Bug4991020.xml").toExternalForm(), new util.DraconianErrorHandler()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java index a30cbd8fbc9..9213a59508d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java @@ -56,4 +56,3 @@ public class Bug4991946 { parser.parse(Bug4991946.class.getResource("Bug4991946.xml").toExternalForm(), new util.DraconianErrorHandler()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java index 786a2225731..04346c89fea 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java @@ -77,4 +77,3 @@ public class Bug5010072 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java index 86d766b282e..9f8cbcb4111 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java @@ -89,4 +89,3 @@ public class Bug5025825 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java index 20e49c8a501..75fc8adfdd4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java @@ -370,4 +370,3 @@ public class Bug6309988 { return System.getSecurityManager() != null; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java index 5a93c1a515e..3bdff2a15ae 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java @@ -83,4 +83,3 @@ public class Bug6341770 { System.out.println("OK."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java index 1e0e25a3bc0..5a76ae9992e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java @@ -56,4 +56,3 @@ public class Bug6361283 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java index eab6d6dbdb8..98f2e96418d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java @@ -71,4 +71,3 @@ public class Bug6506304Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java index ab23e378732..37ee4cc57f4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java @@ -67,4 +67,3 @@ public class Bug6518733 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java index 1ae8c810fd9..e427478c427 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java @@ -180,4 +180,3 @@ public class Bug6564400 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java index dd12ea5e254..87953ae836b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java @@ -73,4 +73,3 @@ public class Bug6573786 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java index f4595896db7..b938eb6eb6f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java @@ -45,4 +45,3 @@ public class Bug6573786ErrorHandler extends DefaultHandler { System.out.println(e.getMessage()); } // warning () } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java index 411bdf7c422..7e168d90cd4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java @@ -175,4 +175,3 @@ public class Bug6594813 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java index 67f596b284f..9c638368cc6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java @@ -59,4 +59,3 @@ public class Bug6608841 { public class MyHandler extends DefaultHandler { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java index 5d4359ae368..a866ee56a81 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java @@ -87,4 +87,3 @@ public class Bug6690015 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java index 9e6514aded4..a1cdcac7054 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java @@ -168,4 +168,3 @@ public class Bug6760982 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java index 4c9f3c0e11f..f2266d24e1c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java @@ -81,4 +81,3 @@ public class Bug6849942Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java index 26f3f8a595a..6fb819bf9ec 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java @@ -218,4 +218,3 @@ public class Bug7157608Test { boolean validating = false; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java index ed727064128..ec25ae28d80 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java @@ -80,4 +80,3 @@ public class Bug7166896Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java index efa75ed9838..4522fec1658 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java @@ -93,4 +93,3 @@ public class Bug8003147Test { }, new FilePermission(getSystemProperty("test.classes") + "/-", "read,write")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147TestClass.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147TestClass.java index f9da51202e1..3088a8d4f8c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147TestClass.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147TestClass.java @@ -32,4 +32,3 @@ public class Bug8003147TestClass { public void doSomething(double d, ArrayList list) { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java index eae5319f34d..aef8e65f838 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java @@ -100,4 +100,3 @@ public class Bug8073385 { assertTrue(exceptionText.contains("Unicode: " + hexString)); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java index 2a4d7c17514..d45e6702fc0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java @@ -75,4 +75,3 @@ public class FactoryFindTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java index 52874b90362..c690163eb86 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java @@ -45,4 +45,3 @@ public class MyDefaultHandler extends DefaultHandler { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java index fb01c19171a..695c932f603 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java @@ -53,4 +53,3 @@ public class MyErrorHandler extends DefaultHandler { errorOccured = true; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java index 079f25304c9..c3159cf50cd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java @@ -92,4 +92,3 @@ public class ParseEmptyStream { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/SupplementaryChars.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/SupplementaryChars.java index 63e2371d75e..5b4e018e757 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/SupplementaryChars.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/SupplementaryChars.java @@ -71,4 +71,3 @@ public class SupplementaryChars { return parser; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java index a1c83eb9c00..8385d40c47f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java @@ -107,4 +107,3 @@ public class Bug6794483Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java index a792405cce5..982bc8e595b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java @@ -153,4 +153,3 @@ public class Attributes2ImplTest { Assert.assertTrue(impl1.getQName(2).equals(impl3.getQName(2))); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java index 651e804a89d..7eb7a59fe8f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java @@ -87,4 +87,3 @@ public class Bug6889654Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java index 96303049be7..df006578c0c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java @@ -60,4 +60,3 @@ public class Bug6925410Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java index 7a6c8618110..1ba064fa56b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java @@ -81,4 +81,3 @@ public class Bug6949607Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java index 47f076553ff..7d05dd7f0a9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java @@ -86,4 +86,3 @@ public class Bug6992561Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java index 198ade37101..4bd69f09765 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java @@ -199,4 +199,3 @@ public class Bug7057778Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java index 7d3ff8c0e2e..a7bd3f59d0c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java @@ -251,4 +251,3 @@ public class DefaultHandler2Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java index 6c52f6d69bd..fbfef8f705b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java @@ -142,4 +142,3 @@ public class IssueTracker56Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java b/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java index b36ae9aa88a..44ac9fde73d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java @@ -198,4 +198,3 @@ public class MyDefaultHandler2 extends DefaultHandler2 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java index 4ade4a8d76a..32c4c5c05dc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java @@ -232,4 +232,3 @@ public class NSSupportTest { Assert.assertNull(nssupport.getURI("")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java b/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java index a4c0e184458..9b9800d27fa 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java @@ -38,4 +38,3 @@ public class SAXExceptionExt extends SAXException { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/XMLReaderTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/XMLReaderTest.java index 73c92da706a..cc234531a27 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/XMLReaderTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/XMLReaderTest.java @@ -70,4 +70,3 @@ public class XMLReaderTest { XMLReaderAdapter adapter = new XMLReaderAdapter(); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java index f9dbc0d4591..7aece9698f9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java @@ -66,4 +66,3 @@ public class AttributeLocalNameTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java index 97cf8292b5e..ba8c7adee57 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java @@ -69,4 +69,3 @@ public class Bug6370703 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java index 8848cb4f76f..4fa70e2b73b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java @@ -51,4 +51,3 @@ public class Bug6378422 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java index 6ad9bfc092a..0c584d0fe35 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java @@ -58,4 +58,3 @@ public class Bug6380870 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java index 39cdcb0f9db..832f74de959 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java @@ -83,4 +83,3 @@ public class Bug6489502 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java index 54eeb8b60e4..5c6a4106104 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java @@ -174,4 +174,3 @@ public class Bug6509774 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java index dca27beec11..1c4ac758575 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java @@ -113,4 +113,3 @@ public class Bug6688002Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java index a3f09aa7334..f4a40ef28e8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java @@ -100,4 +100,3 @@ public class Bug6976938Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java index 0b00c3c654c..09a12ca7476 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java @@ -110,4 +110,3 @@ public class CoalesceTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java index b7947fd2f44..24526e0dd9f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java @@ -179,4 +179,3 @@ public class EntityTest { return true; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java index 87246ebd13b..db93e02f55b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java @@ -231,4 +231,3 @@ public class EventReaderDelegateTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java index 56f97c54b48..13f25d5adc0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java @@ -178,4 +178,3 @@ public class Issue41Test { System.out.println(sw.toString()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java index 4d3b144aca6..d4fa45bb789 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java @@ -115,4 +115,3 @@ public class Issue48Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java index 1e30efb2ca4..1490e28269c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java @@ -71,4 +71,3 @@ public class Issue53Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java index 8e00999acb4..6453fae9e06 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java @@ -84,4 +84,3 @@ public class Issue58Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java index 8e908b0e37e..a0a538f2369 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java @@ -151,4 +151,3 @@ public class FactoryFindTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java index 44708b22e3e..4610aff758e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java @@ -77,4 +77,3 @@ public class IgnoreExternalDTDTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java index 44a7dea91c3..43e785f81e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java @@ -67,4 +67,3 @@ public class ProcessingInstructionTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java index 0568bca28bf..44c602e72d4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java @@ -383,4 +383,3 @@ public class StreamReaderDelegateTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java index 75bb79566f2..0472899ebb2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java @@ -82,4 +82,3 @@ public class XMLEventLocationTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java index 5ac6f1a221a..d98aec1caf8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java @@ -77,4 +77,3 @@ public class Bug6489890 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java index 79533441e96..ebb7cf87942 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java @@ -116,4 +116,3 @@ public class Bug6555001 { }, new FilePermission("/tmp/this/does/not/exist/but/that/is/ok", "read")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java index 86f2437fc85..437dd9e602a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java @@ -66,4 +66,3 @@ public class Bug6586466Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java index 43e8a6165f1..23531b463ec 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java @@ -89,4 +89,3 @@ public class Bug6613059Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java index 07309465f99..f2b8ebe7e2f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java @@ -100,4 +100,3 @@ public class Bug6668115Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java index a89b976b618..416c3e960bb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java @@ -83,4 +83,3 @@ public class Bug6846133Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug8153781.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug8153781.java index 2ac01596c50..7c3b529afcf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug8153781.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug8153781.java @@ -94,4 +94,3 @@ public class Bug8153781 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java index 4c6e0c0ffb7..9ed53c57833 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java @@ -100,4 +100,3 @@ public class Issue40Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java index d96eea1a1b4..3bd3ca25296 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java @@ -214,4 +214,3 @@ public class ReaderToWriterTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java index e04a349d92e..3dd7e25de3c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java @@ -156,4 +156,3 @@ public class XMLEventWriterTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java index 3ba9ca7776b..2e4b41dce2d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java @@ -113,4 +113,3 @@ public class Bug6756677Test { Assert.assertTrue(xif instanceof XMLInputFactory, "xif should be an instance of XMLInputFactory"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java index d2e29713e2b..562b7a3d559 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java @@ -66,4 +66,3 @@ public class Bug6909759Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java index dea8f732b46..a70288a9346 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java @@ -92,4 +92,3 @@ public class IssueTracker38 { } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java index d9db7a08344..551d3f0f8d2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java @@ -158,4 +158,3 @@ public class MyInputFactory extends javax.xml.stream.XMLInputFactory { throw new UnsupportedOperationException("Not supported yet."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java index fa764c154a5..aabfa430581 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java @@ -89,4 +89,3 @@ public class Bug6846132Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java index 8fec5b107da..99c12487cf7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java @@ -83,4 +83,3 @@ public class DuplicateNSDeclarationTest { Assert.assertEquals(EXPECTED_OUTPUT, buffer.toString()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java index e44a20c3138..47b089ae55f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java @@ -162,4 +162,3 @@ public class StreamResultTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java index 12e7e9a74d9..628977e2656 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java @@ -96,4 +96,3 @@ public class XMLResolverTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java index 403c609db91..05f9aaecd0e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java @@ -53,4 +53,3 @@ public class ExceptionTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java index 5ab83c987f8..87e70ab9cd9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java @@ -68,4 +68,3 @@ public class Bug6481615 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java index ea79d530b11..daec8fb9cd2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java @@ -225,4 +225,3 @@ public class Bug6481678 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java index c573a8dfb6b..ad4c50dce75 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java @@ -145,4 +145,3 @@ public class HasNextTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java index 19748b3afdb..1fd6e20fe08 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java @@ -47,4 +47,3 @@ public class HasNextTypeFilter implements EventFilter, StreamFilter { return types[r.getEventType()]; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java index 3fa5bec18e7..93e934c7fe3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java @@ -67,4 +67,3 @@ public class BOMTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java index a981ba10c77..5c8096b45af 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java @@ -76,4 +76,3 @@ public class Bug6388460 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java index cd083359e1d..a4bec110fe9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java @@ -79,4 +79,3 @@ public class Bug6472982Test { return sbuffer.toString(); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java index 5a4c0be28a7..49f03ca4ba0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java @@ -76,4 +76,3 @@ public class Bug6767322Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java index cfe1ade63ad..cdf353ecafe 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java @@ -69,4 +69,3 @@ public class Bug6847819Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java index a2cf3c2ae9b..ca30f426d68 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java @@ -51,4 +51,3 @@ public class BugTest { Assert.assertEquals(XMLStreamConstants.START_DOCUMENT, r.getEventType()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java index 10db94b8203..898bf3e3332 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java @@ -108,4 +108,3 @@ public class DefaultAttributeTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java index 493d6b31545..1b47db5f4b3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java @@ -118,4 +118,3 @@ public class DoubleXmlnsTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java index 1f447928aa7..44c0c1fcd2c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java @@ -165,4 +165,3 @@ public class IsValidatingTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java index 9ef51e64d02..f4f8f5dbdc0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java @@ -59,4 +59,3 @@ public class Issue44Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java index ad2d8dc0293..7d456463a4b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java @@ -89,4 +89,3 @@ public class Issue47Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java index b259576202c..1d7041d58b2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java @@ -61,4 +61,3 @@ public class IssueTracker24 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java index d98e249c48e..2cc0a483ae6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java @@ -59,4 +59,3 @@ public class IssueTracker35 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java index 33cc4b87574..c107c18110f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java @@ -76,4 +76,3 @@ public class IssueTracker70 { Assert.assertNotNull(value, "should have attribute value"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java index 3505fd59f50..0c753ac3be4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java @@ -91,4 +91,3 @@ public class Jsr173MR1Req5Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java index b6e703e93f8..49908781cd1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java @@ -69,4 +69,3 @@ public class Jsr173MR1Req8Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java index 2ea93e90950..334011befc7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java @@ -153,4 +153,3 @@ public class NamespaceTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java index cc01f89ebda..39a1c85bafb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java @@ -62,4 +62,3 @@ public class StreamReaderTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java index ca51c6e1094..bfdfb76e06f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java @@ -288,4 +288,3 @@ public class SupportDTDTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java index 216bf0d6536..a31b445880c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java @@ -58,4 +58,3 @@ public class VoiceXMLDTDTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java index f69166a2be8..95a88e5eb4b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java @@ -54,4 +54,3 @@ public class XML11Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java index 811f0bf1173..e7378e11170 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java @@ -103,4 +103,3 @@ public class AttributeEscapeTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java index 595c58d44a2..35472f0713d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java @@ -64,4 +64,3 @@ public class Bug6452107 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java index f8cb256404c..e17b04da265 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java @@ -59,4 +59,3 @@ public class Bug6600882Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java index 25cd9327513..0e4f0aa22f5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java @@ -164,4 +164,3 @@ public class Bug6675332Test extends BaseStAXUT { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java index a157d7c84a1..8729d9f2711 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java @@ -65,4 +65,3 @@ public class Bug7037352Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java index 929cbda273f..f59ef011018 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java @@ -221,4 +221,3 @@ public class DOMUtil { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java index 466a51ce506..bef8db02e6e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java @@ -124,4 +124,3 @@ public class DomUtilTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java index be4cc62d4a3..d40bcae712c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java @@ -85,4 +85,3 @@ public class EmptyElementTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java index deff9cc9d1e..ced54992790 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java @@ -110,4 +110,3 @@ public class EncodingTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java index 04ad1d7b12e..7e574bc879f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java @@ -1434,4 +1434,3 @@ public class NamespaceTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java index e4d0bfc9c92..00f7a62dada 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java @@ -54,4 +54,3 @@ public class NullUriDetectionTest { w.writeCharacters("---"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java index a5d76495376..ea71a065817 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java @@ -88,4 +88,3 @@ public class SqeLinuxTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java index 4208cc9b24d..97953d3993a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java @@ -175,4 +175,3 @@ public class SurrogatesTest { }; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java index 95bb8965ab7..68fab1bdb5b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java @@ -125,4 +125,3 @@ public class UnprefixedNameTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java index c7148edb187..7e681e343c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java @@ -784,4 +784,3 @@ public class WriterTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java index 0d063043ba0..5b5893c8eb2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java @@ -73,4 +73,3 @@ public class XMLStreamWriterTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java index 63869afc6ec..2b2a1e94506 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java @@ -94,4 +94,3 @@ public class Bug4693341Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java index ed348885b33..cb92eb762ed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java @@ -377,4 +377,3 @@ public class Bug4892774 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java index 750f38c811c..eb8853da891 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java @@ -55,4 +55,3 @@ public class Bug5073477 { r.setNextSibling(r.getNode().getFirstChild()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java index 0cfcfa0e05e..dede016d4ff 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java @@ -54,4 +54,3 @@ public class Bug6175602 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java index 1947d7e7f93..2c60db3cc3d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java @@ -134,4 +134,3 @@ public class Bug6206491 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java index 291eb372eeb..7031585a864 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java @@ -69,4 +69,3 @@ public class Bug6216226Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java index adc49f1ed3d..9cfec4471f3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java @@ -85,4 +85,3 @@ public class Bug6311448 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java index 3e7bc97d12f..b32d1d83524 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java @@ -94,4 +94,3 @@ public class Bug6384805 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java index 881bd808038..ecf248b8523 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java @@ -72,4 +72,3 @@ public class Bug6465722 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java index 86f9436c9f6..61c6692b755 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java @@ -76,4 +76,3 @@ public class Bug6467808 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java index 7301108e272..255dd878c4e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java @@ -61,4 +61,3 @@ public class Bug6490380 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java index 759467caffc..f9bea6978a1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java @@ -145,4 +145,3 @@ public class Bug6490921 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java index 26a51f339e5..acb81122327 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java @@ -77,4 +77,3 @@ public class Bug6513892 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java index b77ec5d5900..6c1938e4afd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java @@ -85,4 +85,3 @@ public class Bug6537167 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java index 90cbfccd0f4..22182435206 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java @@ -64,4 +64,3 @@ public class Bug6540545 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6551616.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6551616.java index 3bd1e7adbc9..27c6ddf008c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6551616.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6551616.java @@ -68,4 +68,3 @@ public class Bug6551616 { // if it doesn't blow up, it succeeded. } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java index 05a5e1c9e83..f1d4c3d8cfe 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java @@ -70,4 +70,3 @@ public class Bug6559595 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java index 6a56d55518b..df14bc37603 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java @@ -64,4 +64,3 @@ public class Bug6565260 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java index 628310c0d33..e00da88993c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java @@ -115,4 +115,3 @@ public class Bug6940416 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java index e41107089d5..ecd61f603ec 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java @@ -157,4 +157,3 @@ public class BugDB12665704Test { return sb.toString(); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CLITest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CLITest.java index e72fc26d4f6..57f3009b682 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CLITest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CLITest.java @@ -50,4 +50,3 @@ public class CLITest { }, new PropertyPermission("*", "read,write")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java index b7af4a5841f..b17df311824 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java @@ -94,4 +94,3 @@ public class CR6401137Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java index d08dddffca0..d168ecb2e48 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java @@ -94,4 +94,3 @@ public class CR6551600Test { : new FilePermission("///tmp/test.xml", "read,write,delete")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java index 3602f80b809..fec10a1be1b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java @@ -59,4 +59,3 @@ public class CR6577667Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java index 057238513d2..2bfe0631a71 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java @@ -79,4 +79,3 @@ public class CR6652519Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java index cdfcae7d550..5ad290060ac 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java @@ -64,4 +64,3 @@ public class CR6689809Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java index 33f9957bc85..78006b5c8f4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java @@ -65,4 +65,3 @@ public class CR6905829Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java index 3db8bc3af6e..db8d8721d2e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java @@ -77,4 +77,3 @@ public class CR6935697Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java index 8fd89254737..13331ce4cc1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java @@ -76,4 +76,3 @@ public class CR6941869Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java index 4e4e7ddb05c..24c3bfd4318 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java @@ -99,4 +99,3 @@ public class CR6957215Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java index c84a512e1ec..04ec9fd8ea3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java @@ -90,4 +90,3 @@ public class CR7098746Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java index bf46190ee35..cbfaf0f924a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java @@ -215,4 +215,3 @@ public class DOMResultTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java b/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java index f9a93513112..81227c7d691 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java @@ -33,4 +33,3 @@ public class DocumentExtFunc { return "["+node.getNodeName() + ":" + node.getTextContent()+"]"; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java index 56eff4001df..f1267ce4622 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java @@ -75,4 +75,3 @@ public class FactoryFindTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java index 52f41c46715..dbba31b46dc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java @@ -67,4 +67,3 @@ public class Issue2204Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java index 10ba8615c44..8047d83fec1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java @@ -96,4 +96,3 @@ public class Issue2290Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/OpenJDK100017Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/OpenJDK100017Test.java index 4fceeaacbc4..8aff9628bba 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/OpenJDK100017Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/OpenJDK100017Test.java @@ -66,4 +66,3 @@ public class OpenJDK100017Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/SAX2DOMTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/SAX2DOMTest.java index 1dc5cfbab7e..34e092101bc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/SAX2DOMTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/SAX2DOMTest.java @@ -198,4 +198,3 @@ public class SAX2DOMTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/SecureProcessingTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/SecureProcessingTest.java index 27a03bf4e44..a6ecfdee907 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/SecureProcessingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/SecureProcessingTest.java @@ -135,4 +135,3 @@ public class SecureProcessingTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/SourceTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/SourceTest.java index 76507bfca1f..dd92c26065a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/SourceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/SourceTest.java @@ -148,4 +148,3 @@ public class SourceTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/StAXSourceTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/StAXSourceTest.java index cfa20d1b47a..09df03442e5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/StAXSourceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/StAXSourceTest.java @@ -129,4 +129,3 @@ public class StAXSourceTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/TemplatesTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/TemplatesTest.java index e2a4fc2ca08..f0cd1441661 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/TemplatesTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/TemplatesTest.java @@ -83,4 +83,3 @@ public class TemplatesTest { + " contains($validAffectsRelClasses, @Class)]/@OBID)\"/>" + ""; } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerFactoryTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerFactoryTest.java index 2d6dfbf8aae..550da2bc8d2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerFactoryTest.java @@ -153,4 +153,3 @@ public class TransformerFactoryTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerTest.java index 199a4bac62a..59d195e3d8b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerTest.java @@ -439,4 +439,3 @@ public class TransformerTest { Assert.assertNull(document.getElementsByTagName("test6").item(0).getNamespaceURI(), "unexpected namespace for test6"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerUtilFactory.java b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerUtilFactory.java index dade0b6b56f..793dd7ad6ac 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerUtilFactory.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/TransformerUtilFactory.java @@ -56,4 +56,3 @@ public class TransformerUtilFactory { return null; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/VersionDefaultHandler.java b/jaxp/test/javax/xml/jaxp/unittest/transform/VersionDefaultHandler.java index f79ecd6bdde..ff8fbfe189b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/VersionDefaultHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/VersionDefaultHandler.java @@ -62,4 +62,3 @@ public class VersionDefaultHandler extends DefaultHandler { return encoding; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/VersionEventWriter.java b/jaxp/test/javax/xml/jaxp/unittest/transform/VersionEventWriter.java index e7fe77b039f..51ff18c421d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/VersionEventWriter.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/VersionEventWriter.java @@ -82,4 +82,3 @@ public class VersionEventWriter implements XMLEventWriter { return encoding; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java index 354accefa4a..87360daf486 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java @@ -23,9 +23,12 @@ package transform; +import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; - +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; @@ -54,8 +57,39 @@ import static jaxp.library.JAXPTestUtilities.getSystemProperty; * @summary This class contains tests for XSLT functions. */ -@Listeners({jaxp.library.BasePolicy.class}) +@Listeners({jaxp.library.FilePolicy.class}) public class XSLTFunctionsTest { + /** + * @bug 8165116 + * Verifies that redirect works properly when extension function is enabled + * + * @param xml the XML source + * @param xsl the stylesheet that redirect output to a file + * @param output the output file + * @param redirect the redirect file + * @throws Exception if the test fails + **/ + @Test(dataProvider = "redirect") + public void testRedirect(String xml, String xsl, String output, String redirect) throws Exception { + + TransformerFactory tf = TransformerFactory.newInstance(); + tf.setFeature(ORACLE_ENABLE_EXTENSION_FUNCTION, true); + Transformer t = tf.newTransformer(new StreamSource(new StringReader(xsl))); + + //Transform the xml + t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())); + + // Verifies that the output is redirected successfully + String userDir = getSystemProperty("user.dir"); + Path pathOutput = Paths.get(userDir, output); + Path pathRedirect = Paths.get(userDir, redirect); + Assert.assertTrue(Files.exists(pathOutput)); + Assert.assertTrue(Files.exists(pathRedirect)); + System.out.println("Output to " + pathOutput + " successful."); + System.out.println("Redirect to " + pathRedirect + " successful."); + Files.deleteIfExists(pathOutput); + Files.deleteIfExists(pathRedirect); + } /** * @bug 8161454 @@ -177,6 +211,13 @@ public class XSLTFunctionsTest { }; } + @DataProvider(name = "redirect") + public static Object[][] getData() { + return new Object[][] { + {documentTestXml, xslRedirect, "testoutput.xml", "testredirect.xml"}, + }; + } + static final String documentTestXml = "Doc"; static final String documentTestExternalDoc = "External Doc"; @@ -197,6 +238,23 @@ public class XSLTFunctionsTest { static final String documentTesteExpectedResult = "" + "[Test:Doc][Test:External Doc]"; + static String xslRedirect = " \n" + + " \n" + + " This goes to standard output\n" + + " \n" + + " This ends up in the file 'testoutput.xml'\n" + + " \n" + + " \n" + + " This ends up in the file 'testredirect.xml'\n" + + " \n" + + " \n" + + ""; + public static final String ORACLE_JAXP_PROPERTY_PREFIX = "http://www.oracle.com/xml/jaxp/properties/"; /** diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java b/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java index 662c20b13aa..77bc7b4a7e2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java @@ -62,4 +62,3 @@ public class Bug6451633 { Assert.assertEquals(0, ((Document) result.getNode()).getDocumentElement().getChildNodes().getLength()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java index 832c10f062e..988da74f834 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java @@ -68,4 +68,3 @@ public class DOMUtil extends TransformerUtil { Assert.assertTrue(version.equals(resultVersion), "Expected XML Version is 1.1, but actual version " + resultVersion); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java index 5bee6019cbb..9e257ebf9a6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java @@ -70,4 +70,3 @@ public class SAXUtil extends TransformerUtil { Assert.assertTrue(encoding.equals(resultEncoding), "Expected XML Version is " + encoding + " , but actual encoding " + resultEncoding); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java index 91423dae161..26374d76ab0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java @@ -92,4 +92,3 @@ public class StAXUtil extends TransformerUtil { ((StreamUtil) TransformerUtilFactory.getUtil(TransformerUtilFactory.STREAM)).checkStream(new FileInputStream(TEMP_FILE), version); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java index 91a37a909cb..8a1630088b6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java @@ -94,4 +94,3 @@ public class StreamUtil extends TransformerUtil { Assert.assertTrue(dh.getEncoding().equals(encoding), "Expected version is " + encoding + " actual version " + dh.getEncoding()); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java b/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java index d142b7ad331..2088452af58 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java +++ b/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java @@ -78,4 +78,3 @@ public class BOMInputStream { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java b/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java index c3211c50e5b..86a54335249 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java +++ b/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java @@ -557,4 +557,3 @@ public class BaseStAXUT implements XMLStreamConstants { System.err.println("Skipping " + clsName + "#" + method + ": entity expansion does not seem to be functioning properly" + msg + "."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java index 8c615c5d3a0..c12a1515245 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java @@ -85,4 +85,3 @@ public class AnyElementTest { private Validator validator; } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java index 3c0c6db7b46..05300cc6964 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java @@ -75,4 +75,3 @@ public class Bug4966232 { Assert.assertNotNull(s); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java index 4eafe25cac9..46e9fd23034 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java @@ -78,4 +78,3 @@ public class Bug4966254 { return s; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java index 31770d19436..e7b22fec08b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java @@ -111,4 +111,3 @@ public class Bug4969042 { Assert.assertTrue(invoked[1], "Method characters() was not invoked."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java index 1f7e75f7f74..74a75f75433 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java @@ -76,4 +76,3 @@ public class Bug4969089 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java index 637aefd2e42..5c7bac6dbc9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java @@ -79,4 +79,3 @@ public class Bug4969110 { validatorHandler.setProperty(name, "123"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java index a3973ba4cd5..c0554c2478e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java @@ -66,4 +66,3 @@ public class Bug4969689 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java index cafb7dc502e..d78fe660b5f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java @@ -67,4 +67,3 @@ public class Bug4969692 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java index 8cfe3f8e748..fd203f3c734 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java @@ -67,4 +67,3 @@ public class Bug4969693 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java index dbc33468438..01d47b627e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java @@ -65,4 +65,3 @@ public class Bug4969695 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java index b633c960e61..cfec3964c19 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java @@ -112,4 +112,3 @@ public class Bug4969732 { parse(xmlReader, XML); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java index 8046b8d4df8..4954f41948a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java @@ -62,4 +62,3 @@ public class Bug4970380 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java index 354a3c1222a..28809222c12 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java @@ -53,4 +53,3 @@ public class Bug4970383 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java index d6de9217452..a8c761f23da 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java @@ -48,4 +48,3 @@ public class Bug4970400 { validatorHandler.setFeature("http://xml.org/sax/features/namespace-prefixes", true); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java index c31fc8d440e..c75604b4b5e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java @@ -123,4 +123,3 @@ public class Bug4970402 { parse(xmlReader, XML); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java index 2c4dfe9aa63..91b2891fdbf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java @@ -126,4 +126,3 @@ public class Bug4970951 { parse(xmlReader, XML); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java index 8ca323f0022..8654f283a04 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java @@ -66,4 +66,3 @@ public class Bug4971605 { Assert.assertNotNull(schema, "Failed: newSchema returned null."); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java index 6ee9bcacbb4..385bef46b58 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java @@ -56,4 +56,3 @@ public class Bug4971607 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java index 8c84351ffff..cf585a2df69 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java @@ -67,4 +67,3 @@ public class Bug4972882 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java index a4dfc4ca0a8..fb6dcdd4210 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java @@ -56,4 +56,3 @@ public class Bug4986844 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java index a5f0c528535..75a7ee51fa6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java @@ -60,4 +60,3 @@ public class Bug4987574 { schemaFactory.newSchema(tmpFile); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java index 51f735c5792..2da7618ed7c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java @@ -56,4 +56,3 @@ public class Bug4988267 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java index 85129933490..8de45e95ff3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java @@ -46,4 +46,3 @@ public class Bug4988268 { schemaFactory.newSchema(Bug4988268.class.getResource("Bug4988268.xsd")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java index c5c24343906..e9db60429ad 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java @@ -53,4 +53,3 @@ public class Bug4988387 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java index e27b80a56e8..ba546220580 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java @@ -90,4 +90,3 @@ class ErrorHandler extends DefaultHandler { errorCounter++; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java index d39c239211b..8c8d677c520 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java @@ -81,4 +81,3 @@ public class Bug4997818 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java index f8444a597aa..b3a85cadc68 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java @@ -108,4 +108,3 @@ public class Bug5011500 { validator.validate(xmlSource); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java index ff58fd76658..3d6b490f2c3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java @@ -125,4 +125,3 @@ public class Bug5072946 { Assert.assertSame(r.getNode(), n); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java index 344ff0f52e4..4bbc7560b19 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java @@ -53,4 +53,3 @@ public class Bug6378043 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java index 4ae313def37..8a96e05ae5f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java @@ -46,4 +46,3 @@ public class Bug6449797 { SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(getClass().getResource("Bug6449797.xsd")); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java index 60181d68ae6..f6c54b14b64 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java @@ -86,4 +86,3 @@ public class Bug6457662 { return rtn; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java index b5ebcb6dd31..5fa073eb2d5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java @@ -205,4 +205,3 @@ public class Bug6467424Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java index ceebedf2212..b9b0812c8e7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java @@ -88,4 +88,3 @@ public class Bug6483188 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java index ed790064c7f..71a1afee3f9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java @@ -48,4 +48,3 @@ public class Bug6493687 { System.out.println("Got here3"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java index 8e32d70ab19..f397677ce73 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java @@ -141,4 +141,3 @@ public class Bug6509668 { parse(xmlReader, XML); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java index 0ee1219b3b0..47d8d624c21 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java @@ -82,4 +82,3 @@ public class Bug6526547 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java index 01b5e861672..54e1e05ea90 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java @@ -70,4 +70,3 @@ public class Bug6531160 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java index c0f85a31e0e..88d37eec67e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java @@ -82,4 +82,3 @@ public class Bug6695843Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java index b50fa08e529..21479c6a6e3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java @@ -160,4 +160,3 @@ public class Bug6773084Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java index aafc2974ec1..c695aded8d7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java @@ -100,4 +100,3 @@ public class Bug6859210 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java index cc36b1e541d..8059723d700 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java @@ -210,4 +210,3 @@ public class Bug6925531Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java index e5dda822b03..e134d8b6b5c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java @@ -128,4 +128,3 @@ public class Bug6946312Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java index 38eebc162bc..510298c865d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java @@ -83,4 +83,3 @@ public class Bug6954738_Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java index 8221278929b..d3a0f1ef40c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java @@ -140,4 +140,3 @@ public class CR6708840Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java index 31af92f26fc..bccef3d37b8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java @@ -131,4 +131,3 @@ public class CR6740048 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java index 775fdd07c6a..95806ed3f21 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java @@ -45,4 +45,3 @@ public class ErrorHandlerImpl implements ErrorHandler { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java index 943f23d1b8c..459fa8c149a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java @@ -78,4 +78,3 @@ public class Issue682Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java index 68ba8c10152..6f0fb1b5a25 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java @@ -132,4 +132,3 @@ public class IssueTracker30 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java index 4b506680016..b42f5272893 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java @@ -84,4 +84,3 @@ public class JaxpIssue43Test { return list.toArray(new Source[list.size()]); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java index b53a10ee86e..7cf58257847 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java @@ -94,4 +94,3 @@ public class JaxpIssue49 { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java index 6681ab76918..78ac556e80a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java @@ -109,4 +109,3 @@ public class LargeMaxOccursTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java index 33340dd6a29..457cf697228 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java @@ -147,4 +147,3 @@ public class MultiOccursTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java index 8330ac5de52..58062410c43 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java @@ -115,4 +115,3 @@ public class MultiOccursUnboundedTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java index bce2b0d2d42..8e3613739d3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java @@ -147,4 +147,3 @@ public class OccursTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java index a986cc1f669..6e8213e0e8b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java @@ -115,4 +115,3 @@ public class OccursUnboundedTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java index 649dcd27d73..f29da26225d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java @@ -147,4 +147,3 @@ public class OccursWildcardTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java index ee82f528855..002c9983716 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java @@ -115,4 +115,3 @@ public class OccursWildcardUnbounded { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java index aa9540d911c..ac1450d05d3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java @@ -99,4 +99,3 @@ public class ParticlesId005Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java index f08dbad1e54..424d4f35c86 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java @@ -57,4 +57,3 @@ public class ParticlesIg004Test { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java index 05d727f536a..77da3675b83 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java @@ -98,4 +98,3 @@ public class ParticlesQ013Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/SchemaTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/SchemaTest.java index ef2bf3741c4..e9cd6473d3b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/SchemaTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/SchemaTest.java @@ -54,4 +54,3 @@ public class SchemaTest { factory.newSchema(new File(getClass().getResource("Bug8149915.xsd").getFile())); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java index 79fecdcf9f5..0f5e9dc5de5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java @@ -60,4 +60,3 @@ public class TCKGroupA008Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java index 720164f09cd..40ca0cc8d3a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java @@ -208,4 +208,3 @@ public class ValidatorTest { return xmlr; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java index bdd8107daba..de9b0d935e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java @@ -141,4 +141,3 @@ public class XMLDocBuilder { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java index b09a6b77674..beb05e56afb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java @@ -59,4 +59,3 @@ public class XMLSchemaValidator { validator.validate(new DOMSource(node)); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6943252Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6943252Test.java index 286094eb69f..663c7d87fd3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6943252Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6943252Test.java @@ -69,4 +69,3 @@ public class Bug6943252Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963124Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963124Test.java index 969c66d27ce..f2ff60839d9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963124Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963124Test.java @@ -61,4 +61,3 @@ public class Bug6963124Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963468Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963468Test.java index ea2f0894e37..e2e12b62067 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963468Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6963468Test.java @@ -148,4 +148,3 @@ public class Bug6963468Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6964720Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6964720Test.java index 0536cbe3514..96d68ff4874 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6964720Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6964720Test.java @@ -58,4 +58,3 @@ public class Bug6964720Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6967214Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6967214Test.java index 06e4ce81c92..9ff29807e61 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6967214Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6967214Test.java @@ -70,4 +70,3 @@ public class Bug6967214Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6970890Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6970890Test.java index 3e3afac5889..4e885d190e3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6970890Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6970890Test.java @@ -72,4 +72,3 @@ public class Bug6970890Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6971190Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6971190Test.java index ca733947c0e..b717ff184a3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6971190Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6971190Test.java @@ -102,4 +102,3 @@ public class Bug6971190Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6974551Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6974551Test.java index f4d3581f00c..210ca81ff05 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6974551Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6974551Test.java @@ -122,4 +122,3 @@ public class Bug6974551Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6975265Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6975265Test.java index 12ed8261b60..55f9903e470 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6975265Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6975265Test.java @@ -71,4 +71,3 @@ public class Bug6975265Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6977201Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6977201Test.java index df77551338b..e41bf4aea92 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6977201Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6977201Test.java @@ -71,4 +71,3 @@ public class Bug6977201Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6989956Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6989956Test.java index d1be119584b..3fe2676fa62 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6989956Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug6989956Test.java @@ -148,4 +148,3 @@ public class Bug6989956Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug7014246Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug7014246Test.java index 025c972c288..1f398cc71fb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug7014246Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/Bug7014246Test.java @@ -59,4 +59,3 @@ public class Bug7014246Test { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/ParticleTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/ParticleTest.java index 19a9eb77d68..50225cc7117 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/ParticleTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/ParticleTest.java @@ -63,4 +63,3 @@ public class ParticleTest { validator.validate(new StreamSource(ParticleTest.class.getResourceAsStream("upa01.xml"))); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/RegexWord.java b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/RegexWord.java index a46c7c720b2..3a127367be6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/tck/RegexWord.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/tck/RegexWord.java @@ -63,4 +63,3 @@ public class RegexWord { validator.validate(new StreamSource(RegexWord.class.getResourceAsStream("reZ003vExc23082309.xml"))); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991857.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991857.java index a8f65a22b48..7422497f030 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991857.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991857.java @@ -92,4 +92,3 @@ public class Bug4991857 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991939.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991939.java index d201f489461..58f7e1ce33a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991939.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4991939.java @@ -61,4 +61,3 @@ public class Bug4991939 { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992788.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992788.java index 4da3e2de999..dd5ace27633 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992788.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992788.java @@ -82,4 +82,3 @@ public class Bug4992788 { return xpath; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992793.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992793.java index 2e4a4128ff9..2aad726f9fd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992793.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992793.java @@ -83,4 +83,3 @@ public class Bug4992793 { return xpath; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992805.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992805.java index 97a9abfcca4..45449364017 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992805.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/Bug4992805.java @@ -70,4 +70,3 @@ public class Bug4992805 { return xpath; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/ClassLoaderTest.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/ClassLoaderTest.java index d5a52bda8a2..15411a0e25d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/ClassLoaderTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/ClassLoaderTest.java @@ -54,4 +54,3 @@ public class ClassLoaderTest { } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/MyClassLoader.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/MyClassLoader.java index 39a0d72815c..d333e7053a6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/MyClassLoader.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/MyClassLoader.java @@ -47,4 +47,3 @@ public class MyClassLoader extends ClassLoader { return isCalled; } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/SecureProcessingTest.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/SecureProcessingTest.java index a78c1e1439b..d0e100d6f0d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/SecureProcessingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/SecureProcessingTest.java @@ -196,4 +196,3 @@ public class SecureProcessingTest { } } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathAnyTypeTest.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathAnyTypeTest.java index 6ba9ceb48bd..efe1fa2a61b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathAnyTypeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathAnyTypeTest.java @@ -200,4 +200,3 @@ public class XPathAnyTypeTest extends XPathTestBase { verifyResult(result, "Customer"); } } - diff --git a/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathExpAnyTypeTest.java b/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathExpAnyTypeTest.java index f661fe9a035..1717f5d74d5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathExpAnyTypeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/xpath/XPathExpAnyTypeTest.java @@ -187,4 +187,3 @@ public class XPathExpAnyTypeTest extends XPathTestBase { } } - diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 19675fb9b1a..0217f716612 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -380,3 +380,4 @@ fe4e11bd2423635dc0f5f5cb9a64eb2f2cce7f4c jdk-9+128 9fff2477a4cadf2a9618a76f1f4fe0f20bb5ff3b jdk-9+132 05e99eefda2b58d1ed176e411302d9d6b35dca16 jdk-9+133 ab1d78d395d4cb8be426ff181211da1a4085cf01 jdk-9+134 +22631824f55128a7ab6605493b3001a37af6a168 jdk-9+135 diff --git a/jdk/.hgtags b/jdk/.hgtags index ff5e6944eca..d92b0709299 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -378,3 +378,4 @@ d5c70818cd8a82e76632c8c815bdb4f75f53aeaf jdk-9+132 3cdae27c90b5e41afe75eab904fda19fac076330 jdk-9+133 803adcd526d74ae0b64948d1f8260c2dbe514779 jdk-9+134 021369229cfd0b5feb76834b2ea498f47f43c0f3 jdk-9+135 +54c5931849a33a363e03fdffa141503f5cc4779d jdk-9+136 diff --git a/jdk/make/mapfiles/libattach/mapfile-linux b/jdk/make/mapfiles/libattach/mapfile-linux index b569ae5e637..1ffc29329a0 100644 --- a/jdk/make/mapfiles/libattach/mapfile-linux +++ b/jdk/make/mapfiles/libattach/mapfile-linux @@ -30,8 +30,6 @@ SUNWprivate_1.1 { Java_sun_tools_attach_VirtualMachineImpl_checkPermissions; Java_sun_tools_attach_VirtualMachineImpl_close; Java_sun_tools_attach_VirtualMachineImpl_connect; - Java_sun_tools_attach_VirtualMachineImpl_getLinuxThreadsManager; - Java_sun_tools_attach_VirtualMachineImpl_isLinuxThreads; Java_sun_tools_attach_VirtualMachineImpl_open; Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo; Java_sun_tools_attach_VirtualMachineImpl_sendQuitToChildrenOf; diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers index c34ba2f709d..20ea7c916b8 100644 --- a/jdk/make/mapfiles/libjava/mapfile-vers +++ b/jdk/make/mapfiles/libjava/mapfile-vers @@ -176,6 +176,9 @@ SUNWprivate_1.1 { Java_java_lang_ProcessHandleImpl_00024Info_info0; Java_java_lang_ProcessImpl_init; Java_java_lang_ProcessImpl_forkAndExec; + Java_java_lang_ref_Reference_getAndClearReferencePendingList; + Java_java_lang_ref_Reference_hasReferencePendingList; + Java_java_lang_ref_Reference_waitForReferencePendingList; Java_java_lang_reflect_Array_get; Java_java_lang_reflect_Array_getBoolean; Java_java_lang_reflect_Array_getByte; diff --git a/jdk/src/java.base/aix/native/libnet/aix_close.c b/jdk/src/java.base/aix/native/libnet/aix_close.c index 77b5daecf60..1588d485640 100644 --- a/jdk/src/java.base/aix/native/libnet/aix_close.c +++ b/jdk/src/java.base/aix/native/libnet/aix_close.c @@ -410,6 +410,10 @@ int NET_Read(int s, void* buf, size_t len) { BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); } +int NET_NonBlockingRead(int s, void* buf, size_t len) { + BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK)); +} + int NET_ReadV(int s, const struct iovec * vector, int count) { BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); } @@ -503,8 +507,8 @@ int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { * Auto restarts with adjusted timeout if interrupted by * signal other than our wakeup signal. */ -int NET_Timeout(int s, long timeout) { - long prevtime = 0, newtime; +int NET_Timeout0(int s, long timeout, long currentTime) { + long prevtime = currentTime, newtime; struct timeval t; fdEntry_t *fdEntry = getFdEntry(s); @@ -516,14 +520,6 @@ int NET_Timeout(int s, long timeout) { return -1; } - /* - * Pick up current time as may need to adjust timeout - */ - if (timeout > 0) { - gettimeofday(&t, NULL); - prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; - } - for(;;) { struct pollfd pfd; int rv; diff --git a/jdk/src/java.base/linux/native/libnet/linux_close.c b/jdk/src/java.base/linux/native/libnet/linux_close.c index 45ab7b4dc1b..2bf7cc72283 100644 --- a/jdk/src/java.base/linux/native/libnet/linux_close.c +++ b/jdk/src/java.base/linux/native/libnet/linux_close.c @@ -367,6 +367,10 @@ int NET_Read(int s, void* buf, size_t len) { BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); } +int NET_NonBlockingRead(int s, void* buf, size_t len) { + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) ); +} + int NET_ReadV(int s, const struct iovec * vector, int count) { BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); } @@ -406,8 +410,8 @@ int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { * Auto restarts with adjusted timeout if interrupted by * signal other than our wakeup signal. */ -int NET_Timeout(int s, long timeout) { - long prevtime = 0, newtime; +int NET_Timeout0(int s, long timeout, long currentTime) { + long prevtime = currentTime, newtime; struct timeval t; fdEntry_t *fdEntry = getFdEntry(s); @@ -419,14 +423,6 @@ int NET_Timeout(int s, long timeout) { return -1; } - /* - * Pick up current time as may need to adjust timeout - */ - if (timeout > 0) { - gettimeofday(&t, NULL); - prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; - } - for(;;) { struct pollfd pfd; int rv; diff --git a/jdk/src/java.base/macosx/native/libnet/bsd_close.c b/jdk/src/java.base/macosx/native/libnet/bsd_close.c index 728ea8bf1d7..14739b12caf 100644 --- a/jdk/src/java.base/macosx/native/libnet/bsd_close.c +++ b/jdk/src/java.base/macosx/native/libnet/bsd_close.c @@ -371,6 +371,10 @@ int NET_Read(int s, void* buf, size_t len) { BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); } +int NET_NonBlockingRead(int s, void* buf, size_t len) { + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT)); +} + int NET_ReadV(int s, const struct iovec * vector, int count) { BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); } @@ -410,8 +414,8 @@ int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { * Auto restarts with adjusted timeout if interrupted by * signal other than our wakeup signal. */ -int NET_Timeout(int s, long timeout) { - long prevtime = 0, newtime; +int NET_Timeout0(int s, long timeout, long currentTime) { + long prevtime = currentTime, newtime; struct timeval t, *tp = &t; fd_set fds; fd_set* fdsp = NULL; @@ -432,9 +436,6 @@ int NET_Timeout(int s, long timeout) { */ if (timeout > 0) { /* Timed */ - struct timeval now; - gettimeofday(&now, NULL); - prevtime = now.tv_sec * 1000 + now.tv_usec / 1000; t.tv_sec = timeout / 1000; t.tv_usec = (timeout % 1000) * 1000; } else if (timeout < 0) { diff --git a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java index 0a6728d007e..cd4bd8065bc 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, 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 @@ -110,22 +110,6 @@ public abstract class Reference { private transient Reference discovered; /* used by VM */ - /* Object used to synchronize with the garbage collector. The collector - * must acquire this lock at the beginning of each collection cycle. It is - * therefore critical that any code holding this lock complete as quickly - * as possible, allocate no new objects, and avoid calling user code. - */ - private static class Lock { } - private static Lock lock = new Lock(); - - - /* List of References waiting to be enqueued. The collector adds - * References to this list, while the Reference-handler thread removes - * them. This list is protected by the above lock object. The - * list uses the discovered field to link its elements. - */ - private static Reference pending = null; - /* High-priority thread to enqueue pending References */ private static class ReferenceHandler extends Thread { @@ -139,10 +123,9 @@ public abstract class Reference { } static { - // pre-load and initialize InterruptedException and Cleaner classes - // so that we don't get into trouble later in the run loop if there's - // memory shortage while loading/initializing them lazily. - ensureClassInitialized(InterruptedException.class); + // pre-load and initialize Cleaner class so that we don't + // get into trouble later in the run loop if there's + // memory shortage while loading/initializing it lazily. ensureClassInitialized(Cleaner.class); } @@ -152,72 +135,80 @@ public abstract class Reference { public void run() { while (true) { - tryHandlePending(true); + processPendingReferences(); } } } - /** - * Try handle pending {@link Reference} if there is one.

- * Return {@code true} as a hint that there might be another - * {@link Reference} pending or {@code false} when there are no more pending - * {@link Reference}s at the moment and the program can do some other - * useful work instead of looping. - * - * @param waitForNotify if {@code true} and there was no pending - * {@link Reference}, wait until notified from VM - * or interrupted; if {@code false}, return immediately - * when there is no pending {@link Reference}. - * @return {@code true} if there was a {@link Reference} pending and it - * was processed, or we waited for notification and either got it - * or thread was interrupted before being notified; - * {@code false} otherwise. + /* Atomically get and clear (set to null) the VM's pending list. */ - static boolean tryHandlePending(boolean waitForNotify) { - Reference r; - Cleaner c; - try { - synchronized (lock) { - if (pending != null) { - r = pending; - // 'instanceof' might throw OutOfMemoryError sometimes - // so do this before un-linking 'r' from the 'pending' chain... - c = r instanceof Cleaner ? (Cleaner) r : null; - // unlink 'r' from 'pending' chain - pending = r.discovered; - r.discovered = null; - } else { - // The waiting on the lock may cause an OutOfMemoryError - // because it may try to allocate exception objects. - if (waitForNotify) { - lock.wait(); - } - // retry if waited - return waitForNotify; + private static native Reference getAndClearReferencePendingList(); + + /* Test whether the VM's pending list contains any entries. + */ + private static native boolean hasReferencePendingList(); + + /* Wait until the VM's pending list may be non-null. + */ + private static native void waitForReferencePendingList(); + + private static final Object processPendingLock = new Object(); + private static boolean processPendingActive = false; + + private static void processPendingReferences() { + // Only the singleton reference processing thread calls + // waitForReferencePendingList() and getAndClearReferencePendingList(). + // These are separate operations to avoid a race with other threads + // that are calling waitForReferenceProcessing(). + waitForReferencePendingList(); + Reference pendingList; + synchronized (processPendingLock) { + pendingList = getAndClearReferencePendingList(); + processPendingActive = true; + } + while (pendingList != null) { + Reference ref = pendingList; + pendingList = ref.discovered; + ref.discovered = null; + + if (ref instanceof Cleaner) { + ((Cleaner)ref).clean(); + // Notify any waiters that progress has been made. + // This improves latency for nio.Bits waiters, which + // are the only important ones. + synchronized (processPendingLock) { + processPendingLock.notifyAll(); } + } else { + ReferenceQueue q = ref.queue; + if (q != ReferenceQueue.NULL) q.enqueue(ref); } - } catch (OutOfMemoryError x) { - // Give other threads CPU time so they hopefully drop some live references - // and GC reclaims some space. - // Also prevent CPU intensive spinning in case 'r instanceof Cleaner' above - // persistently throws OOME for some time... - Thread.yield(); - // retry - return true; - } catch (InterruptedException x) { - // retry - return true; } - - // Fast path for cleaners - if (c != null) { - c.clean(); - return true; + // Notify any waiters of completion of current round. + synchronized (processPendingLock) { + processPendingActive = false; + processPendingLock.notifyAll(); } + } - ReferenceQueue q = r.queue; - if (q != ReferenceQueue.NULL) q.enqueue(r); - return true; + // Wait for progress in reference processing. + // + // Returns true after waiting (for notification from the reference + // processing thread) if either (1) the VM has any pending + // references, or (2) the reference processing thread is + // processing references. Otherwise, returns false immediately. + private static boolean waitForReferenceProcessing() + throws InterruptedException + { + synchronized (processPendingLock) { + if (processPendingActive || hasReferencePendingList()) { + // Wait for progress, not necessarily completion. + processPendingLock.wait(); + return true; + } else { + return false; + } + } } static { @@ -236,8 +227,10 @@ public abstract class Reference { // provide access in SharedSecrets SharedSecrets.setJavaLangRefAccess(new JavaLangRefAccess() { @Override - public boolean tryHandlePendingReference() { - return tryHandlePending(false); + public boolean waitForReferenceProcessing() + throws InterruptedException + { + return Reference.waitForReferenceProcessing(); } }); } diff --git a/jdk/src/java.base/share/classes/java/nio/Bits.java b/jdk/src/java.base/share/classes/java/nio/Bits.java index 8a7dcf77253..dfe6a8f13a7 100644 --- a/jdk/src/java.base/share/classes/java/nio/Bits.java +++ b/jdk/src/java.base/share/classes/java/nio/Bits.java @@ -131,23 +131,38 @@ class Bits { // package-private } final JavaLangRefAccess jlra = SharedSecrets.getJavaLangRefAccess(); - - // retry while helping enqueue pending Reference objects - // which includes executing pending Cleaner(s) which includes - // Cleaner(s) that free direct buffer memory - while (jlra.tryHandlePendingReference()) { - if (tryReserveMemory(size, cap)) { - return; - } - } - - // trigger VM's Reference processing - System.gc(); - - // a retry loop with exponential back-off delays - // (this gives VM some time to do it's job) boolean interrupted = false; try { + + // Retry allocation until success or there are no more + // references (including Cleaners that might free direct + // buffer memory) to process and allocation still fails. + boolean refprocActive; + do { + try { + refprocActive = jlra.waitForReferenceProcessing(); + } catch (InterruptedException e) { + // Defer interrupts and keep trying. + interrupted = true; + refprocActive = true; + } + if (tryReserveMemory(size, cap)) { + return; + } + } while (refprocActive); + + // trigger VM's Reference processing + System.gc(); + + // A retry loop with exponential back-off delays. + // Sometimes it would suffice to give up once reference + // processing is complete. But if there are many threads + // competing for memory, this gives more opportunities for + // any given thread to make progress. In particular, this + // seems to be enough for a stress test like + // DirectBufferAllocTest to (usually) succeed, while + // without it that test likely fails. Since failure here + // ends in OOME, there's no need to hurry. long sleepTime = 1; int sleeps = 0; while (true) { @@ -157,14 +172,14 @@ class Bits { // package-private if (sleeps >= MAX_SLEEPS) { break; } - if (!jlra.tryHandlePendingReference()) { - try { + try { + if (!jlra.waitForReferenceProcessing()) { Thread.sleep(sleepTime); sleepTime <<= 1; sleeps++; - } catch (InterruptedException e) { - interrupted = true; } + } catch (InterruptedException e) { + interrupted = true; } } diff --git a/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java index 860953fc271..4c4498e1b6b 100644 --- a/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -206,5 +206,5 @@ public abstract class ListResourceBundle extends ResourceBundle { lookup = temp; } - private Map lookup = null; + private volatile Map lookup = null; } diff --git a/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java b/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java index 3a481035c92..502b6a4bc79 100644 --- a/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -46,8 +46,6 @@ import java.io.IOException; import java.nio.charset.MalformedInputException; import java.nio.charset.StandardCharsets; import java.nio.charset.UnmappableCharacterException; -import java.security.AccessController; -import java.util.Locale; import sun.security.action.GetPropertyAction; import sun.util.PropertyResourceBundleCharset; import sun.util.ResourceBundleEnumeration; @@ -236,5 +234,5 @@ public class PropertyResourceBundle extends ResourceBundle { // ==================privates==================== - private Map lookup; + private final Map lookup; } diff --git a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java index 081fefd58ab..6b3abf50d78 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java +++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java @@ -536,19 +536,6 @@ class JarFile extends ZipFile { * @return an ordered {@code Stream} of entries in this jar file * @throws IllegalStateException if the jar file has been closed * @since 1.8 - * - * @apiNote A versioned view of the stream obtained from a {@code JarFile} - * configured to process a multi-release jar file can be created with code - * similar to the following: - *
-     * {@code
-     *     Stream versionedStream(JarFile jf) {
-     *         return jf.stream().map(JarEntry::getName)
-     *                  .filter(name -> !name.startsWith("META-INF/versions/"))
-     *                  .map(jf::getJarEntry);
-     *     }
-     * }
-     * 
*/ public Stream stream() { return StreamSupport.stream(Spliterators.spliterator( @@ -571,7 +558,7 @@ class JarFile extends ZipFile { private ZipEntry getVersionedEntry(ZipEntry ze) { ZipEntry vze = null; - if (BASE_VERSION_MAJOR < versionMajor && !ze.isDirectory()) { + if (BASE_VERSION_MAJOR < versionMajor) { String name = ze.getName(); if (!name.startsWith(META_INF)) { vze = searchForVersionedEntry(versionMajor, name); diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java index 374ca55c847..81c72bcbe91 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, 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 @@ -28,12 +28,12 @@ package jdk.internal.misc; public interface JavaLangRefAccess { /** - * Help ReferenceHandler thread process next pending - * {@link java.lang.ref.Reference} + * Wait for progress in {@link java.lang.ref.Reference} + * processing. If there aren't any pending {@link + * java.lang.ref.Reference}s, return immediately. * - * @return {@code true} if there was a pending reference and it - * was enqueue-ed or {@code false} if there was no - * pending reference + * @return {@code true} if there were any pending + * {@link java.lang.ref.Reference}s, {@code false} otherwise. */ - boolean tryHandlePendingReference(); + boolean waitForReferenceProcessing() throws InterruptedException; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java index f86f5ab69d3..a5f3126c16f 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java @@ -1197,6 +1197,9 @@ public final class Unsafe { if (hostClass == null || data == null) { throw new NullPointerException(); } + if (hostClass.isArray() || hostClass.isPrimitive()) { + throw new IllegalArgumentException(); + } return defineAnonymousClass0(hostClass, data, cpPatches); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/util/jar/VersionedStream.java b/jdk/src/java.base/share/classes/jdk/internal/util/jar/VersionedStream.java new file mode 100644 index 00000000000..3eb33a428c6 --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/util/jar/VersionedStream.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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. + */ + +package jdk.internal.util.jar; + +import java.util.Objects; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.stream.Stream; + +public class VersionedStream { + private static final String META_INF_VERSIONS = "META-INF/versions/"; + + /** + * Returns a stream of versioned entries, derived from the base names of + * all entries in a multi-release {@code JarFile} that are present either in + * the base directory or in any versioned directory with a version number + * less than or equal to the {@code Runtime.Version::major} that the + * {@code JarFile} was opened with. These versioned entries are aliases + * for the real entries -- i.e. the names are base names and the content + * may come from a versioned directory entry. If the {@code jarFile} is not + * a multi-release jar, a stream of all entries is returned. + * + * @param jf the input JarFile + * @return stream of entries + * @since 9 + */ + public static Stream stream(JarFile jf) { + if (jf.isMultiRelease()) { + int version = jf.getVersion().major(); + return jf.stream() + .map(je -> getBaseSuffix(je, version)) + .filter(Objects::nonNull) + .distinct() + .map(jf::getJarEntry); + } + return jf.stream(); + } + + private static String getBaseSuffix(JarEntry je, int version) { + String name = je.getName(); + if (name.startsWith(META_INF_VERSIONS)) { + int len = META_INF_VERSIONS.length(); + int index = name.indexOf('/', len); + if (index == -1 || index == (name.length() - 1)) { + // filter out META-INF/versions/* and META-INF/versions/*/ + return null; + } + try { + if (Integer.parseInt(name, len, index, 10) > version) { + // not an integer + return null; + } + } catch (NumberFormatException x) { + // silently remove malformed entries + return null; + } + // We know name looks like META-INF/versions/*/* + return name.substring(index + 1); + } + return name; + } +} diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index ae5ebbbb070..f49111be646 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -143,7 +143,8 @@ module java.base { exports jdk.internal.org.objectweb.asm.signature to jdk.scripting.nashorn; exports jdk.internal.loader to - java.instrument; + java.instrument, + java.logging; exports jdk.internal.math to java.desktop; exports jdk.internal.module to diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties index 23fcac28865..b68e6a6a448 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties @@ -103,34 +103,42 @@ See http://www.oracle.com/technetwork/java/javase/documentation/index.html for m # Translators please note do not translate the options themselves java.launcher.X.usage=\ -\ -Xmixed mixed mode execution (default)\n\ -\ -Xint interpreted mode execution only\n\ +\ -Xbatch disable background compilation\n\ \ -Xbootclasspath/a:\n\ \ append to end of bootstrap class path\n\ +\ -Xcheck:jni perform additional checks for JNI functions\n\ +\ -Xcomp forces compilation of methods on first invocation\n\ +\ -Xdebug provided for backward compatibility\n\ \ -Xdiag show additional diagnostic messages\n\ \ -Xdiag:resolver show resolver diagnostic messages\n\ -\ -Xnoclassgc disable class garbage collection\n\ +\ -Xdisable-@files disable further argument file expansion\n\ +\ -Xfuture enable strictest checks, anticipating future default\n\ +\ -Xint interpreted mode execution only\n\ +\ -Xinternalversion\n\ +\ displays more detailed JVM version information than the\n\ +\ -version option\n\ \ -Xloggc: log GC status to a file with time stamps\n\ -\ -Xbatch disable background compilation\n\ +\ -Xmixed mixed mode execution (default)\n\ +\ -Xmn sets the initial and maximum size (in bytes) of the heap\n\ +\ for the young generation (nursery)\n\ \ -Xms set initial Java heap size\n\ \ -Xmx set maximum Java heap size\n\ -\ -Xss set java thread stack size\n\ +\ -Xnoclassgc disable class garbage collection\n\ \ -Xprof output cpu profiling data\n\ -\ -Xfuture enable strictest checks, anticipating future default\n\ \ -Xrs reduce use of OS signals by Java/VM (see documentation)\n\ -\ -Xcheck:jni perform additional checks for JNI functions\n\ -\ -Xshare:off do not attempt to use shared class data\n\ \ -Xshare:auto use shared class data if possible (default)\n\ +\ -Xshare:off do not attempt to use shared class data\n\ \ -Xshare:on require using shared class data, otherwise fail.\n\ \ -XshowSettings show all settings and continue\n\ \ -XshowSettings:all\n\ \ show all settings and continue\n\ -\ -XshowSettings:vm show all vm related settings and continue\n\ -\ -XshowSettings:properties\n\ -\ show all property settings and continue\n\ \ -XshowSettings:locale\n\ \ show all locale related settings and continue\n\ -\ -Xdisable-@files disable further argument file expansion\n\ +\ -XshowSettings:properties\n\ +\ show all property settings and continue\n\ +\ -XshowSettings:vm show all vm related settings and continue\n\ +\ -Xss set java thread stack size\n\ +\ -Xverify sets the mode of the bytecode verifier\n\ \ --add-reads =(,)*\n\ \ updates to read , regardless\n\ \ of module declaration. \n\ diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java index daa56325e2f..fb12cf77626 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java @@ -125,7 +125,9 @@ public class JarURLConnection extends java.net.JarURLConnection { * to get the jarFile, and set it as our permission. */ if (getUseCaches()) { + boolean oldUseCaches = jarFileURLConnection.getUseCaches(); jarFileURLConnection = factory.getConnection(jarFile); + jarFileURLConnection.setUseCaches(oldUseCaches); } if ((entryName != null)) { diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java index 2d917d0604e..ad805e60b41 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, 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 @@ -125,7 +125,7 @@ public final class OCSP { ("Exception while encoding OCSPRequest", e); } OCSPResponse ocspResponse = check(Collections.singletonList(certId), - responderURI, issuerCert, null, null, + responderURI, new OCSPResponse.IssuerInfo(issuerCert), null, null, Collections.emptyList()); return (RevocationStatus)ocspResponse.getSingleResponse(certId); } @@ -173,7 +173,8 @@ public final class OCSP { ("Exception while encoding OCSPRequest", e); } OCSPResponse ocspResponse = check(Collections.singletonList(certId), - responderURI, issuerCert, responderCert, date, extensions); + responderURI, new OCSPResponse.IssuerInfo(issuerCert), + responderCert, date, extensions); return (RevocationStatus) ocspResponse.getSingleResponse(certId); } @@ -182,7 +183,7 @@ public final class OCSP { * * @param certIds the CertIds to be checked * @param responderURI the URI of the OCSP responder - * @param issuerCert the issuer's certificate + * @param issuerInfo the issuer's certificate and/or subject and public key * @param responderCert the OCSP responder's certificate * @param date the time the validity of the OCSP responder's certificate * should be checked against. If null, the current time is used. @@ -195,8 +196,8 @@ public final class OCSP { * @throws CertPathValidatorException if an exception occurs while * encoding the OCSP Request or validating the OCSP Response */ - static OCSPResponse check(List certIds, URI responderURI, - X509Certificate issuerCert, + static OCSPResponse check(List certIds, URI responderURI, + OCSPResponse.IssuerInfo issuerInfo, X509Certificate responderCert, Date date, List extensions) throws IOException, CertPathValidatorException @@ -214,7 +215,7 @@ public final class OCSP { ocspResponse = new OCSPResponse(response); // verify the response - ocspResponse.verify(certIds, issuerCert, responderCert, date, + ocspResponse.verify(certIds, issuerInfo, responderCert, date, nonce); } catch (IOException ioe) { throw new CertPathValidatorException( diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java index 0ef14abc68a..a2b74d1bdeb 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -41,6 +41,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import javax.security.auth.x500.X500Principal; @@ -373,8 +374,8 @@ public final class OCSPResponse { } } - void verify(List certIds, X509Certificate issuerCert, - X509Certificate responderCert, Date date, byte[] nonce) + void verify(List certIds, IssuerInfo issuerInfo, + X509Certificate responderCert, Date date, byte[] nonce) throws CertPathValidatorException { switch (responseStatus) { @@ -414,7 +415,9 @@ public final class OCSPResponse { // Add the Issuing CA cert and/or Trusted Responder cert to the list // of certs from the OCSP response try { - certs.add(X509CertImpl.toImpl(issuerCert)); + if (issuerInfo.getCertificate() != null) { + certs.add(X509CertImpl.toImpl(issuerInfo.getCertificate())); + } if (responderCert != null) { certs.add(X509CertImpl.toImpl(responderCert)); } @@ -464,7 +467,10 @@ public final class OCSPResponse { // Check whether the signer cert returned by the responder is trusted if (signerCert != null) { // Check if the response is signed by the issuing CA - if (signerCert.equals(issuerCert)) { + if (signerCert.getSubjectX500Principal().equals( + issuerInfo.getName()) && + signerCert.getPublicKey().equals( + issuerInfo.getPublicKey())) { if (debug != null) { debug.println("OCSP response is signed by the target's " + "Issuing CA"); @@ -481,7 +487,7 @@ public final class OCSPResponse { // Check if the response is signed by an authorized responder } else if (signerCert.getIssuerX500Principal().equals( - issuerCert.getSubjectX500Principal())) { + issuerInfo.getName())) { // Check for the OCSPSigning key purpose try { @@ -502,7 +508,8 @@ public final class OCSPResponse { // Check algorithm constraints specified in security property // "jdk.certpath.disabledAlgorithms". AlgorithmChecker algChecker = new AlgorithmChecker( - new TrustAnchor(issuerCert, null)); + new TrustAnchor(issuerInfo.getName(), + issuerInfo.getPublicKey(), null)); algChecker.init(false); algChecker.check(signerCert, Collections.emptySet()); @@ -540,7 +547,7 @@ public final class OCSPResponse { // verify the signature try { - signerCert.verify(issuerCert.getPublicKey()); + signerCert.verify(issuerInfo.getPublicKey()); if (debug != null) { debug.println("OCSP response is signed by an " + "Authorized Responder"); @@ -971,4 +978,86 @@ public final class OCSPResponse { return sb.toString(); } } + + /** + * Helper class that allows consumers to pass in issuer information. This + * will always consist of the issuer's name and public key, but may also + * contain a certificate if the originating data is in that form. + */ + static final class IssuerInfo { + private final X509Certificate certificate; + private final X500Principal name; + private final PublicKey pubKey; + + IssuerInfo(X509Certificate issuerCert) { + certificate = Objects.requireNonNull(issuerCert, + "Constructor requires non-null certificate"); + name = certificate.getSubjectX500Principal(); + pubKey = certificate.getPublicKey(); + } + + IssuerInfo(X500Principal subjectName, PublicKey key) { + certificate = null; + name = Objects.requireNonNull(subjectName, + "Constructor requires non-null subject"); + pubKey = Objects.requireNonNull(key, + "Constructor requires non-null public key"); + } + + IssuerInfo(TrustAnchor anchor) { + certificate = anchor.getTrustedCert(); + if (certificate != null) { + name = certificate.getSubjectX500Principal(); + pubKey = certificate.getPublicKey(); + } else { + name = anchor.getCA(); + pubKey = anchor.getCAPublicKey(); + } + } + + /** + * Get the certificate in this IssuerInfo if present. + * + * @return the {@code X509Certificate} used to create this IssuerInfo + * object, or {@code null} if a certificate was not used in its + * creation. + */ + X509Certificate getCertificate() { + return certificate; + } + + /** + * Get the name of this issuer. + * + * @return an {@code X500Principal} corresponding to this issuer's + * name. If derived from an issuer's {@code X509Certificate} this + * would be equivalent to the certificate subject name. + */ + X500Principal getName() { + return name; + } + + /** + * Get the public key for this issuer. + * + * @return a {@code PublicKey} for this issuer. + */ + PublicKey getPublicKey() { + return pubKey; + } + + /** + * Create a string representation of this IssuerInfo. + * + * @return a {@code String} form of this IssuerInfo object. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("Issuer Info:\n"); + sb.append("Name: ").append(name.toString()).append("\n"); + sb.append("Public Key:\n").append(pubKey.toString()).append("\n"); + return sb.toString(); + } + } } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java index 002a6c37776..e3de6a959e7 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, 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 @@ -61,12 +61,12 @@ class RevocationChecker extends PKIXRevocationChecker { private List certStores; private Map ocspResponses; private List ocspExtensions; - private boolean legacy; + private final boolean legacy; private LinkedList softFailExceptions = new LinkedList<>(); // state variables - private X509Certificate issuerCert; + private OCSPResponse.IssuerInfo issuerInfo; private PublicKey prevPubKey; private boolean crlSignFlag; private int certIndex; @@ -301,9 +301,9 @@ class RevocationChecker extends PKIXRevocationChecker { CertPathValidatorException("forward checking not supported"); } if (anchor != null) { - issuerCert = anchor.getTrustedCert(); - prevPubKey = (issuerCert != null) ? issuerCert.getPublicKey() - : anchor.getCAPublicKey(); + issuerInfo = new OCSPResponse.IssuerInfo(anchor); + prevPubKey = issuerInfo.getPublicKey(); + } crlSignFlag = true; if (params != null && params.certPath() != null) { @@ -437,7 +437,7 @@ class RevocationChecker extends PKIXRevocationChecker { private void updateState(X509Certificate cert) throws CertPathValidatorException { - issuerCert = cert; + issuerInfo = new OCSPResponse.IssuerInfo(cert); // Make new public key if parameters are missing PublicKey pubKey = cert.getPublicKey(); @@ -708,14 +708,8 @@ class RevocationChecker extends PKIXRevocationChecker { OCSPResponse response = null; CertId certId = null; try { - if (issuerCert != null) { - certId = new CertId(issuerCert, - currCert.getSerialNumberObject()); - } else { - // must be an anchor name and key - certId = new CertId(anchor.getCA(), anchor.getCAPublicKey(), - currCert.getSerialNumberObject()); - } + certId = new CertId(issuerInfo.getName(), issuerInfo.getPublicKey(), + currCert.getSerialNumberObject()); // check if there is a cached OCSP response available byte[] responseBytes = ocspResponses.get(cert); @@ -732,8 +726,8 @@ class RevocationChecker extends PKIXRevocationChecker { nonce = ext.getValue(); } } - response.verify(Collections.singletonList(certId), issuerCert, - responderCert, params.date(), nonce); + response.verify(Collections.singletonList(certId), issuerInfo, + responderCert, params.date(), nonce); } else { URI responderURI = (this.responderURI != null) @@ -746,8 +740,8 @@ class RevocationChecker extends PKIXRevocationChecker { } response = OCSP.check(Collections.singletonList(certId), - responderURI, issuerCert, responderCert, - null, ocspExtensions); + responderURI, issuerInfo, + responderCert, null, ocspExtensions); } } catch (IOException e) { throw new CertPathValidatorException( diff --git a/jdk/src/java.base/share/native/include/jvm.h b/jdk/src/java.base/share/native/include/jvm.h index 2011e58352a..bf60a857beb 100644 --- a/jdk/src/java.base/share/native/include/jvm.h +++ b/jdk/src/java.base/share/native/include/jvm.h @@ -281,6 +281,18 @@ JVM_GetSystemPackage(JNIEnv *env, jstring name); JNIEXPORT jobjectArray JNICALL JVM_GetSystemPackages(JNIEnv *env); +/* + * java.lang.ref.Reference + */ +JNIEXPORT jobject JNICALL +JVM_GetAndClearReferencePendingList(JNIEnv *env); + +JNIEXPORT jboolean JNICALL +JVM_HasReferencePendingList(JNIEnv *env); + +JNIEXPORT void JNICALL +JVM_WaitForReferencePendingList(JNIEnv *env); + /* * java.io.ObjectInputStream */ diff --git a/jdk/src/java.base/share/native/libjava/Reference.c b/jdk/src/java.base/share/native/libjava/Reference.c new file mode 100644 index 00000000000..92c518c5d90 --- /dev/null +++ b/jdk/src/java.base/share/native/libjava/Reference.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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. + */ + +#include "jvm.h" +#include "java_lang_ref_Reference.h" + +JNIEXPORT jobject JNICALL +Java_java_lang_ref_Reference_getAndClearReferencePendingList(JNIEnv *env, jclass ignore) +{ + return JVM_GetAndClearReferencePendingList(env); +} + +JNIEXPORT jboolean JNICALL +Java_java_lang_ref_Reference_hasReferencePendingList(JNIEnv *env, jclass ignore) +{ + return JVM_HasReferencePendingList(env); +} + +JNIEXPORT void JNICALL +Java_java_lang_ref_Reference_waitForReferencePendingList(JNIEnv *env, jclass ignore) +{ + JVM_WaitForReferencePendingList(env); +} diff --git a/jdk/src/java.base/share/native/libjli/java.h b/jdk/src/java.base/share/native/libjli/java.h index 41a232714c8..b5056de84a9 100644 --- a/jdk/src/java.base/share/native/libjli/java.h +++ b/jdk/src/java.base/share/native/libjli/java.h @@ -112,6 +112,9 @@ GetXUsagePath(char *buf, jint bufsize); jboolean GetApplicationHome(char *buf, jint bufsize); +jboolean +GetApplicationHomeFromDll(char *buf, jint bufsize); + #define GetArch() GetArchPath(CURRENT_DATA_MODEL) /* diff --git a/jdk/src/java.base/solaris/native/libnet/solaris_close.c b/jdk/src/java.base/solaris/native/libnet/solaris_close.c index 0cf7b5c96fc..091dc00d251 100644 --- a/jdk/src/java.base/solaris/native/libnet/solaris_close.c +++ b/jdk/src/java.base/solaris/native/libnet/solaris_close.c @@ -35,7 +35,7 @@ if (1) { \ do { \ _result = _cmd; \ - } while((_result == -1) && (errno == EINTR)); \ + } while((_result == -1) && (errno == EINTR)); \ return _result; \ } \ } while(0) @@ -44,6 +44,10 @@ int NET_Read(int s, void* buf, size_t len) { RESTARTABLE_RETURN_INT(recv(s, buf, len, 0)); } +int NET_NonBlockingRead(int s, void* buf, size_t len) { + RESTARTABLE_RETURN_INT(recv(s, buf, len, MSG_DONTWAIT)); +} + int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen) { RESTARTABLE_RETURN_INT(recvfrom(s, buf, len, flags, from, fromlen)); @@ -86,19 +90,14 @@ int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { RESTARTABLE_RETURN_INT(poll(ufds, nfds, timeout)); } -int NET_Timeout(int s, long timeout) { +int NET_Timeout0(int s, long timeout, long currentTime) { int result; struct timeval t; - long prevtime, newtime; + long prevtime = currentTime, newtime; struct pollfd pfd; pfd.fd = s; pfd.events = POLLIN; - if (timeout > 0) { - gettimeofday(&t, NULL); - prevtime = (t.tv_sec * 1000) + t.tv_usec / 1000; - } - for(;;) { result = poll(&pfd, 1, timeout); if (result < 0 && errno == EINTR) { diff --git a/jdk/src/java.base/unix/native/libjava/TimeZone_md.c b/jdk/src/java.base/unix/native/libjava/TimeZone_md.c index 8b09a53be82..f0bb362afc5 100644 --- a/jdk/src/java.base/unix/native/libjava/TimeZone_md.c +++ b/jdk/src/java.base/unix/native/libjava/TimeZone_md.c @@ -128,13 +128,20 @@ findZoneinfoFile(char *buf, size_t size, const char *dir) char *dbuf = NULL; char *tz = NULL; int res; + long name_max = 0; dirp = opendir(dir); if (dirp == NULL) { return NULL; } - entry = (struct dirent64 *) malloc((size_t) pathconf(dir, _PC_NAME_MAX)); + name_max = pathconf(dir, _PC_NAME_MAX); + // If pathconf did not work, fall back to a mimimum buffer size. + if (name_max < 1024) { + name_max = 1024; + } + + entry = (struct dirent64 *)malloc(offsetof(struct dirent64, d_name) + name_max + 1); if (entry == NULL) { (void) closedir(dirp); return NULL; diff --git a/jdk/src/java.base/unix/native/libjli/java_md_common.c b/jdk/src/java.base/unix/native/libjli/java_md_common.c index 48c0d8b377e..3c3c4bda969 100644 --- a/jdk/src/java.base/unix/native/libjli/java_md_common.c +++ b/jdk/src/java.base/unix/native/libjli/java_md_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, 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 @@ -25,8 +25,49 @@ #include "java.h" /* - * If app is "/foo/bin/javac", or "/foo/bin/sparcv9/javac" then put - * "/foo" into buf. + * Find the last occurrence of a string + */ +char* findLastPathComponent(char *buffer, const char *comp) { + char* t = buffer; + char* p = NULL; + size_t l = JLI_StrLen(comp); + t = JLI_StrStr(t, comp); + + while (t != NULL) { + p = t; + t += l; + t = JLI_StrStr(t, comp); + } + return p; +} + +/* + * Removes the trailing file name and any intermediate platform + * directories, if any, and its enclosing directory. + * Ex: if a buffer contains "/foo/bin/javac" or "/foo/bin/x64/javac", the + * truncated resulting buffer will contain "/foo". + */ +jboolean +TruncatePath(char *buf) +{ + // try bin directory, maybe an executable + char *p = findLastPathComponent(buf, "/bin/"); + if (p != NULL) { + *p = '\0'; + return JNI_TRUE; + } + // try lib directory, maybe a library + p = findLastPathComponent(buf, "/lib/"); + if (p != NULL) { + *p = '\0'; + return JNI_TRUE; + } + return JNI_FALSE; +} + +/* + * Retrieves the path to the JRE home by locating the executable file + * of the current process and then truncating the path to the executable */ jboolean GetApplicationHome(char *buf, jint bufsize) @@ -38,26 +79,27 @@ GetApplicationHome(char *buf, jint bufsize) } else { return JNI_FALSE; } - - if (JLI_StrRChr(buf, '/') == 0) { - buf[0] = '\0'; - return JNI_FALSE; - } - *(JLI_StrRChr(buf, '/')) = '\0'; /* executable file */ - if (JLI_StrLen(buf) < 4 || JLI_StrRChr(buf, '/') == 0) { - buf[0] = '\0'; - return JNI_FALSE; - } - if (JLI_StrCmp("/bin", buf + JLI_StrLen(buf) - 4) != 0) - *(JLI_StrRChr(buf, '/')) = '\0'; /* sparcv9 or amd64 */ - if (JLI_StrLen(buf) < 4 || JLI_StrCmp("/bin", buf + JLI_StrLen(buf) - 4) != 0) { - buf[0] = '\0'; - return JNI_FALSE; - } - *(JLI_StrRChr(buf, '/')) = '\0'; /* bin */ - - return JNI_TRUE; + return TruncatePath(buf); } + +/* + * Retrieves the path to the JRE home by locating the + * shared library and then truncating the path to it. + */ +jboolean +GetApplicationHomeFromDll(char *buf, jint bufsize) +{ + /* try to find ourselves instead */ + Dl_info info; + if (dladdr((void*)&GetApplicationHomeFromDll, &info) != 0) { + char *path = realpath(info.dli_fname, buf); + if (path == buf) { + return TruncatePath(buf); + } + } + return JNI_FALSE; +} + /* * Return true if the named program exists */ diff --git a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c index 38d8834a932..b9091aaead3 100644 --- a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c +++ b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, 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 @@ -666,6 +666,7 @@ static jboolean GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) { char libjava[MAXPATHLEN]; + struct stat s; if (GetApplicationHome(path, pathsize)) { /* Is JRE co-located with the application? */ @@ -688,6 +689,14 @@ GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) } } + if (GetApplicationHomeFromDll(path, pathsize)) { + JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/%s/" JAVA_DLL, path, arch); + if (stat(libjava, &s) == 0) { + JLI_TraceLauncher("JRE path is %s\n", path); + return JNI_TRUE; + } + } + if (!speculative) JLI_ReportErrorMessage(JRE_ERROR8 JAVA_DLL); return JNI_FALSE; diff --git a/jdk/src/java.base/unix/native/libnet/SocketInputStream.c b/jdk/src/java.base/unix/native/libnet/SocketInputStream.c index 08d8508b154..380c03bfeaa 100644 --- a/jdk/src/java.base/unix/native/libnet/SocketInputStream.c +++ b/jdk/src/java.base/unix/native/libnet/SocketInputStream.c @@ -35,7 +35,6 @@ #include "java_net_SocketInputStream.h" - /************************************************************************ * SocketInputStream */ @@ -52,6 +51,40 @@ Java_java_net_SocketInputStream_init(JNIEnv *env, jclass cls) { IO_fd_fdID = NET_GetFileDescriptorID(env); } +static int NET_ReadWithTimeout(JNIEnv *env, int fd, char *bufP, int len, long timeout) { + int result = 0; + long prevtime = NET_GetCurrentTime(), newtime; + while (timeout > 0) { + result = NET_TimeoutWithCurrentTime(fd, timeout, prevtime); + if (result <= 0) { + if (result == 0) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", "Read timed out"); + } else if (result == -1) { + if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); + } else if (errno == ENOMEM) { + JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + } else { + JNU_ThrowByNameWithMessageAndLastError + (env, JNU_JAVANETPKG "SocketException", "select/poll failed"); + } + } + return -1; + } + result = NET_NonBlockingRead(fd, bufP, len); + if (result == -1 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { + newtime = NET_GetCurrentTime(); + timeout -= newtime - prevtime; + if (timeout > 0) { + prevtime = newtime; + } + } else { + break; + } + } + return result; +} + /* * Class: java_net_SocketInputStream * Method: socketRead0 @@ -98,32 +131,18 @@ Java_java_net_SocketInputStream_socketRead0(JNIEnv *env, jobject this, } else { bufP = BUF; } - if (timeout) { - nread = NET_Timeout(fd, timeout); - if (nread <= 0) { - if (nread == 0) { - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", - "Read timed out"); - } else if (nread == -1) { - if (errno == EBADF) { - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); - } else if (errno == ENOMEM) { - JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); - } else { - JNU_ThrowByNameWithMessageAndLastError - (env, JNU_JAVANETPKG "SocketException", "select/poll failed"); - } - } + nread = NET_ReadWithTimeout(env, fd, bufP, len, timeout); + if ((*env)->ExceptionCheck(env)) { if (bufP != BUF) { free(bufP); } - return -1; + return nread; } + } else { + nread = NET_Read(fd, bufP, len); } - nread = NET_Read(fd, bufP, len); - if (nread <= 0) { if (nread < 0) { @@ -143,7 +162,6 @@ Java_java_net_SocketInputStream_socketRead0(JNIEnv *env, jobject this, JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", "Operation interrupted"); break; - default: JNU_ThrowByNameWithMessageAndLastError (env, JNU_JAVANETPKG "SocketException", "Read failed"); diff --git a/jdk/src/java.base/unix/native/libnet/net_util_md.c b/jdk/src/java.base/unix/native/libnet/net_util_md.c index c801a824bc3..66670f900cc 100644 --- a/jdk/src/java.base/unix/native/libnet/net_util_md.c +++ b/jdk/src/java.base/unix/native/libnet/net_util_md.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifndef _ALLBSD_SOURCE #include @@ -1669,3 +1670,18 @@ NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout) return timeout; } + +long NET_GetCurrentTime() { + struct timeval time; + gettimeofday(&time, NULL); + return (time.tv_sec * 1000 + time.tv_usec / 1000); +} + +int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime) { + return NET_Timeout0(s, timeout, currentTime); +} + +int NET_Timeout(int s, long timeout) { + long currentTime = (timeout > 0) ? NET_GetCurrentTime() : 0; + return NET_Timeout0(s, timeout, currentTime); +} diff --git a/jdk/src/java.base/unix/native/libnet/net_util_md.h b/jdk/src/java.base/unix/native/libnet/net_util_md.h index 3a8c9f4d48e..1f5b6f60eca 100644 --- a/jdk/src/java.base/unix/native/libnet/net_util_md.h +++ b/jdk/src/java.base/unix/native/libnet/net_util_md.h @@ -35,7 +35,11 @@ #include int NET_Timeout(int s, long timeout); +int NET_Timeout0(int s, long timeout, long currentTime); int NET_Read(int s, void* buf, size_t len); +int NET_NonBlockingRead(int s, void* buf, size_t len); +int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime); +long NET_GetCurrentTime(); int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen); int NET_ReadV(int s, const struct iovec * vector, int count); diff --git a/jdk/src/java.base/windows/native/libjli/java_md.c b/jdk/src/java.base/windows/native/libjli/java_md.c index 3b031d59dcc..3d29357542b 100644 --- a/jdk/src/java.base/windows/native/libjli/java_md.c +++ b/jdk/src/java.base/windows/native/libjli/java_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, 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 @@ -348,7 +348,6 @@ GetJREPath(char *path, jint pathsize) JLI_ReportErrorMessage(JRE_ERROR8 JAVA_DLL); return JNI_FALSE; - } /* @@ -423,11 +422,11 @@ TruncatePath(char *buf) *JLI_StrRChr(buf, '\\') = '\0'; /* remove .exe file name */ if ((cp = JLI_StrRChr(buf, '\\')) == 0) { /* This happens if the application is in a drive root, and - * there is no bin directory. */ + * there is no bin directory. */ buf[0] = '\0'; return JNI_FALSE; } - *cp = '\0'; /* remove the bin\ part */ + *cp = '\0'; /* remove the bin\ part */ return JNI_TRUE; } @@ -449,16 +448,16 @@ GetApplicationHome(char *buf, jint bufsize) jboolean GetApplicationHomeFromDll(char *buf, jint bufsize) { - HMODULE hModule; - DWORD dwFlags = - GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | - GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT; + HMODULE module; + DWORD flags = GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT; - if (GetModuleHandleEx(dwFlags, (LPCSTR)&GetJREPath, &hModule) == 0) { - return JNI_FALSE; - }; - GetModuleFileName(hModule, buf, bufsize); - return TruncatePath(buf); + if (GetModuleHandleEx(flags, (LPCSTR)&GetJREPath, &module) != 0) { + if (GetModuleFileName(module, buf, bufsize) != 0) { + return TruncatePath(buf); + } + } + return JNI_FALSE; } /* diff --git a/jdk/src/java.base/windows/native/libjli/java_md.h b/jdk/src/java.base/windows/native/libjli/java_md.h index ec3131f6b61..a2392eba8fc 100644 --- a/jdk/src/java.base/windows/native/libjli/java_md.h +++ b/jdk/src/java.base/windows/native/libjli/java_md.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, 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 @@ -54,7 +54,4 @@ extern jlong Counter2Micros(jlong counts); int UnsetEnv(char *name); -jboolean -GetApplicationHomeFromDll(char *buf, jint bufsize); - #endif /* JAVA_MD_H */ diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html b/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html index 9b1b02ea06f..c1f6c852982 100644 --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html @@ -105,6 +105,10 @@ method is not invoked. The agent class will be loaded by the system class loader (see {@link java.lang.ClassLoader#getSystemClassLoader ClassLoader.getSystemClassLoader}). This is the class loader which typically loads the class containing the application main method. +The system class loader must support a mechanism to add an agent JAR file to the system class path. +If it is a custom system class loader then it must define the +appendToClassPathForInstrumentation method as specified in +{@link Instrumentation#appendToSystemClassLoaderSearch appendToSystemClassLoaderSearch}. The premain methods will be run under the same security and classloader rules as the application main method. There are no modeling restrictions on what the agent premain method may do. @@ -140,7 +144,10 @@ supports the starting of agents after the VM has started the following applies:
  • The system class loader ( {@link java.lang.ClassLoader#getSystemClassLoader ClassLoader.getSystemClassLoader}) must - support a mechanism to add an agent JAR file to the system class path.

  • + support a mechanism to add an agent JAR file to the system class path. + If it is a custom system class loader then it must define the + appendToClassPathForInstrumentation method as specified in + {@link Instrumentation#appendToSystemClassLoaderSearch appendToSystemClassLoaderSearch}.

    diff --git a/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c b/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c index a74b2b725ba..625ea1ad13d 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c +++ b/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -190,10 +190,8 @@ DEF_Agent_OnLoad(JavaVM *vm, char *tail, void * reserved) { return JNI_ERR; } - /* - * Add to the jarfile - */ - appendClassPath(agent, jarfile); + /* Save the jarfile name */ + agent->mJarfile = jarfile; /* * The value of the Premain-Class attribute becomes the agent @@ -241,7 +239,6 @@ DEF_Agent_OnLoad(JavaVM *vm, char *tail, void * reserved) { /* * Clean-up */ - free(jarfile); if (options != NULL) free(options); freeAttributes(attributes); free(premainClass); @@ -459,7 +456,23 @@ eventHandlerVMInit( jvmtiEnv * jvmtienv, /* process the premain calls on the all the JPL agents */ if ( environment != NULL ) { - jthrowable outstandingException = preserveThrowable(jnienv); + jthrowable outstandingException = NULL; + /* + * Add the jarfile to the system class path + */ + JPLISAgent * agent = environment->mAgent; + if (appendClassPath(agent, agent->mJarfile)) { + fprintf(stderr, "Unable to add %s to system class path - " + "the system class loader does not define the " + "appendToClassPathForInstrumentation method or the method failed\n", + agent->mJarfile); + free((void *)agent->mJarfile); + abortJVM(jnienv, JPLIS_ERRORMESSAGE_CANNOTSTART); + } + free((void *)agent->mJarfile); + agent->mJarfile = NULL; + + outstandingException = preserveThrowable(jnienv); success = processJavaStart( environment->mAgent, jnienv); restoreThrowable(jnienv, outstandingException); @@ -631,32 +644,19 @@ appendClassPath( JPLISAgent* agent, jvmtierr = (*jvmtienv)->AddToSystemClassLoaderSearch(jvmtienv, jarfile); check_phase_ret_1(jvmtierr); - if (jvmtierr == JVMTI_ERROR_NONE) { - return 0; - } else { - jvmtiPhase phase; - jvmtiError err; - - err = (*jvmtienv)->GetPhase(jvmtienv, &phase); - /* can be called from any phase */ - jplis_assert(err == JVMTI_ERROR_NONE); - - if (phase == JVMTI_PHASE_LIVE) { - switch (jvmtierr) { - case JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED : - fprintf(stderr, "System class loader does not support adding " - "JAR file to system class path during the live phase!\n"); - break; - default: - fprintf(stderr, "Unexpected error (%d) returned by " - "AddToSystemClassLoaderSearch\n", jvmtierr); - break; - } - return -1; - } - jplis_assert(0); + switch (jvmtierr) { + case JVMTI_ERROR_NONE : + return 0; + case JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED : + fprintf(stderr, "System class loader does not define " + "the appendToClassPathForInstrumentation method\n"); + break; + default: + fprintf(stderr, "Unexpected error (%d) returned by " + "AddToSystemClassLoaderSearch\n", jvmtierr); + break; } - return -2; + return -1; } diff --git a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c index 3017cca1f7a..12f2a451e49 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c +++ b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c @@ -272,6 +272,7 @@ initializeJPLISAgent( JPLISAgent * agent, agent->mNativeMethodPrefixAdded = JNI_FALSE; agent->mAgentClassName = NULL; agent->mOptionsString = NULL; + agent->mJarfile = NULL; /* make sure we can recover either handle in either direction. * the agent has a ref to the jvmti; make it mutual diff --git a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h index 6ecfde2d5c5..008b2fabc6a 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h +++ b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h @@ -107,6 +107,7 @@ struct _JPLISAgent { jboolean mNativeMethodPrefixAdded; /* indicates if can_set_native_method_prefix capability has been added */ char const * mAgentClassName; /* agent class name */ char const * mOptionsString; /* -javaagent options string */ + const char * mJarfile; /* agent jar file name */ }; /* diff --git a/jdk/src/java.logging/share/classes/java/util/logging/Level.java b/jdk/src/java.logging/share/classes/java/util/logging/Level.java index fa0da4c1306..f7f7a4380be 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/Level.java +++ b/jdk/src/java.logging/share/classes/java/util/logging/Level.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, 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 @@ -24,13 +24,22 @@ */ package java.util.logging; +import java.lang.ref.Reference; +import java.lang.ref.ReferenceQueue; +import java.lang.ref.WeakReference; import java.lang.reflect.Module; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Optional; import java.util.ResourceBundle; +import java.util.function.Function; +import jdk.internal.loader.ClassLoaderValue; /** * The Level class defines a set of standard logging levels that @@ -177,6 +186,10 @@ public class Level implements java.io.Serializable { */ public static final Level ALL = new Level("ALL", Integer.MIN_VALUE, defaultBundle); + private static final Level[] standardLevels = { + OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL + }; + /** * Create a named Level with a given integer value. *

    @@ -267,7 +280,8 @@ public class Level implements java.io.Serializable { // or its defining class loader, if it's unnamed module, // of this Level instance that can be a custom Level subclass; Module module = this.getClass().getModule(); - ResourceBundle rb = ResourceBundle.getBundle(resourceBundleName, newLocale, module); + ResourceBundle rb = ResourceBundle.getBundle(resourceBundleName, + newLocale, module); final String localizedName = rb.getString(name); final boolean isDefaultBundle = defaultBundle.equals(resourceBundleName); @@ -350,12 +364,12 @@ public class Level implements java.io.Serializable { throw new NullPointerException(); } - KnownLevel level; + Optional level; // Look for a known Level with the given non-localized name. - level = KnownLevel.findByName(name); - if (level != null) { - return level.mirroredLevel; + level = KnownLevel.findByName(name, KnownLevel::mirrored); + if (level.isPresent()) { + return level.get(); } // Now, check if the given name is an integer. If so, @@ -363,21 +377,24 @@ public class Level implements java.io.Serializable { // if necessary create one. try { int x = Integer.parseInt(name); - level = KnownLevel.findByValue(x); - if (level == null) { + level = KnownLevel.findByValue(x, KnownLevel::mirrored); + if (!level.isPresent()) { // add new Level Level levelObject = new Level(name, x); - level = KnownLevel.findByValue(x); + // There's no need to use a reachability fence here because + // KnownLevel keeps a strong reference on the level when + // level.getClass() == Level.class. + return KnownLevel.findByValue(x, KnownLevel::mirrored).get(); } - return level.mirroredLevel; } catch (NumberFormatException ex) { // Not an integer. // Drop through. } - level = KnownLevel.findByLocalizedLevelName(name); - if (level != null) { - return level.mirroredLevel; + level = KnownLevel.findByLocalizedLevelName(name, + KnownLevel::mirrored); + if (level.isPresent()) { + return level.get(); } return null; @@ -408,15 +425,13 @@ public class Level implements java.io.Serializable { // Serialization magic to prevent "doppelgangers". // This is a performance optimization. private Object readResolve() { - KnownLevel o = KnownLevel.matches(this); - if (o != null) { - return o.levelObject; + Optional level = KnownLevel.matches(this); + if (level.isPresent()) { + return level.get(); } - // Woops. Whoever sent us this object knows // about a new log level. Add it to our list. - Level level = new Level(this.name, this.value, this.resourceBundleName); - return level; + return new Level(this.name, this.value, this.resourceBundleName); } /** @@ -450,12 +465,12 @@ public class Level implements java.io.Serializable { // Check that name is not null. name.length(); - KnownLevel level; + Optional level; // Look for a known Level with the given non-localized name. - level = KnownLevel.findByName(name); - if (level != null) { - return level.levelObject; + level = KnownLevel.findByName(name, KnownLevel::referent); + if (level.isPresent()) { + return level.get(); } // Now, check if the given name is an integer. If so, @@ -463,13 +478,16 @@ public class Level implements java.io.Serializable { // if necessary create one. try { int x = Integer.parseInt(name); - level = KnownLevel.findByValue(x); - if (level == null) { - // add new Level - Level levelObject = new Level(name, x); - level = KnownLevel.findByValue(x); + level = KnownLevel.findByValue(x, KnownLevel::referent); + if (level.isPresent()) { + return level.get(); } - return level.levelObject; + // add new Level. + Level levelObject = new Level(name, x); + // There's no need to use a reachability fence here because + // KnownLevel keeps a strong reference on the level when + // level.getClass() == Level.class. + return KnownLevel.findByValue(x, KnownLevel::referent).get(); } catch (NumberFormatException ex) { // Not an integer. // Drop through. @@ -478,9 +496,9 @@ public class Level implements java.io.Serializable { // Finally, look for a known level with the given localized name, // in the current default locale. // This is relatively expensive, but not excessively so. - level = KnownLevel.findByLocalizedLevelName(name); - if (level != null) { - return level.levelObject; + level = KnownLevel.findByLocalizedLevelName(name, KnownLevel::referent); + if (level .isPresent()) { + return level.get(); } // OK, we've tried everything and failed @@ -530,22 +548,67 @@ public class Level implements java.io.Serializable { // If Level.getName, Level.getLocalizedName, Level.getResourceBundleName methods // were final, the following KnownLevel implementation can be removed. // Future API change should take this into consideration. - static final class KnownLevel { + static final class KnownLevel extends WeakReference { private static Map> nameToLevels = new HashMap<>(); private static Map> intToLevels = new HashMap<>(); - final Level levelObject; // instance of Level class or Level subclass + private static final ReferenceQueue QUEUE = new ReferenceQueue<>(); + + // CUSTOM_LEVEL_CLV is used to register custom level instances with + // their defining class loader, so that they are garbage collected + // if and only if their class loader is no longer strongly + // referenced. + private static final ClassLoaderValue> CUSTOM_LEVEL_CLV = + new ClassLoaderValue<>(); + final Level mirroredLevel; // mirror of the custom Level KnownLevel(Level l) { - this.levelObject = l; + super(l, QUEUE); if (l.getClass() == Level.class) { this.mirroredLevel = l; } else { // this mirrored level object is hidden - this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName, false); + this.mirroredLevel = new Level(l.name, l.value, + l.resourceBundleName, false); } } + Optional mirrored() { + return Optional.of(mirroredLevel); + } + + Optional referent() { + return Optional.ofNullable(get()); + } + + private void remove() { + Optional.ofNullable(nameToLevels.get(mirroredLevel.name)) + .ifPresent((x) -> x.remove(this)); + Optional.ofNullable(intToLevels.get(mirroredLevel.value)) + .ifPresent((x) -> x.remove(this)); + } + + // Remove all stale KnownLevel instances + static synchronized void purge() { + Reference ref; + while ((ref = QUEUE.poll()) != null) { + if (ref instanceof KnownLevel) { + ((KnownLevel)ref).remove(); + } + } + } + + private static void registerWithClassLoader(Level customLevel) { + PrivilegedAction pa = + () -> customLevel.getClass().getClassLoader(); + PrivilegedAction pn = customLevel.getClass()::getName; + final String name = AccessController.doPrivileged(pn); + final ClassLoader cl = AccessController.doPrivileged(pa); + CUSTOM_LEVEL_CLV.computeIfAbsent(cl, (c, v) -> new ArrayList<>()) + .add(customLevel); + } + static synchronized void add(Level l) { + purge(); // the mirroredLevel object is always added to the list // before the custom Level instance KnownLevel o = new KnownLevel(l); @@ -562,24 +625,36 @@ public class Level implements java.io.Serializable { intToLevels.put(l.value, list); } list.add(o); + + // keep the custom level reachable from its class loader + // This will ensure that custom level values are not GC'ed + // until there class loader is GC'ed. + if (o.mirroredLevel != l) { + registerWithClassLoader(l); + } + } // Returns a KnownLevel with the given non-localized name. - static synchronized KnownLevel findByName(String name) { - List list = nameToLevels.get(name); - if (list != null) { - return list.get(0); - } - return null; + static synchronized Optional findByName(String name, + Function> selector) { + purge(); + return nameToLevels.getOrDefault(name, Collections.emptyList()) + .stream() + .map(selector) + .flatMap(Optional::stream) + .findFirst(); } // Returns a KnownLevel with the given value. - static synchronized KnownLevel findByValue(int value) { - List list = intToLevels.get(value); - if (list != null) { - return list.get(0); - } - return null; + static synchronized Optional findByValue(int value, + Function> selector) { + purge(); + return intToLevels.getOrDefault(value, Collections.emptyList()) + .stream() + .map(selector) + .flatMap(Optional::stream) + .findFirst(); } // Returns a KnownLevel with the given localized name matching @@ -587,32 +662,34 @@ public class Level implements java.io.Serializable { // from the resourceBundle associated with the Level object). // This method does not call Level.getLocalizedName() that may // be overridden in a subclass implementation - static synchronized KnownLevel findByLocalizedLevelName(String name) { - for (List levels : nameToLevels.values()) { - for (KnownLevel l : levels) { - String lname = l.levelObject.getLocalizedLevelName(); - if (name.equals(lname)) { - return l; - } - } - } - return null; + static synchronized Optional findByLocalizedLevelName(String name, + Function> selector) { + purge(); + return nameToLevels.values().stream() + .flatMap(List::stream) + .map(selector) + .flatMap(Optional::stream) + .filter(l -> name.equals(l.getLocalizedLevelName())) + .findFirst(); } - static synchronized KnownLevel matches(Level l) { + static synchronized Optional matches(Level l) { + purge(); List list = nameToLevels.get(l.name); if (list != null) { - for (KnownLevel level : list) { - Level other = level.mirroredLevel; + for (KnownLevel ref : list) { + Level levelObject = ref.get(); + if (levelObject == null) continue; + Level other = ref.mirroredLevel; if (l.value == other.value && (l.resourceBundleName == other.resourceBundleName || (l.resourceBundleName != null && l.resourceBundleName.equals(other.resourceBundleName)))) { - return level; + return Optional.of(levelObject); } } } - return null; + return Optional.empty(); } } diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java b/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java index a0589f72b05..350eb0218a0 100644 --- a/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java +++ b/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, 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 @@ -1707,25 +1707,6 @@ public class DefaultMBeanServerInterceptor implements MBeanServerInterceptor { throw new UnsupportedOperationException("Not supported yet."); } - @SuppressWarnings("deprecation") - public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, - OperationsException { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("deprecation") - public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, - ReflectionException { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("deprecation") - public ObjectInputStream deserialize(String className, ObjectName loaderName, - byte[] data) throws InstanceNotFoundException, OperationsException, - ReflectionException { - throw new UnsupportedOperationException("Not supported yet."); - } - public ClassLoaderRepository getClassLoaderRepository() { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/MBeanServerInterceptor.java b/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/MBeanServerInterceptor.java index 8f0f9b66a5a..bbb1340d141 100644 --- a/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/MBeanServerInterceptor.java +++ b/jdk/src/java.management/share/classes/com/sun/jmx/interceptor/MBeanServerInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -94,32 +94,6 @@ public interface MBeanServerInterceptor extends MBeanServer { throws ReflectionException, MBeanException, InstanceNotFoundException; - /** - * This method should never be called. - * Usually throws UnsupportedOperationException. - */ - @Deprecated - public ObjectInputStream deserialize(ObjectName name, byte[] data) - throws InstanceNotFoundException, OperationsException; - - /** - * This method should never be called. - * Usually throws UnsupportedOperationException. - */ - @Deprecated - public ObjectInputStream deserialize(String className, byte[] data) - throws OperationsException, ReflectionException; - - /** - * This method should never be called. - * Usually hrows UnsupportedOperationException. - */ - @Deprecated - public ObjectInputStream deserialize(String className, - ObjectName loaderName, byte[] data) - throws InstanceNotFoundException, OperationsException, - ReflectionException; - /** * This method should never be called. * Usually throws UnsupportedOperationException. diff --git a/jdk/src/java.management/share/classes/javax/management/MBeanServer.java b/jdk/src/java.management/share/classes/javax/management/MBeanServer.java index 1526d818013..316fa0bf3c1 100644 --- a/jdk/src/java.management/share/classes/javax/management/MBeanServer.java +++ b/jdk/src/java.management/share/classes/javax/management/MBeanServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2016, 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 @@ -655,6 +655,8 @@ public interface MBeanServer extends MBeanServerConnection { * used for the de-serialization. * @param data The byte array to be de-sererialized. * + * @implSpec This method throws {@link UnsupportedOperationException} by default. + * * @return The de-serialized object stream. * * @exception InstanceNotFoundException The MBean specified is not @@ -665,10 +667,11 @@ public interface MBeanServer extends MBeanServerConnection { * @deprecated Use {@link #getClassLoaderFor getClassLoaderFor} to * obtain the appropriate class loader for deserialization. */ - @Deprecated - public ObjectInputStream deserialize(ObjectName name, byte[] data) - throws InstanceNotFoundException, OperationsException; - + @Deprecated(since="1.5") + default public ObjectInputStream deserialize(ObjectName name, byte[] data) + throws InstanceNotFoundException, OperationsException { + throw new UnsupportedOperationException("Not supported."); + } /** *

    De-serializes a byte array in the context of a given MBean @@ -682,6 +685,8 @@ public interface MBeanServer extends MBeanServerConnection { * used for the de-serialization. * @param data The byte array to be de-sererialized. * + * @implSpec This method throws {@link UnsupportedOperationException} by default. + * * @return The de-serialized object stream. * * @exception OperationsException Any of the usual Input/Output @@ -692,9 +697,11 @@ public interface MBeanServer extends MBeanServerConnection { * @deprecated Use {@link #getClassLoaderRepository} to obtain the * class loader repository and use it to deserialize. */ - @Deprecated - public ObjectInputStream deserialize(String className, byte[] data) - throws OperationsException, ReflectionException; + @Deprecated(since="1.5") + default public ObjectInputStream deserialize(String className, byte[] data) + throws OperationsException, ReflectionException { + throw new UnsupportedOperationException("Not supported."); + } /** @@ -711,6 +718,8 @@ public interface MBeanServer extends MBeanServerConnection { * loading the specified class. If null, the MBean Server's class * loader will be used. * + * @implSpec This method throws {@link UnsupportedOperationException} by default. + * * @return The de-serialized object stream. * * @exception InstanceNotFoundException The specified class loader @@ -723,12 +732,14 @@ public interface MBeanServer extends MBeanServerConnection { * @deprecated Use {@link #getClassLoader getClassLoader} to obtain * the class loader for deserialization. */ - @Deprecated - public ObjectInputStream deserialize(String className, + @Deprecated(since="1.5") + default public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, - ReflectionException; + ReflectionException { + throw new UnsupportedOperationException("Not supported."); + } /** *

    Return the {@link java.lang.ClassLoader} that was used for diff --git a/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java index 5cc81e9a2d0..edb0c0ba640 100644 --- a/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java +++ b/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java @@ -308,10 +308,6 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine { //-- native methods - static native boolean isLinuxThreads(); - - static native int getLinuxThreadsManager(int pid) throws IOException; - static native void sendQuitToChildrenOf(int pid) throws IOException; static native void sendQuitTo(int pid) throws IOException; diff --git a/jdk/src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c b/jdk/src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c index 08ca4c481ea..85d355a1e6a 100644 --- a/jdk/src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c +++ b/jdk/src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c @@ -194,113 +194,6 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_connect } } -/* - * Class: sun_tools_attach_VirtualMachineImpl - * Method: isLinuxThreads - * Signature: ()V - */ -JNIEXPORT jboolean JNICALL Java_sun_tools_attach_VirtualMachineImpl_isLinuxThreads - (JNIEnv *env, jclass cls) -{ -# ifndef _CS_GNU_LIBPTHREAD_VERSION -# define _CS_GNU_LIBPTHREAD_VERSION 3 -# endif - size_t n; - char* s; - jboolean res; - - n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); - if (n <= 0) { - /* glibc before 2.3.2 only has LinuxThreads */ - return JNI_TRUE; - } - - s = (char *)malloc(n); - if (s == NULL) { - JNU_ThrowOutOfMemoryError(env, "malloc failed"); - return JNI_TRUE; - } - confstr(_CS_GNU_LIBPTHREAD_VERSION, s, n); - - /* - * If the LIBPTHREAD version include "NPTL" then we know we - * have the new threads library and not LinuxThreads - */ - res = (jboolean)(strstr(s, "NPTL") == NULL); - free(s); - return res; -} - -/* - * Structure and callback function used to count the children of - * a given process, and record the pid of the "manager thread". - */ -typedef struct { - pid_t ppid; - int count; - pid_t mpid; -} ChildCountContext; - -static void ChildCountCallback(const pid_t pid, void* user_data) { - ChildCountContext* context = (ChildCountContext*)user_data; - if (getParent(pid) == context->ppid) { - context->count++; - /* - * Remember the pid of the first child. If the final count is - * one then this is the pid of the LinuxThreads manager. - */ - if (context->count == 1) { - context->mpid = pid; - } - } -} - -/* - * Class: sun_tools_attach_VirtualMachineImpl - * Method: getLinuxThreadsManager - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_sun_tools_attach_VirtualMachineImpl_getLinuxThreadsManager - (JNIEnv *env, jclass cls, jint pid) -{ - ChildCountContext context; - - /* - * Iterate over all processes to find how many children 'pid' has - */ - context.ppid = pid; - context.count = 0; - context.mpid = (pid_t)0; - forEachProcess(ChildCountCallback, (void*)&context); - - /* - * If there's no children then this is likely the pid of the primordial - * created by the launcher - in that case the LinuxThreads manager is the - * parent of this process. - */ - if (context.count == 0) { - pid_t parent = getParent(pid); - if ((int)parent > 0) { - return (jint)parent; - } - } - - /* - * There's one child so this is likely the embedded VM case where the - * the primordial thread == LinuxThreads initial thread. The LinuxThreads - * manager in that case is the child. - */ - if (context.count == 1) { - return (jint)context.mpid; - } - - /* - * If we get here it's most likely we were given the wrong pid - */ - JNU_ThrowIOException(env, "Unable to get pid of LinuxThreads manager thread"); - return -1; -} - /* * Structure and callback function used to send a QUIT signal to all * children of a given process diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java index 32255343367..66f867ad4bc 100644 --- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java +++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java @@ -993,32 +993,39 @@ implements ReferenceType { return minorVersion; } - private void getConstantPoolInfo() { + private byte[] getConstantPoolInfo() { JDWP.ReferenceType.ConstantPool jdwpCPool; if (!vm.canGetConstantPool()) { throw new UnsupportedOperationException(); } if (constantPoolInfoGotten) { - return; - } else { - try { - jdwpCPool = JDWP.ReferenceType.ConstantPool.process(vm, this); - } catch (JDWPException exc) { - if (exc.errorCode() == JDWP.Error.ABSENT_INFORMATION) { - constanPoolCount = 0; - constantPoolBytesRef = null; - constantPoolInfoGotten = true; - return; - } else { - throw exc.toJDIException(); - } + if (constantPoolBytesRef == null) { + return null; + } + byte[] cpbytes = constantPoolBytesRef.get(); + if (cpbytes != null) { + return cpbytes; } - byte[] cpbytes; - constanPoolCount = jdwpCPool.count; - cpbytes = jdwpCPool.bytes; - constantPoolBytesRef = new SoftReference(cpbytes); - constantPoolInfoGotten = true; } + + try { + jdwpCPool = JDWP.ReferenceType.ConstantPool.process(vm, this); + } catch (JDWPException exc) { + if (exc.errorCode() == JDWP.Error.ABSENT_INFORMATION) { + constanPoolCount = 0; + constantPoolBytesRef = null; + constantPoolInfoGotten = true; + return null; + } else { + throw exc.toJDIException(); + } + } + byte[] cpbytes; + constanPoolCount = jdwpCPool.count; + cpbytes = jdwpCPool.bytes; + constantPoolBytesRef = new SoftReference(cpbytes); + constantPoolInfoGotten = true; + return cpbytes; } public int constantPoolCount() { @@ -1031,13 +1038,13 @@ implements ReferenceType { } public byte[] constantPool() { + byte[] cpbytes; try { - getConstantPoolInfo(); + cpbytes = getConstantPoolInfo(); } catch (RuntimeException exc) { throw exc; } - if (constantPoolBytesRef != null) { - byte[] cpbytes = constantPoolBytesRef.get(); + if (cpbytes != null) { /* * Arrays are always modifiable, so it is a little unsafe * to return the cached bytecodes directly; instead, we diff --git a/jdk/src/jdk.jdi/share/classes/module-info.java b/jdk/src/jdk.jdi/share/classes/module-info.java index 668c5b57c7e..14e621c108b 100644 --- a/jdk/src/jdk.jdi/share/classes/module-info.java +++ b/jdk/src/jdk.jdi/share/classes/module-info.java @@ -25,6 +25,7 @@ module jdk.jdi { requires jdk.attach; + requires jdk.jdwp.agent; exports com.sun.jdi; exports com.sun.jdi.connect; diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java index 850147aff31..405ba61a57b 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java @@ -55,6 +55,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Properties; import java.util.Set; +import java.util.stream.Collectors; import jdk.tools.jlink.internal.BasicImageWriter; import jdk.tools.jlink.internal.plugins.FileCopierPlugin.SymImageFile; import jdk.tools.jlink.internal.ExecutableImage; @@ -159,7 +160,7 @@ public final class DefaultImageBuilder implements ImageBuilder { } i++; } - props.setProperty("MODULES", builder.toString()); + props.setProperty("MODULES", quote(builder.toString())); } @Override @@ -188,7 +189,8 @@ public final class DefaultImageBuilder implements ImageBuilder { storeFiles(modules, release); - if (Files.getFileStore(root).supportsFileAttributeView(PosixFileAttributeView.class)) { + if (root.getFileSystem().supportedFileAttributeViews() + .contains("posix")) { // launchers in the bin directory need execute permission. // On Windows, "bin" also subdirectories containing jvm.dll. if (Files.isDirectory(bin)) { @@ -217,19 +219,38 @@ public final class DefaultImageBuilder implements ImageBuilder { } } + // Parse version string and return a string that includes only version part + // leaving "pre", "build" information. See also: java.lang.Runtime.Version. + private static String parseVersion(String str) { + return Runtime.Version.parse(str). + version(). + stream(). + map(Object::toString). + collect(Collectors.joining(".")); + } + + private static String quote(String str) { + return "\"" + str + "\""; + } + private Properties releaseProperties(ResourcePool pool) throws IOException { Properties props = new Properties(); Optional javaBase = pool.moduleView().findModule("java.base"); javaBase.ifPresent(mod -> { // fill release information available from transformed "java.base" module! ModuleDescriptor desc = mod.descriptor(); - desc.osName().ifPresent(s -> props.setProperty("OS_NAME", s)); - desc.osVersion().ifPresent(s -> props.setProperty("OS_VERSION", s)); - desc.osArch().ifPresent(s -> props.setProperty("OS_ARCH", s)); - props.setProperty("JAVA_VERSION", System.getProperty("java.version")); + desc.osName().ifPresent(s -> { + props.setProperty("OS_NAME", quote(s)); + this.targetOsName = s; + }); + desc.osVersion().ifPresent(s -> props.setProperty("OS_VERSION", quote(s))); + desc.osArch().ifPresent(s -> props.setProperty("OS_ARCH", quote(s))); + desc.version().ifPresent(s -> props.setProperty("JAVA_VERSION", + quote(parseVersion(s.toString())))); + desc.version().ifPresent(s -> props.setProperty("JAVA_FULL_VERSION", + quote(s.toString()))); }); - this.targetOsName = props.getProperty("OS_NAME"); if (this.targetOsName == null) { throw new PluginException("TargetPlatform attribute is missing for java.base module"); } @@ -282,8 +303,8 @@ public final class DefaultImageBuilder implements ImageBuilder { StandardOpenOption.CREATE_NEW)) { writer.write(sb.toString()); } - if (Files.getFileStore(root.resolve("bin")) - .supportsFileAttributeView(PosixFileAttributeView.class)) { + if (root.resolve("bin").getFileSystem() + .supportedFileAttributeViews().contains("posix")) { setExecutable(cmd); } // generate .bat file for Windows diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 83515fad418..f2e96cacf20 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -159,7 +159,6 @@ javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java 8042215 # jdk_net - java/net/MulticastSocket/NoLoopbackPackets.java 7122846 macosx-all java/net/MulticastSocket/SetLoopbackMode.java 7122846 macosx-all @@ -217,66 +216,6 @@ sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-a sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all -sun/security/pkcs11/Cipher/ReinitCipher.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestRSACipher.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestRSACipherWrap.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestRawRSACipher.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestSymmCiphers.java 8077138,8023434 windows-all -sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyAgreement/TestDH.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyAgreement/TestInterop.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyAgreement/TestShort.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 8077138 windows-all -sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 8077138 windows-all -sun/security/pkcs11/KeyGenerator/DESParity.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 8077138,8023434 windows-all -sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8077138,8023434 windows-all -sun/security/pkcs11/Mac/MacKAT.java 8077138,8023434 windows-all -sun/security/pkcs11/Mac/MacSameTest.java 8077138,8023434 windows-all -sun/security/pkcs11/Mac/ReinitMac.java 8077138,8023434 windows-all -sun/security/pkcs11/MessageDigest/ByteBuffers.java 8077138,8023434 windows-all -sun/security/pkcs11/MessageDigest/DigestKAT.java 8077138,8023434 windows-all -sun/security/pkcs11/MessageDigest/ReinitDigest.java 8077138,8023434 windows-all -sun/security/pkcs11/MessageDigest/TestCloning.java 8077138,8023434 windows-all -sun/security/pkcs11/Provider/ConfigQuotedString.sh 8077138,8023434 windows-all -sun/security/pkcs11/Provider/Login.sh 8077138,8023434 windows-all -sun/security/pkcs11/SampleTest.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/AddPrivateKey.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/AddTrustedCert.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/Crypto.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/GetPrivateKey.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/JksSetPrivateKey.java 8077138,8023434 windows-all -sun/security/pkcs11/Secmod/LoadKeystore.java 8077138,8023434 windows-all -sun/security/pkcs11/SecureRandom/Basic.java 8077138,8023434 windows-all -sun/security/pkcs11/SecureRandom/TestDeserialization.java 8077138,8023434 windows-all -sun/security/pkcs11/Serialize/SerializeProvider.java 8077138,8023434 windows-all -sun/security/pkcs11/Signature/ByteBuffers.java 8077138,8023434 windows-all -sun/security/pkcs11/Signature/ReinitSignature.java 8077138,8023434 windows-all -sun/security/pkcs11/Signature/TestDSA.java 8077138,8023434 windows-all -sun/security/pkcs11/Signature/TestDSAKeyLength.java 8077138,8023434 windows-all -sun/security/pkcs11/Signature/TestRSAKeyLength.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/ReadCertificates.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/ReadPKCS12.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestCurves.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestECDH.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestECDH2.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestECDSA.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestECDSA2.java 8077138,8023434 windows-all -sun/security/pkcs11/ec/TestECGenSpec.java 8077138,8023434 windows-all -sun/security/pkcs11/rsa/KeyWrap.java 8077138,8023434 windows-all -sun/security/pkcs11/rsa/TestCACerts.java 8077138,8023434 windows-all -sun/security/pkcs11/rsa/TestKeyFactory.java 8077138,8023434 windows-all -sun/security/pkcs11/rsa/TestKeyPairGenerator.java 8077138,8023434 windows-all -sun/security/pkcs11/rsa/TestSignatures.java 8077138,8023434 windows-all -sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8077138,8023434 windows-all -sun/security/pkcs11/tls/TestKeyMaterial.java 8077138,8023434 windows-all -sun/security/pkcs11/tls/TestLeadingZeroesP11.java 8077138,8023434 windows-all -sun/security/pkcs11/tls/TestMasterSecret.java 8077138,8023434 windows-all -sun/security/pkcs11/tls/TestPRF.java 8077138,8023434 windows-all -sun/security/pkcs11/tls/TestPremaster.java 8077138,8023434 windows-all - sun/security/krb5/auto/HttpNegotiateServer.java 8038079 generic-all sun/security/ssl/SSLSocketImpl/AsyncSSLSocketClose.java 8161232 macosx-all @@ -312,8 +251,6 @@ tools/pack200/CommandLineTests.java 7143279,8059906 tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all -tools/pack200/Pack200Props.java 8155857 generic-all - ############################################################################ # jdk_jdi @@ -328,9 +265,6 @@ com/sun/jdi/GetLocalVariables4Test.sh 8067354 windows- com/sun/jdi/sde/SourceDebugExtensionTest.java 8158066 windows-all -com/sun/jdi/ClassesByName2Test.java 8160833 generic-all -com/sun/jdi/RedefineCrossEvent.java 8160833 generic-all - ############################################################################ # jdk_time @@ -357,9 +291,11 @@ sun/tools/jcmd/TestJcmdSanity.java 8031482 windows- sun/tools/jhsdb/BasicLauncherTest.java 8160376 macosx-all +sun/tools/jhsdb/HeapDumpTest.java 8160376 macosx-all + sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java 8160376 macosx-all -sun/tools/jps/TestJpsJar.java 8160923 generic-all +sun/tools/jps/TestJpsJar.java 8165500 generic-all sun/tools/jps/TestJpsJarRelative.java 6456333 generic-all diff --git a/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java b/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java new file mode 100644 index 00000000000..307d9fa3504 --- /dev/null +++ b/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2016, 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 6822627 + * @summary Test that ReferenceType.constantPool does not produce an NPE + * + * @author Egor Ushakov + * + * @modules jdk.jdi/com.sun.tools.jdi + * @run build TestScaffold VMConnection + * @run compile -g ConstantPoolInfoGC.java + * @run main/othervm ConstantPoolInfoGC + */ + +import com.sun.jdi.ReferenceType; +import com.sun.tools.jdi.ReferenceTypeImpl; + +import java.lang.ref.Reference; +import java.lang.reflect.Field; +import java.util.Arrays; + + /********** target program **********/ + +class ConstantPoolGCTarg { + public static void main(String[] args){ + System.out.println("Anything"); + } +} + + /********** test program **********/ + +public class ConstantPoolInfoGC extends TestScaffold { + ReferenceType targetClass; + + ConstantPoolInfoGC(String args[]) { + super(args); + } + + public static void main(String[] args) throws Exception { + new ConstantPoolInfoGC(args).startTests(); + } + + /********** test core **********/ + + protected void runTests() throws Exception { + targetClass = startToMain("ConstantPoolGCTarg").location().declaringType(); + + if (vm().canGetConstantPool()) { + byte[] cpbytes = targetClass.constantPool(); + + // imitate SoftReference cleared + Field constantPoolBytesRef = ReferenceTypeImpl.class.getDeclaredField("constantPoolBytesRef"); + constantPoolBytesRef.setAccessible(true); + Reference softRef = (Reference) constantPoolBytesRef.get(targetClass); + softRef.clear(); + + byte[] cpbytes2 = targetClass.constantPool(); + if (!Arrays.equals(cpbytes, cpbytes2)) { + failure("Consequent constantPool results vary, first was : " + cpbytes + ", now: " + cpbytes2); + }; + + } else { + System.out.println("can get constant pool version not supported"); + } + + + /* + * resume until end + */ + listenUntilVMDisconnect(); + + /* + * deal with results of test + * if anything has called failure("foo") testFailed will be true + */ + if (!testFailed) { + println("ConstantPoolInfoGC: passed"); + } else { + throw new Exception("ConstantPoolInfoGC: failed"); + } + } +} diff --git a/jdk/test/java/lang/Class/GetModuleTest.java b/jdk/test/java/lang/Class/GetModuleTest.java index 359f7ca2ff7..3feb9985681 100644 --- a/jdk/test/java/lang/Class/GetModuleTest.java +++ b/jdk/test/java/lang/Class/GetModuleTest.java @@ -101,11 +101,8 @@ public class GetModuleTest { return new Object[][] { { GetModuleTest.class, null }, - { GetModuleTest[].class, null }, { Object.class, null }, - { Object[].class, null }, { Component.class, null }, - { Component[].class, null }, }; } @@ -117,7 +114,7 @@ public class GetModuleTest { public void testGetModuleOnVMAnonymousClass(Class hostClass, String ignore) { // choose a class name in the same package as the host class - String prefix = packageName(hostClass); + String prefix = hostClass.getPackageName(); if (prefix.length() > 0) prefix = prefix.replace('.', '/') + "/"; String className = prefix + "Anon"; @@ -136,17 +133,6 @@ public class GetModuleTest { assertTrue(anonClass.getModule() == hostClass.getModule()); } - private static String packageName(Class c) { - if (c.isArray()) { - return packageName(c.getComponentType()); - } else { - String name = c.getName(); - int dot = name.lastIndexOf('.'); - if (dot == -1) return ""; - return name.substring(0, dot); - } - } - private static int constantPoolSize(byte[] classFile) { return ((classFile[8] & 0xFF) << 8) | (classFile[9] & 0xFF); } diff --git a/jdk/test/java/lang/instrument/CustomSystemLoader/Agent.java b/jdk/test/java/lang/instrument/CustomSystemLoader/Agent.java new file mode 100644 index 00000000000..0432c2d9587 --- /dev/null +++ b/jdk/test/java/lang/instrument/CustomSystemLoader/Agent.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.PrintStream; +import java.lang.instrument.*; +import java.lang.reflect.Field; + +/** + * @test + * @bug 8160950 + * @summary test for custom system class loader + * + * @run build App Agent CustomLoader + * @run shell ../MakeJAR3.sh Agent 'Can-Retransform-Classes: true' + * @run main/othervm -javaagent:Agent.jar -Djava.system.class.loader=CustomLoader App + */ + +public class Agent { + private static PrintStream err = System.err; + private static PrintStream out = System.out; + public static boolean failed = false; + + public static void premain(String agentArgs, Instrumentation instrumentation) { + ClassLoader myClassLoader = Agent.class.getClassLoader(); + out.println("Agent: started; myClassLoader: " + myClassLoader); + try { + Field fld = myClassLoader.getClass().getField("agentClassLoader"); + fld.set(myClassLoader.getClass(), myClassLoader); + } catch (Exception ex) { + failed = true; + ex.printStackTrace(); + } + out.println("Agent: finished"); + } +} diff --git a/jdk/test/java/lang/instrument/CustomSystemLoader/App.java b/jdk/test/java/lang/instrument/CustomSystemLoader/App.java new file mode 100644 index 00000000000..a5eac03f14e --- /dev/null +++ b/jdk/test/java/lang/instrument/CustomSystemLoader/App.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.PrintStream; + +public class App { + + public static void main(String args[]) throws Exception { + (new App()).run(args, System.out); + } + + public void run(String args[], PrintStream out) throws Exception { + out.println("App: Test started"); + if (CustomLoader.agentClassLoader != CustomLoader.myself) { + System.out.println("App: agentClassLoader: " + CustomLoader.agentClassLoader); + System.out.println("App: CustomLoader.myself: " + CustomLoader.myself); + System.out.println("App: myClassLoader: " + App.class.getClassLoader()); + throw new Exception("App: Agent's system class loader is not CustomLoader"); + } else if (Agent.failed) { + throw new Exception("App: Agent failed"); + } else if (CustomLoader.failed) { + throw new Exception("App: CustomLoader failed"); + } + out.println("App: Test passed"); + } +} diff --git a/jdk/test/java/lang/instrument/CustomSystemLoader/CustomLoader.java b/jdk/test/java/lang/instrument/CustomSystemLoader/CustomLoader.java new file mode 100644 index 00000000000..f90e244b4a1 --- /dev/null +++ b/jdk/test/java/lang/instrument/CustomSystemLoader/CustomLoader.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.DataInputStream; +import java.io.InputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.jar.JarFile; +import java.util.zip.ZipEntry; + +public class CustomLoader extends ClassLoader { + private static PrintStream out = System.out; + public static ClassLoader myself; + public static ClassLoader agentClassLoader; + public static boolean failed = true; + + public CustomLoader(ClassLoader classLoader) { + super(classLoader); + myself = this; + } + + @Override + public Class loadClass(String name) throws ClassNotFoundException { + out.println("CustomLoader: loading class: " + name); + if (name.equals("Agent")) { + Class c = null; + try { + byte[] buf = locateBytes(); + c = defineClass(name, buf, 0, buf.length); + } catch (IOException ex) { + throw new ClassNotFoundException(ex.getMessage()); + } + resolveClass(c); + out.println("CustomLoader.loadClass after resolveClass: " + name + + "; Class: " + c + "; ClassLoader: " + c.getClassLoader()); + return c; + } + return super.loadClass(name); + } + + private byte[] locateBytes() throws IOException { + try { + JarFile jar = new JarFile("Agent.jar"); + InputStream is = jar.getInputStream(jar.getEntry("Agent.class")); + int len = is.available(); + byte[] buf = new byte[len]; + DataInputStream in = new DataInputStream(is); + in.readFully(buf); + return buf; + } catch (IOException ioe) { + ioe.printStackTrace(); + throw new IOException("Test failed due to IOException!"); + } + } + + void appendToClassPathForInstrumentation(String path) { + out.println("CustomLoader.appendToClassPathForInstrumentation: " + + this + ", jar: " + path); + failed = false; + } +} diff --git a/jdk/test/java/lang/invoke/VMAnonymousClass.java b/jdk/test/java/lang/invoke/VMAnonymousClass.java index f686b24c113..300e056477a 100644 --- a/jdk/test/java/lang/invoke/VMAnonymousClass.java +++ b/jdk/test/java/lang/invoke/VMAnonymousClass.java @@ -57,9 +57,9 @@ public class VMAnonymousClass { @Test public void testJavaLangInvoke() throws Throwable { test("java/lang/invoke"); } @Test public void testProhibitedJavaPkg() throws Throwable { try { - test("java/prohibited"); - } catch (SecurityException e) { - return; + test("java/prohibited"); + } catch (IllegalArgumentException e) { + return; } throw new RuntimeException("Expected SecurityException"); } @@ -72,10 +72,17 @@ public class VMAnonymousClass { if (pkg.equals("java/prohibited")) { VMAnonymousClass sampleclass = new VMAnonymousClass(); host_class = (Class)sampleclass.getClass(); + } else if (pkg.equals("java/lang")) { + host_class = Object.class; + } else if (pkg.equals("java/util")) { + host_class = java.util.ArrayList.class; + } else if (pkg.equals("jdk/internal/misc")) { + host_class = jdk.internal.misc.Signal.class; + } else if (pkg.equals("java/lang/invoke")) { + host_class = java.lang.invoke.CallSite.class; } else { - host_class = Object.class; + throw new RuntimeException("Unexpected pkg: " + pkg); } - // Define VM anonymous class Class anonClass = unsafe.defineAnonymousClass(host_class, bytes, null); diff --git a/jdk/test/java/lang/management/ThreadMXBean/Locks.java b/jdk/test/java/lang/management/ThreadMXBean/Locks.java index 0d40a14dd3c..95fa29d6596 100644 --- a/jdk/test/java/lang/management/ThreadMXBean/Locks.java +++ b/jdk/test/java/lang/management/ThreadMXBean/Locks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -26,27 +26,28 @@ * @bug 4530538 * @summary Basic unit test of ThreadInfo.getLockName() * and ThreadInfo.getLockOwnerName() + * @library /lib/testlibrary * @author Mandy Chung * @author Jaroslav Bachorik * - * @library /lib/testlibrary * @modules java.management * @build jdk.testlibrary.* * @run main/othervm Locks */ - import java.lang.management.*; +import java.util.Arrays; +import java.util.Optional; import java.util.concurrent.Phaser; +import java.util.function.Predicate; import jdk.testlibrary.LockFreeLogManager; public class Locks { - private static final Object objA = new Object(); - private static final Object objB = new Object(); - private static final Object objC = new Object(); - private static final ThreadMXBean tm = ManagementFactory.getThreadMXBean(); - private static final LockFreeLogManager logger = new LockFreeLogManager(); - private static boolean testFailed = false; + private static final Object OBJA = new Object(); + private static final Object OBJB = new Object(); + private static final EnhancedWaiter OBJC = new EnhancedWaiter(); + private static final ThreadMXBean TM = ManagementFactory.getThreadMXBean(); + private static final LockFreeLogManager LOGGER = new LockFreeLogManager(); private static String getLockName(Object lock) { if (lock == null) return null; @@ -56,67 +57,103 @@ public class Locks { } private static void assertNoLock(Thread t) { - long tid = t.getId(); - ThreadInfo info = tm.getThreadInfo(tid); - String result = info.getLockName(); - - if (result != null) { - throw new RuntimeException("Thread " + t.getName() + " is not supposed to hold any lock. " + - "Currently owning lock: " + result); + if (t == null) { + return; + } + Optional result = Arrays.asList( + TM.getThreadInfo(TM.getAllThreadIds(), true, true)). + stream(). + filter(tInfo -> (tInfo != null && tInfo.getLockOwnerName() != null) + ? tInfo.getLockOwnerName().equals(t.getName()) : false). + findAny(); + if (result.isPresent()) { + throw new RuntimeException("Thread " + t.getName() + " is not " + + "supposed to be hold any lock. Currently owning lock : " + + result.get().getLockName()); } } - private static void checkBlockedObject(Thread t, Object lock, Thread owner, - Thread.State expectedState) { - long tid = t.getId(); - ThreadInfo info = tm.getThreadInfo(tid); - String result = info.getLockName(); - String expectedLock = (lock != null ? getLockName(lock) : null); - String expectedOwner = (owner != null ? owner.getName() : null); + /* + * Handy debug function to check if error condition is because of test code or not. + */ + private static void printStackTrace(Thread thread) { + if (thread == null) { + return; + } + StackTraceElement[] stackTrace = thread.getStackTrace(); + log("Stack dump : Thread -> " + thread.getName()); + for (StackTraceElement stackTraceEl : stackTrace) { + log("\t" + stackTraceEl.toString()); + } + } - if (lock != null) { - if (expectedState == Thread.State.BLOCKED) { - int retryCount=0; - while(info.getThreadState() != Thread.State.BLOCKED) { - if (retryCount++ > 500) { - throw new RuntimeException("Thread " + t.getName() + - " is expected to block on " + expectedLock + - " but got " + result + - " Thread.State = " + info.getThreadState()); - } - goSleep(100); - info = tm.getThreadInfo(tid); - result = info.getLockName(); + private static void assertThreadState(Thread t, Thread.State expectedState) { + long tid = t.getId(); + if (expectedState == Thread.State.BLOCKED + && TM.getThreadInfo(tid).getThreadState() != Thread.State.BLOCKED) { + int retryCount = 0; + printStackTrace(t); + while (TM.getThreadInfo(tid).getThreadState() != Thread.State.BLOCKED) { + if (retryCount++ > 500) { + printStackTrace(t); + throw new RuntimeException("Thread " + t.getName() + " is at " + + TM.getThreadInfo(tid).getThreadState() + " state but is expected to " + + "be in Thread.State = " + expectedState); } - } - if (expectedState == Thread.State.WAITING && - info.getThreadState() != Thread.State.WAITING) { - throw new RuntimeException("Thread " + t.getName() + - " is expected to wait on " + expectedLock + - " but got " + result + - " Thread.State = " + info.getThreadState()); + goSleep(100); } } - - if ((result != null && !result.equals(expectedLock)) || - (result == null && expectedLock != null)) { - throw new RuntimeException("Thread " + t.getName() + " is blocked on " + - expectedLock + " but got " + result); - } - result = info.getLockOwnerName(); - if ((result != null && !result.equals(expectedOwner)) || - (result == null && expectedOwner != null)) { - throw new RuntimeException("Owner of " + lock + " should be " + - expectedOwner + " but got " + result); + if (!TM.getThreadInfo(tid).getThreadState().equals(expectedState)) { + printStackTrace(t); + throw new RuntimeException("Thread " + t.getName() + " is at " + + TM.getThreadInfo(tid).getThreadState() + " state but is expected to " + + "be in Thread.State = " + expectedState); } } - private static void goSleep(long ms) { + /* + * Do slow check if thread is blocked on a lock. It is possible that last thread + * to come out of Phaser might still be in Phaser call stack (Unsafe.park) and + * hence might eventually acquire expected lock. + */ + private static void checkBlockedObject(Thread t, Object lock, Thread owner) { + long tid = t.getId(); + String result = TM.getThreadInfo(tid).getLockName(); + final String expectedLock = (lock != null ? getLockName(lock) : null); + Predicate p = (res) -> ((res != null && !res.equals(expectedLock)) + || (res == null && expectedLock != null)); + + if (p.test(result)) { + printStackTrace(t); + int retryCount = 0; + while (p.test(result)) { + if (retryCount++ > 500) { + printStackTrace(t); + throw new RuntimeException("Thread " + t.getName() + " is blocked on " + + expectedLock + " but got " + result); + } + goSleep(100); + result = TM.getThreadInfo(tid).getLockName(); + } + } + + result = TM.getThreadInfo(tid).getLockOwnerName(); + final String expectedOwner = (owner != null ? owner.getName() : null); + + p = (res) -> ((res != null && !res.equals(expectedOwner)) + || (res == null && expectedOwner != null)); + if (p.test(result)) { + printStackTrace(t); + throw new RuntimeException("Owner of " + lock + " should be " + + expectedOwner + " but got " + result); + } + } + + private static void goSleep(long ms){ try { Thread.sleep(ms); - } catch (InterruptedException e) { - e.printStackTrace(); - testFailed = true; + } catch (InterruptedException ex) { + throw new RuntimeException(ex); } } @@ -128,14 +165,15 @@ public class Locks { super("LockAThread"); this.p = p; } + @Override public void run() { - synchronized(objA) { - // stop here for LockBThread to hold objB - log("LockAThread about to block on objB"); + synchronized(OBJA) { + // block here while LockBThread holds OBJB + log("LockAThread about to block on OBJB"); p.arriveAndAwaitAdvance(); // Phase 1 (blocking) - synchronized(objB) { + synchronized(OBJB) { dummyCounter++; - }; + } } p.arriveAndAwaitAdvance(); // Phase 2 (blocking) log("LockAThread about to exit"); @@ -150,14 +188,15 @@ public class Locks { super("LockBThread"); this.p = p; } + @Override public void run() { - synchronized(objB) { - log("LockBThread about to block on objC"); + synchronized(OBJB) { + log("LockBThread about to block on OBJC"); p.arriveAndAwaitAdvance(); // Phase 1 (blocking) - // Signal main thread about to block on objC - synchronized(objC) { + // Signal main thread about to block on OBJC + synchronized(OBJC) { dummyCounter++; - }; + } } p.arriveAndAwaitAdvance(); // Phase 2 (blocking) log("LockBThread about to exit"); @@ -166,9 +205,30 @@ public class Locks { } } + /* + * Must be invoked from within a synchronized context + */ + private static class EnhancedWaiter { + + boolean isNotified = false; + + public void doWait() throws InterruptedException { + while (!isNotified) { + wait(); + } + isNotified = false; + } + + public void doNotify() { + isNotified = true; + notify(); + } + } + private static WaitingThread waiter; private static final Object ready = new Object(); private static CheckerThread checker; + static class WaitingThread extends Thread { private final Phaser p; @@ -180,17 +240,16 @@ public class Locks { } @Override public void run() { - synchronized(objC) { - log("WaitingThread about to wait on objC"); + synchronized(OBJC) { + log("WaitingThread about to wait on OBJC"); try { - // Signal checker thread, about to wait on objC. + // Signal checker thread, about to wait on OBJC. waiting = false; p.arriveAndAwaitAdvance(); // Phase 1 (waiting) waiting = true; - objC.wait(); + OBJC.doWait(); } catch (InterruptedException e) { - e.printStackTrace(); - testFailed = true; + throw new RuntimeException(e); // Do not continue test } // block until CheckerThread finishes checking @@ -202,19 +261,18 @@ public class Locks { dummyCounter++; } } - synchronized(objC) { + synchronized(OBJC) { try { - // signal checker thread, about to wait on objC + // signal checker thread, about to wait on OBJC waiting = false; p.arriveAndAwaitAdvance(); // Phase 3 (waiting) waiting = true; - objC.wait(); + OBJC.doWait(); } catch (InterruptedException e) { - e.printStackTrace(); - testFailed = true; + throw new RuntimeException(e); } } - log("WaitingThread about to exit waiting on objC 2"); + log("WaitingThread about to exit waiting on OBJC 2"); } public void waitForWaiting() { @@ -241,85 +299,87 @@ public class Locks { super("CheckerThread"); } + @Override public void run() { - synchronized (ready) { - // wait until WaitingThread about to wait for objC + synchronized(ready) { + // wait until WaitingThread about to wait for OBJC waiter.waitForWaiting(); // Phase 1 (waiting) - checkBlockedObject(waiter, objC, null, Thread.State.WAITING); + assertThreadState(waiter, Thread.State.WAITING); + checkBlockedObject(waiter, OBJC, null); - synchronized (objC) { - objC.notify(); + synchronized(OBJC) { + OBJC.doNotify(); } - // wait for waiter thread to about to enter // synchronized object ready. waiter.waitForBlocked(); // Phase 2 (waiting) - checkBlockedObject(waiter, ready, this, Thread.State.BLOCKED); + assertThreadState(waiter, Thread.State.BLOCKED); + checkBlockedObject(waiter, ready, this); } // wait for signal from waiting thread that it is about - // wait for objC. + // wait for OBJC. waiter.waitForWaiting(); // Phase 3 (waiting) - synchronized(objC) { - checkBlockedObject(waiter, objC, Thread.currentThread(), Thread.State.WAITING); - objC.notify(); + synchronized(OBJC) { + assertThreadState(waiter, Thread.State.WAITING); + checkBlockedObject(waiter, OBJC, Thread.currentThread()); + OBJC.doNotify(); } - } } public static void main(String args[]) throws Exception { - Thread mainThread = Thread.currentThread(); - - // Test uncontested case - LockAThread t1; - LockBThread t2; - - Phaser p = new Phaser(3); - synchronized(objC) { - // Make sure the main thread is not holding any lock - assertNoLock(mainThread); - - // Test deadlock case - // t1 holds lockA and attempts to lock B - // t2 holds lockB and attempts to lock C - - t1 = new LockAThread(p); - t1.start(); - - t2 = new LockBThread(p); - t2.start(); - - p.arriveAndAwaitAdvance(); // Phase 1 (blocking) - checkBlockedObject(t2, objC, mainThread, Thread.State.BLOCKED); - checkBlockedObject(t1, objB, t2, Thread.State.BLOCKED); - - long[] expectedThreads = new long[3]; - expectedThreads[0] = t1.getId(); // blocked on lockB - expectedThreads[1] = t2.getId(); // owner of lockB blocking on lockC - expectedThreads[2] = mainThread.getId(); // owner of lockC - findThreadsBlockedOn(objB, expectedThreads); - } - p.arriveAndAwaitAdvance(); // Phase 2 (blocking) - - p = new Phaser(2); - // Test Object.wait() case - waiter = new WaitingThread(p); - waiter.start(); - - checker = new CheckerThread(); - checker.start(); - try { - waiter.join(); - checker.join(); - } catch (InterruptedException e) { - e.printStackTrace(); - testFailed = true; - } + Thread mainThread = Thread.currentThread(); - if (testFailed) { - throw new RuntimeException("TEST FAILED."); + // Test uncontested case + LockAThread t1; + LockBThread t2; + + Phaser p = new Phaser(3); + synchronized(OBJC) { + // Make sure the main thread is not holding any lock + assertNoLock(mainThread); + + // Test deadlock case + // t1 holds lockA and attempts to lock B + // t2 holds lockB and attempts to lock C + t1 = new LockAThread(p); + t1.start(); + + t2 = new LockBThread(p); + t2.start(); + + p.arriveAndAwaitAdvance(); // Phase 1 (blocking) + assertThreadState(t2, Thread.State.BLOCKED); + checkBlockedObject(t2, OBJC, mainThread); + assertThreadState(t1, Thread.State.BLOCKED); + checkBlockedObject(t1, OBJB, t2); + + long[] expectedThreads = new long[3]; + expectedThreads[0] = t1.getId(); // blocked on lockB + expectedThreads[1] = t2.getId(); // owner of lockB blocking on lockC + expectedThreads[2] = mainThread.getId(); // owner of lockC + findThreadsBlockedOn(OBJB, expectedThreads); + } + p.arriveAndAwaitAdvance(); // Phase 2 (blocking) + + p = new Phaser(2); + // Test Object.wait() case + waiter = new WaitingThread(p); + waiter.start(); + + checker = new CheckerThread(); + checker.start(); + + try { + waiter.join(); + checker.join(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } finally { // log all the messages to STDOUT + System.out.println(LOGGER.toString()); } System.out.println("Test passed."); } @@ -335,9 +395,9 @@ public class Locks { throw new RuntimeException("TEST FAILED: " + lock + " expected to have owner"); } - for (int j = 0; j < infos.length; j++) { - if (infos[j].getThreadId() == threadId) { - ownerInfo = infos[j]; + for (ThreadInfo info1 : infos) { + if (info1.getThreadId() == threadId) { + ownerInfo = info1; break; } } @@ -349,11 +409,11 @@ public class Locks { throws Exception { String lock = getLockName(o); // Check with ThreadInfo with no stack trace (i.e. no safepoint) - ThreadInfo[] infos = tm.getThreadInfo(tm.getAllThreadIds()); + ThreadInfo[] infos = TM.getThreadInfo(TM.getAllThreadIds()); doCheck(infos, lock, expectedThreads); // Check with ThreadInfo with stack trace - infos = tm.getThreadInfo(tm.getAllThreadIds(), 1); + infos = TM.getThreadInfo(TM.getAllThreadIds(), 1); doCheck(infos, lock, expectedThreads); } @@ -376,7 +436,7 @@ public class Locks { long[] threads = new long[10]; int count = 0; threads[count++] = ownerInfo.getThreadId(); - while (ownerInfo != null && ownerInfo.getThreadState() == Thread.State.BLOCKED) { + while (ownerInfo.getThreadState() == Thread.State.BLOCKED) { ownerInfo = findOwnerInfo(infos, lock); threads[count++] = ownerInfo.getThreadId(); log(" Owner = %s id = %d", @@ -407,6 +467,6 @@ public class Locks { } private static void log(String format, Object ... args) { - logger.log(format + "%n", args); + LOGGER.log(format + "%n", args); } } diff --git a/jdk/test/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java b/jdk/test/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java new file mode 100644 index 00000000000..29abfb9f551 --- /dev/null +++ b/jdk/test/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java @@ -0,0 +1,292 @@ +/* + * Copyright (c) 2004, 2016, 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 8132926 + * @summary PKIXParameters built with public key form of TrustAnchor causes + * NPE during cert path building/validation + * @run main ValWithAnchorByName + */ + +import java.io.ByteArrayInputStream; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.CertPath; +import java.security.cert.CertPathValidator; +import java.security.cert.PKIXParameters; +import java.security.cert.PKIXRevocationChecker; +import java.security.cert.TrustAnchor; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.HashMap; + +// To get certpath debugging, add -Djava.security.debug=certpath + +public class ValWithAnchorByName { + + // The following certificates and OCSP responses were captured from + // a test run that used certificates and responses generated by + // sun.security.testlibrary.CertificateBuilder and + // sun.security.testlibrary.SimpleOCSPServer. + + // Subject: CN=SSLCertificate, O=SomeCompany + // Issuer: CN=Intermediate CA Cert, O=SomeCompany + // Validity: Tue Aug 30 14:37:19 PDT 2016 to Wed Aug 30 14:37:19 PDT 2017 + private static final String EE_CERT = + "-----BEGIN CERTIFICATE-----\n" + + "MIIDnTCCAoWgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwNTEUMBIGA1UEChMLU29t\n" + + "ZUNvbXBhbnkxHTAbBgNVBAMTFEludGVybWVkaWF0ZSBDQSBDZXJ0MB4XDTE2MDgz\n" + + "MDIxMzcxOVoXDTE3MDgzMDIxMzcxOVowLzEUMBIGA1UEChMLU29tZUNvbXBhbnkx\n" + + "FzAVBgNVBAMTDlNTTENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\n" + + "MIIBCgKCAQEAjgv8KKE4CO0rbCjRLA1hXjRiSq30jeusCJ8frbRG+QOBgQ3j6jgc\n" + + "vk5wG1aTu7R4AFn0/HRDMzP9ZbRlZVIbJUTd8YiaNyZeyWapPnxHWrPCd5e1xopk\n" + + "ElieDdEH5FiLGtIrWy56CGA1hfQb1vUVYegyeY+TTtMFVHt0PrmMk4ZRgj/GtVNp\n" + + "BQQYIzaYAcrcWMeCn30ZrhaGAL1hsdgmEVV1wsTD4JeNMSwLwMYem7fg8ondGZIR\n" + + "kZuGtuSdOHu4Xz+mgDNXTeX/Bp/dQFucxCG+FOOM9Hoz72RY2W8YqgL38RlnwYWp\n" + + "nUNxhXWFH6vyINRQVEu3IgahR6HXjxM7LwIDAQABo4G8MIG5MBQGA1UdEQQNMAuC\n" + + "CWxvY2FsaG9zdDAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9s\n" + + "b2NhbGhvc3Q6NDIzMzMwHwYDVR0jBBgwFoAUYT525lwHCI4CmuWs8a7poaeKRJ4w\n" + + "HQYDVR0OBBYEFCaQnOX4L1ovqyfeKuoay+kI+lXgMA4GA1UdDwEB/wQEAwIFoDAd\n" + + "BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEB\n" + + "AD8dqQIqFasJcL8lm4mPTsBl0JgNiN8tQcXM7VCvcH+yDvEyh9vudDjuhpSORqPq\n" + + "f1o/EvJ+gfs269mBnYQujYRvmSd6EAcBntv5zn6amOh03o6PqTY9KaUC/mL9hB84\n" + + "Y5/LYioP16sME7egKnlrGUgKh0ZvGzm7c3SYx3Z5YoeFBOkZajc7Jm+cBw/uBQkF\n" + + "a9mLEczIvOgkq1wto8vr2ptH1gEuvFRcorN3muvq34bk40G08+AHlP3fCLFpI3FA\n" + + "IStJLJZRcO+Ib4sOcKuaBGnuMo/QVOCEMDUs6RgiWtSd93OZKFIUOASVp6YIkcSs\n" + + "5/rmc06sICqBjLfPEB68Jjw=\n" + + "-----END CERTIFICATE-----"; + + // Subject: CN=Intermediate CA Cert, O=SomeCompany + // Issuer: CN=Root CA Cert, O=SomeCompany + // Validity: Sun Aug 07 14:37:19 PDT 2016 to Tue Aug 07 14:37:19 PDT 2018 + private static final String INT_CA_CERT = + "-----BEGIN CERTIFICATE-----\n" + + "MIIDdjCCAl6gAwIBAgIBZDANBgkqhkiG9w0BAQsFADAtMRQwEgYDVQQKEwtTb21l\n" + + "Q29tcGFueTEVMBMGA1UEAxMMUm9vdCBDQSBDZXJ0MB4XDTE2MDgwNzIxMzcxOVoX\n" + + "DTE4MDgwNzIxMzcxOVowNTEUMBIGA1UEChMLU29tZUNvbXBhbnkxHTAbBgNVBAMT\n" + + "FEludGVybWVkaWF0ZSBDQSBDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\n" + + "CgKCAQEAnJR5CnE7GKlQjigExSJ6hHu302mc0PcA6TDgsIitPYD/r8RBbBuE51OQ\n" + + "7IP7AXmfPUV3/+pO/uxx6mgY5O6XeUl7KadhVPtPcL0BVVevCSOdTMVa3iV4zRpa\n" + + "C6Uy2ouUFnafKnDtlbieggyETUoNgVNJYA9L0XNhtSnENoLHC4Pq0v8OsNtsOWFR\n" + + "NiMTOA49NNDBw85WgPyFAxjqO4z0J0zxdWq3W4rSMB8xrkulv2Rvj3GcfYJK/ab8\n" + + "V1IJ6PMWCpujASY3BzvYPnN7BKuBjbWJPgZdPYfX1cxeG80u0tOuMfWWiNONSMSA\n" + + "7m9y304QA0gKqlrFFn9U4hU89kv1IwIDAQABo4GYMIGVMA8GA1UdEwEB/wQFMAMB\n" + + "Af8wMgYIKwYBBQUHAQEEJjAkMCIGCCsGAQUFBzABhhZodHRwOi8vbG9jYWxob3N0\n" + + "OjM5MTM0MB8GA1UdIwQYMBaAFJNMsejEyJUB9tiWycVczvpiMVQZMB0GA1UdDgQW\n" + + "BBRhPnbmXAcIjgKa5azxrumhp4pEnjAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcN\n" + + "AQELBQADggEBAE4nOFdW9OirPnRvxihQXYL9CXLuGQz5tr0XgN8wSY6Un9b6CRiK\n" + + "7obgIGimVdhvUC1qdRcwJqgOfJ2/jR5/5Qo0TVp+ww4dHNdUoj73tagJ7jTu0ZMz\n" + + "5Zdp0uwd4RD/syvTeVcbPc3m4awtgEvRgzpDMcSeKPZWInlo7fbnowKSAUAfO8de\n" + + "0cDkxEBkzPIzGNu256cdLZOqOK9wLJ9mQ0zKgi/2NsldNc2pl/6jkGpA6uL5lJsm\n" + + "fo9sDusWNHV1YggqjDQ19hrf40VuuC9GFl/qAW3marMuEzY/NiKVUxty1q1s48SO\n" + + "g5LoEPDDkbygOt7ICL3HYG1VufhC1Q2YY9c=\n" + + "-----END CERTIFICATE-----"; + + // Subject: CN=Root CA Cert, O=SomeCompany + // Issuer: CN=Root CA Cert, O=SomeCompany + // Validity: Fri Jul 08 14:37:18 PDT 2016 to Fri Jun 28 14:37:18 PDT 2019 + private static final String ROOT_CA_CERT = + "-----BEGIN CERTIFICATE-----\n" + + "MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAtMRQwEgYDVQQKEwtTb21l\n" + + "Q29tcGFueTEVMBMGA1UEAxMMUm9vdCBDQSBDZXJ0MB4XDTE2MDcwODIxMzcxOFoX\n" + + "DTE5MDYyODIxMzcxOFowLTEUMBIGA1UEChMLU29tZUNvbXBhbnkxFTATBgNVBAMT\n" + + "DFJvb3QgQ0EgQ2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIlN\n" + + "M3WYEqkU2elXEZrV9QSDbDKwyaLEHafLFciH8Edoag3q/7jEzFJxI7JZ831tdbWQ\n" + + "Bm6Hgo+8pvetOFW1BckL8eIjyOONP2CKfFaeMaozsWi1cgxa+rjpU/Rekc+zBqvv\n" + + "y4Sr97TwT6nQiLlgjC1nCfR1SVpO51qoDChS7n785rsKEZxw/p+kkVWSZffU7zN9\n" + + "c645cPg//L/kjiyeKMkaquGQOYS68gQgy8YZXQv1E3l/8e8Ci1s1DYA5wpCbaBqg\n" + + "Tw84Rr4zlUEQBgXzQlRt+mPzeaDpdG1EeGkXrcdkZ+0EMELoOVXOEn6VNsz6vT3I\n" + + "KrnvQBSnN06xq/iWwC0CAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSME\n" + + "GDAWgBSTTLHoxMiVAfbYlsnFXM76YjFUGTAdBgNVHQ4EFgQUk0yx6MTIlQH22JbJ\n" + + "xVzO+mIxVBkwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IBAQAAi+Nl\n" + + "sxP9t2IhiZIHRJGSBZuQlXIjwYIwbq3ZWc/ApZ+0oxtl7DYQi5uRNt8/opcGNCHc\n" + + "IY0fG93SbkDubXbxPYBW6D/RUjbz59ZryaP5ym55p1MjHTOqy+AM8g41xNTJikc3\n" + + "UUFXXnckeFbawijCsb7vf71owzKuxgBXi9n1rmXXtncKoA/LrUVXoUlKefdgDnsU\n" + + "sl3Q29eibE3HSqziMMoAOLm0jjekFGWIgLeTtyRYR1d0dNaUwsHTrQpPjxxUTn1x\n" + + "sAPpXKfzPnsYAZeeiaaE75GwbWlHzrNinvxdZQd0zctpfBJfVqD/+lWANlw+rOaK\n" + + "J2GyCaJINsyaI/I2\n" + + "-----END CERTIFICATE-----"; + + // OCSP Response Status: successful (0x0) + // Response Type: Basic OCSP Response + // Version: 1 (0x0) + // Responder Id: CN=Intermediate CA Cert, O=SomeCompany + // Produced At: Sep 6 21:37:20 2016 GMT + // Responses: + // Certificate ID: + // Hash Algorithm: sha1 + // Issuer Name Hash: 7ED23D4396152EAB7D0C4AD8C1CA1418AA05DD54 + // Issuer Key Hash: 613E76E65C07088E029AE5ACF1AEE9A1A78A449E + // Serial Number: 1000 + // Cert Status: good + // This Update: Sep 6 21:37:20 2016 GMT + // Next Update: Sep 6 22:37:19 2016 GMT + private static final String EE_OCSP_RESP = + "MIIFbAoBAKCCBWUwggVhBgkrBgEFBQcwAQEEggVSMIIFTjCBtaE3MDUxFDASBgNV\n" + + "BAoTC1NvbWVDb21wYW55MR0wGwYDVQQDExRJbnRlcm1lZGlhdGUgQ0EgQ2VydBgP\n" + + "MjAxNjA5MDYyMTM3MjBaMGUwYzA7MAkGBSsOAwIaBQAEFH7SPUOWFS6rfQxK2MHK\n" + + "FBiqBd1UBBRhPnbmXAcIjgKa5azxrumhp4pEngICEACAABgPMjAxNjA5MDYyMTM3\n" + + "MjBaoBEYDzIwMTYwOTA2MjIzNzE5WqECMAAwDQYJKoZIhvcNAQELBQADggEBAF13\n" + + "cLwxDG8UYPIbzID86vZGOWUuv5c35VnvebMk/ajAUdpItDYshIQVi90Z8BB2TEi/\n" + + "wtx1aNkIv7db0uQ0NnRfvME8vG2PWbty36CNAYr/M5UVzUmELH2sGTyf2fKfNIUK\n" + + "Iya/NRxCqxLAc34NYH0YyGJ9VcDjbEMNSBAHIqDdBNqKUPnjn454yoivU2oEs294\n" + + "cGePMx3QLyPepMwUss8nW74yIF7vxfJ+KFDBGWNuZDRfXScsGIoeM0Vt9B+4fmnV\n" + + "nP4Dw6l3IwmQH4ppjg08qTKvyrXcF2dPDWa98Xw6bA5G085Z/b/6/6GpkvKx/q6i\n" + + "UqKwF7q5hkDcB+N4/5SgggN+MIIDejCCA3YwggJeoAMCAQICAWQwDQYJKoZIhvcN\n" + + "AQELBQAwLTEUMBIGA1UEChMLU29tZUNvbXBhbnkxFTATBgNVBAMTDFJvb3QgQ0Eg\n" + + "Q2VydDAeFw0xNjA4MDcyMTM3MTlaFw0xODA4MDcyMTM3MTlaMDUxFDASBgNVBAoT\n" + + "C1NvbWVDb21wYW55MR0wGwYDVQQDExRJbnRlcm1lZGlhdGUgQ0EgQ2VydDCCASIw\n" + + "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJyUeQpxOxipUI4oBMUieoR7t9Np\n" + + "nND3AOkw4LCIrT2A/6/EQWwbhOdTkOyD+wF5nz1Fd//qTv7scepoGOTul3lJeymn\n" + + "YVT7T3C9AVVXrwkjnUzFWt4leM0aWgulMtqLlBZ2nypw7ZW4noIMhE1KDYFTSWAP\n" + + "S9FzYbUpxDaCxwuD6tL/DrDbbDlhUTYjEzgOPTTQwcPOVoD8hQMY6juM9CdM8XVq\n" + + "t1uK0jAfMa5Lpb9kb49xnH2CSv2m/FdSCejzFgqbowEmNwc72D5zewSrgY21iT4G\n" + + "XT2H19XMXhvNLtLTrjH1lojTjUjEgO5vct9OEANICqpaxRZ/VOIVPPZL9SMCAwEA\n" + + "AaOBmDCBlTAPBgNVHRMBAf8EBTADAQH/MDIGCCsGAQUFBwEBBCYwJDAiBggrBgEF\n" + + "BQcwAYYWaHR0cDovL2xvY2FsaG9zdDozOTEzNDAfBgNVHSMEGDAWgBSTTLHoxMiV\n" + + "AfbYlsnFXM76YjFUGTAdBgNVHQ4EFgQUYT525lwHCI4CmuWs8a7poaeKRJ4wDgYD\n" + + "VR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IBAQBOJzhXVvToqz50b8YoUF2C\n" + + "/Qly7hkM+ba9F4DfMEmOlJ/W+gkYiu6G4CBoplXYb1AtanUXMCaoDnydv40ef+UK\n" + + "NE1afsMOHRzXVKI+97WoCe407tGTM+WXadLsHeEQ/7Mr03lXGz3N5uGsLYBL0YM6\n" + + "QzHEnij2ViJ5aO3256MCkgFAHzvHXtHA5MRAZMzyMxjbtuenHS2TqjivcCyfZkNM\n" + + "yoIv9jbJXTXNqZf+o5BqQOri+ZSbJn6PbA7rFjR1dWIIKow0NfYa3+NFbrgvRhZf\n" + + "6gFt5mqzLhM2PzYilVMbctatbOPEjoOS6BDww5G8oDreyAi9x2BtVbn4QtUNmGPX"; + + // OCSP Response Status: successful (0x0) + // Response Type: Basic OCSP Response + // Version: 1 (0x0) + // Responder Id: O = SomeCompany, CN = Root CA Cert + // Produced At: Sep 6 21:37:20 2016 GMT + // Responses: + // Certificate ID: + // Hash Algorithm: sha1 + // Issuer Name Hash: C8ED9F4E9AC0052A978257C569E6A7C9C45F5CB5 + // Issuer Key Hash: 934CB1E8C4C89501F6D896C9C55CCEFA62315419 + // Serial Number: 64 + // Cert Status: good + // This Update: Sep 6 21:37:20 2016 GMT + // Next Update: Sep 6 22:37:19 2016 GMT + private static final String INT_CA_OCSP_RESP = + "MIIFJQoBAKCCBR4wggUaBgkrBgEFBQcwAQEEggULMIIFBzCBrKEvMC0xFDASBgNV\n" + + "BAoTC1NvbWVDb21wYW55MRUwEwYDVQQDEwxSb290IENBIENlcnQYDzIwMTYwOTA2\n" + + "MjEzNzIwWjBkMGIwOjAJBgUrDgMCGgUABBTI7Z9OmsAFKpeCV8Vp5qfJxF9ctQQU\n" + + "k0yx6MTIlQH22JbJxVzO+mIxVBkCAWSAABgPMjAxNjA5MDYyMTM3MjBaoBEYDzIw\n" + + "MTYwOTA2MjIzNzE5WqECMAAwDQYJKoZIhvcNAQELBQADggEBAAgs8jpuEejPD8qO\n" + + "+xckvqMz/5pItOHaSB0xyPNpIapqjcDkLktJdBVq5XJWernO9DU+P7yr7TDbvo6h\n" + + "P5jBZklLz16Z1aRlEyow2jhelVjNl6nxoiij/6LOGK4tLHa8fK7hTB4Ykw22Bxzt\n" + + "LcbrU5jgUDhdZkTrs+rWM8nw7mVWIQYQfwzCMDZ5a02MxzhdwggJGRzqMrbhY/Q7\n" + + "RRUK3ohSgzHmLjVkvA0KeM/Px7EefzbEbww08fSsLybmBoIEbcckWSHkkXx4cuIR\n" + + "T9FiTz4Ms4r8qzPCo61qeklE2I5lfnfieROADV6sfwbul/0U1HqKhHVaxJ8yYw+T\n" + + "/FMxrUKgggNAMIIDPDCCAzgwggIgoAMCAQICAQEwDQYJKoZIhvcNAQELBQAwLTEU\n" + + "MBIGA1UEChMLU29tZUNvbXBhbnkxFTATBgNVBAMTDFJvb3QgQ0EgQ2VydDAeFw0x\n" + + "NjA3MDgyMTM3MThaFw0xOTA2MjgyMTM3MThaMC0xFDASBgNVBAoTC1NvbWVDb21w\n" + + "YW55MRUwEwYDVQQDEwxSb290IENBIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IB\n" + + "DwAwggEKAoIBAQCJTTN1mBKpFNnpVxGa1fUEg2wysMmixB2nyxXIh/BHaGoN6v+4\n" + + "xMxScSOyWfN9bXW1kAZuh4KPvKb3rThVtQXJC/HiI8jjjT9ginxWnjGqM7FotXIM\n" + + "Wvq46VP0XpHPswar78uEq/e08E+p0Ii5YIwtZwn0dUlaTudaqAwoUu5+/Oa7ChGc\n" + + "cP6fpJFVkmX31O8zfXOuOXD4P/y/5I4snijJGqrhkDmEuvIEIMvGGV0L9RN5f/Hv\n" + + "AotbNQ2AOcKQm2gaoE8POEa+M5VBEAYF80JUbfpj83mg6XRtRHhpF63HZGftBDBC\n" + + "6DlVzhJ+lTbM+r09yCq570AUpzdOsav4lsAtAgMBAAGjYzBhMA8GA1UdEwEB/wQF\n" + + "MAMBAf8wHwYDVR0jBBgwFoAUk0yx6MTIlQH22JbJxVzO+mIxVBkwHQYDVR0OBBYE\n" + + "FJNMsejEyJUB9tiWycVczvpiMVQZMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0B\n" + + "AQsFAAOCAQEAAIvjZbMT/bdiIYmSB0SRkgWbkJVyI8GCMG6t2VnPwKWftKMbZew2\n" + + "EIubkTbfP6KXBjQh3CGNHxvd0m5A7m128T2AVug/0VI28+fWa8mj+cpueadTIx0z\n" + + "qsvgDPIONcTUyYpHN1FBV153JHhW2sIowrG+73+9aMMyrsYAV4vZ9a5l17Z3CqAP\n" + + "y61FV6FJSnn3YA57FLJd0NvXomxNx0qs4jDKADi5tI43pBRliIC3k7ckWEdXdHTW\n" + + "lMLB060KT48cVE59cbAD6Vyn8z57GAGXnommhO+RsG1pR86zYp78XWUHdM3LaXwS\n" + + "X1ag//pVgDZcPqzmiidhsgmiSDbMmiPyNg=="; + + // Do path validation as if it is always Tue, 06 Sep 2016 22:12:21 GMT + // This value is within the lifetimes of all certificates and both OCSP + // responses. + private static final Date EVAL_DATE = new Date(1473199941000L); + + private static final Base64.Decoder DECODER = Base64.getMimeDecoder(); + + public static void main(String[] args) throws Exception { + TrustAnchor anchor; + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + X509Certificate rootCert = generateCertificate(cf, ROOT_CA_CERT); + X509Certificate eeCert = generateCertificate(cf, EE_CERT); + X509Certificate intCaCert = generateCertificate(cf, INT_CA_CERT); + List certList = new ArrayList() {{ + add(eeCert); + add(intCaCert); + }}; + + System.out.println("==== Certificate Path ====="); + for (X509Certificate c : certList) { + System.out.println(c + "\n"); + } + System.out.println("==========================="); + + System.out.println("===== Test 1: TA(X509Certificate) ====="); + anchor = new TrustAnchor(rootCert, null); + runTest(cf, certList, anchor); + + System.out.println("===== Test 2: TA(X500Principal, PublicKey ====="); + anchor = new TrustAnchor(rootCert.getSubjectX500Principal(), + rootCert.getPublicKey(), null); + runTest(cf, certList, anchor); + + System.out.println("===== Test 3: TA(String, PublicKey ====="); + anchor = new TrustAnchor(rootCert.getSubjectX500Principal().getName(), + rootCert.getPublicKey(), null); + runTest(cf, certList, anchor); + } + + private static void runTest(CertificateFactory cf, + List certList, TrustAnchor anchor) + throws Exception { + CertPath path = cf.generateCertPath(certList); + CertPathValidator validator = CertPathValidator.getInstance("PKIX"); + + System.out.println(anchor); + + // Attach the OCSP responses to a PKIXParameters object + PKIXRevocationChecker pkrev = + (PKIXRevocationChecker)validator.getRevocationChecker(); + Map responseMap = new HashMap<>(); + responseMap.put(certList.get(0), DECODER.decode(EE_OCSP_RESP)); + responseMap.put(certList.get(1), DECODER.decode(INT_CA_OCSP_RESP)); + pkrev.setOcspResponses(responseMap); + PKIXParameters params = + new PKIXParameters(Collections.singleton(anchor)); + params.addCertPathChecker(pkrev); + params.setDate(EVAL_DATE); + + validator.validate(path, params); + } + + private static X509Certificate generateCertificate(CertificateFactory cf, + String encoded) throws CertificateException { + ByteArrayInputStream is = new ByteArrayInputStream(encoded.getBytes()); + return (X509Certificate)cf.generateCertificate(is); + } +} diff --git a/jdk/test/java/sql/testng/TEST.properties b/jdk/test/java/sql/testng/TEST.properties index 295505b905a..66b1566374a 100644 --- a/jdk/test/java/sql/testng/TEST.properties +++ b/jdk/test/java/sql/testng/TEST.properties @@ -1,3 +1,4 @@ # JDBC unit tests uses TestNG TestNG.dirs = . +othervm.dirs = test/sql/othervm diff --git a/jdk/test/java/sql/testng/test/sql/othervm/DriverManagerInitTests.java b/jdk/test/java/sql/testng/test/sql/othervm/DriverManagerInitTests.java new file mode 100644 index 00000000000..d2570993533 --- /dev/null +++ b/jdk/test/java/sql/testng/test/sql/othervm/DriverManagerInitTests.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2016, 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. + */ +package test.sql.othervm; + +import java.io.BufferedReader; +import java.io.CharArrayReader; +import java.io.CharArrayWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Driver; +import java.sql.DriverManager; +import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; + +import static org.testng.Assert.*; +import org.testng.annotations.Test; + +public class DriverManagerInitTests { + + /** + * Validate that when DriverManager loads the initial JDBC drivers, that the + * output from DriverManager.println is available by verifying that the + * String "JDBC DriverManager initialized" is found + */ + @Test + public void test() { + + CharArrayWriter cw = new CharArrayWriter(); + PrintWriter pw = new PrintWriter(cw); + DriverManager.setLogWriter(pw); + Enumeration drivers = DriverManager.getDrivers(); + + try (BufferedReader reader = new BufferedReader(new CharArrayReader(cw.toCharArray()))) { + boolean result + = reader.lines().anyMatch( + line -> line.matches(".*JDBC DriverManager initialized.*")); + assertTrue(result); + + } catch (IOException ex) { + Logger.getLogger(DriverManagerInitTests.class.getName()).log(Level.SEVERE, null, ex); + fail(); + } + + // Check to verify that we are not initializing a 2nd time + cw = new CharArrayWriter(); + pw = new PrintWriter(cw); + DriverManager.setLogWriter(pw); + drivers = DriverManager.getDrivers(); + + try (BufferedReader reader = new BufferedReader(new CharArrayReader(cw.toCharArray()))) { + boolean result + = reader.lines().noneMatch( + line -> line.matches(".*JDBC DriverManager initialized.*")); + assertTrue(result); + + } catch (IOException ex) { + Logger.getLogger(DriverManagerInitTests.class.getName()).log(Level.SEVERE, null, ex); + fail(); + } + + } + +} diff --git a/jdk/test/java/text/Format/DateFormat/Bug4322313.java b/jdk/test/java/text/Format/DateFormat/Bug4322313.java index bea772e63e6..b6ddef99a1b 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug4322313.java +++ b/jdk/test/java/text/Format/DateFormat/Bug4322313.java @@ -50,110 +50,110 @@ public class Bug4322313 extends IntlTest { Object[][] valids = { /* given ID offset format('z'), ('Z') index */ - {"GMT+03:04", new Long(-184 * mpm), "GMT+03:04", "+0304", new Integer(9)}, - {"GMT+13:42", new Long(-822 * mpm), "GMT+13:42", "+1342", new Integer(9)}, - {"GMT+00:00", new Long(0), "GMT+00:00", "+0000", new Integer(9)}, - {"GMT+1:11", new Long(-71 * mpm), "GMT+01:11", "+0111", new Integer(8)}, - {"GMT +13:42", new Long(0), "GMT", "+0000", new Integer(3)}, - {" GMT", new Long(0), "GMT", "+0000", new Integer(4)}, - {"+0304", new Long(-184 * mpm), "GMT+03:04", "+0304", new Integer(5)}, - {"+1342", new Long(-822 * mpm), "GMT+13:42", "+1342", new Integer(5)}, - {"+0000", new Long(0), "GMT+00:00", "+0000", new Integer(5)}, - {" +1342", new Long(-822 * mpm), "GMT+13:42", "+1342", new Integer(6)}, + {"GMT+03:04", -184L * mpm, "GMT+03:04", "+0304", 9}, + {"GMT+13:42", -822L * mpm, "GMT+13:42", "+1342", 9}, + {"GMT+00:00", 0L, "GMT+00:00", "+0000", 9}, + {"GMT+1:11", -71L * mpm, "GMT+01:11", "+0111", 8}, + {"GMT +13:42", 0L, "GMT", "+0000", 3}, + {" GMT", 0L, "GMT", "+0000", 4}, + {"+0304", -184L * mpm, "GMT+03:04", "+0304", 5}, + {"+1342", -822L * mpm, "GMT+13:42", "+1342", 5}, + {"+0000", 0L, "GMT+00:00", "+0000", 5}, + {" +1342", -822L * mpm, "GMT+13:42", "+1342", 6}, /* ISO-LATIN-1 digits */ - {"GMT+\u0030\u0031:\u0032\u0033", new Long(-83 * mpm), "GMT+01:23", "+0123", new Integer(9)}, + {"GMT+\u0030\u0031:\u0032\u0033", -83L * mpm, "GMT+01:23", "+0123", 9}, /* In fact, this test case is skipped because TimeZone class can't * recognize TimeZone IDs like "+00234" or "-00234". */ - {"+00234", new Long(-23 * mpm), "GMT+00:23", "+0023", new Integer(5)}, + {"+00234", -23L * mpm, "GMT+00:23", "+0023", 5}, - {"GMT-03:04", new Long(184 * mpm), "GMT-03:04", "-0304", new Integer(9)}, - {"GMT-13:42", new Long(822 * mpm), "GMT-13:42", "-1342", new Integer(9)}, - {"GMT-00:00", new Long(0), "GMT+00:00", "+0000", new Integer(9)}, - {"GMT-1:11", new Long(71 * mpm), "GMT-01:11", "-0111", new Integer(8)}, - {"GMT -13:42", new Long(0), "GMT", "+0000", new Integer(3)}, - {"-0304", new Long(184 * mpm), "GMT-03:04", "-0304", new Integer(5)}, - {"-1342", new Long(822 * mpm), "GMT-13:42", "-1342", new Integer(5)}, - {" -1342", new Long(822 * mpm), "GMT-13:42", "-1342", new Integer(6)}, + {"GMT-03:04", 184L * mpm, "GMT-03:04", "-0304", 9}, + {"GMT-13:42", 822L * mpm, "GMT-13:42", "-1342", 9}, + {"GMT-00:00", 0L, "GMT+00:00", "+0000", 9}, + {"GMT-1:11", 71L * mpm, "GMT-01:11", "-0111", 8}, + {"GMT -13:42", 0L, "GMT", "+0000", 3}, + {"-0304", 184L * mpm, "GMT-03:04", "-0304", 5}, + {"-1342", 822L * mpm, "GMT-13:42", "-1342", 5}, + {" -1342", 822L * mpm, "GMT-13:42", "-1342", 6}, /* ISO-LATIN-1 digits */ - {"GMT-\u0030\u0031:\u0032\u0033", new Long(83 * mpm), "GMT-01:23", "-0123", new Integer(9)}, + {"GMT-\u0030\u0031:\u0032\u0033", 83L * mpm, "GMT-01:23", "-0123", 9}, /* In fact, this test case is skipped because TimeZone class can't * recognize TimeZone IDs like "+00234" or "-00234". */ - {"-00234", new Long(23 * mpm), "GMT+00:23", "-0023", new Integer(5)}, + {"-00234", 23L * mpm, "GMT+00:23", "-0023", 5}, }; Object[][] invalids = { /* given ID error index */ - {"GMT+8", new Integer(5)}, - {"GMT+18", new Integer(6)}, - {"GMT+208", new Integer(6)}, - {"GMT+0304", new Integer(6)}, - {"GMT+42195", new Integer(5)}, - {"GMT+5:8", new Integer(7)}, - {"GMT+23:60", new Integer(8)}, - {"GMT+11:1", new Integer(8)}, - {"GMT+24:13", new Integer(5)}, - {"GMT+421:950", new Integer(5)}, - {"GMT+0a:0A", new Integer(5)}, - {"GMT+ 13:42", new Integer(4)}, - {"GMT+13 :42", new Integer(6)}, - {"GMT+13: 42", new Integer(7)}, - {"GMT+-13:42", new Integer(4)}, - {"G M T", new Integer(0)}, - {"+8", new Integer(2)}, - {"+18", new Integer(3)}, - {"+208", new Integer(4)}, - {"+2360", new Integer(4)}, - {"+2413", new Integer(2)}, - {"+42195", new Integer(2)}, - {"+0AbC", new Integer(2)}, - {"+ 1342", new Integer(1)}, - {"+-1342", new Integer(1)}, - {"1342", new Integer(0)}, + {"GMT+8", 5}, + {"GMT+18", 6}, + {"GMT+208", 6}, + {"GMT+0304", 6}, + {"GMT+42195", 5}, + {"GMT+5:8", 7}, + {"GMT+23:60", 8}, + {"GMT+11:1", 8}, + {"GMT+24:13", 5}, + {"GMT+421:950", 5}, + {"GMT+0a:0A", 5}, + {"GMT+ 13:42", 4}, + {"GMT+13 :42", 6}, + {"GMT+13: 42", 7}, + {"GMT+-13:42", 4}, + {"G M T", 0}, + {"+8", 2}, + {"+18", 3}, + {"+208", 4}, + {"+2360", 4}, + {"+2413", 2}, + {"+42195", 2}, + {"+0AbC", 2}, + {"+ 1342", 1}, + {"+-1342", 1}, + {"1342", 0}, /* Arabic-Indic digits */ - {"GMT+\u0660\u0661:\u0662\u0663", new Integer(4)}, + {"GMT+\u0660\u0661:\u0662\u0663", 4}, /* Extended Arabic-Indic digits */ - {"GMT+\u06f0\u06f1:\u06f2\u06f3", new Integer(4)}, + {"GMT+\u06f0\u06f1:\u06f2\u06f3", 4}, /* Devanagari digits */ - {"GMT+\u0966\u0967:\u0968\u0969", new Integer(4)}, + {"GMT+\u0966\u0967:\u0968\u0969", 4}, /* Fullwidth digits */ - {"GMT+\uFF10\uFF11:\uFF12\uFF13", new Integer(4)}, + {"GMT+\uFF10\uFF11:\uFF12\uFF13", 4}, - {"GMT-8", new Integer(5)}, - {"GMT-18", new Integer(6)}, - {"GMT-208", new Integer(6)}, - {"GMT-0304", new Integer(6)}, - {"GMT-42195", new Integer(5)}, - {"GMT-5:8", new Integer(7)}, - {"GMT-23:60", new Integer(8)}, - {"GMT-11:1", new Integer(8)}, - {"GMT-24:13", new Integer(5)}, - {"GMT-421:950", new Integer(5)}, - {"GMT-0a:0A", new Integer(5)}, - {"GMT- 13:42", new Integer(4)}, - {"GMT-13 :42", new Integer(6)}, - {"GMT-13: 42", new Integer(7)}, - {"GMT-+13:42", new Integer(4)}, - {"-8", new Integer(2)}, - {"-18", new Integer(3)}, - {"-208", new Integer(4)}, - {"-2360", new Integer(4)}, - {"-2413", new Integer(2)}, - {"-42195", new Integer(2)}, - {"-0AbC", new Integer(2)}, - {"- 1342", new Integer(1)}, - {"--1342", new Integer(1)}, - {"-802", new Integer(2)}, + {"GMT-8", 5}, + {"GMT-18", 6}, + {"GMT-208", 6}, + {"GMT-0304", 6}, + {"GMT-42195", 5}, + {"GMT-5:8", 7}, + {"GMT-23:60", 8}, + {"GMT-11:1", 8}, + {"GMT-24:13", 5}, + {"GMT-421:950", 5}, + {"GMT-0a:0A", 5}, + {"GMT- 13:42", 4}, + {"GMT-13 :42", 6}, + {"GMT-13: 42", 7}, + {"GMT-+13:42", 4}, + {"-8", 2}, + {"-18", 3}, + {"-208", 4}, + {"-2360", 4}, + {"-2413", 2}, + {"-42195", 2}, + {"-0AbC", 2}, + {"- 1342", 1}, + {"--1342", 1}, + {"-802", 2}, /* Arabic-Indic digits */ - {"GMT-\u0660\u0661:\u0662\u0663", new Integer(4)}, + {"GMT-\u0660\u0661:\u0662\u0663", 4}, /* Extended Arabic-Indic digits */ - {"GMT-\u06f0\u06f1:\u06f2\u06f3", new Integer(4)}, + {"GMT-\u06f0\u06f1:\u06f2\u06f3", 4}, /* Devanagari digits */ - {"GMT-\u0966\u0967:\u0968\u0969", new Integer(4)}, + {"GMT-\u0966\u0967:\u0968\u0969", 4}, /* Fullwidth digits */ - {"GMT-\uFF10\uFF11:\uFF12\uFF13", new Integer(4)}, + {"GMT-\uFF10\uFF11:\uFF12\uFF13", 4}, }; try { diff --git a/jdk/test/java/text/Format/DateFormat/Bug4736959.java b/jdk/test/java/text/Format/DateFormat/Bug4736959.java index cdb9cad20b4..00fa8d0840a 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug4736959.java +++ b/jdk/test/java/text/Format/DateFormat/Bug4736959.java @@ -30,6 +30,7 @@ import java.text.*; import java.util.*; +@SuppressWarnings("deprecation") public class Bug4736959 { /** * 4736959: JSpinner won't work for AM/PM field diff --git a/jdk/test/java/text/Format/DateFormat/Bug4823811.java b/jdk/test/java/text/Format/DateFormat/Bug4823811.java index c2d35e9f64f..b1f6c9d5b9d 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug4823811.java +++ b/jdk/test/java/text/Format/DateFormat/Bug4823811.java @@ -685,8 +685,8 @@ public class Bug4823811 { testNumberFormatFormatting(nfEG, -456, "456-", "ar_EG"); System.out.println("*** DecimalFormat.parse test in ar_EG"); - testNumberFormatParsing(nfEG, "123-", new Long(-123), "ar_EG"); - testNumberFormatParsing(nfEG, "123--", new Long(-123), "ar_EG"); + testNumberFormatParsing(nfEG, "123-", -123L, "ar_EG"); + testNumberFormatParsing(nfEG, "123--",-123L, "ar_EG"); testNumberFormatParsingCheckException(nfEG, "-123", 0, "ar_EG"); System.out.println("*** DecimalFormat.format test in en_US"); @@ -694,8 +694,8 @@ public class Bug4823811 { testNumberFormatFormatting(nfUS, -456, "-456", "en_US"); System.out.println("*** DecimalFormat.parse test in en_US"); - testNumberFormatParsing(nfUS, "123-", new Long(123), "en_US"); - testNumberFormatParsing(nfUS, "-123", new Long(-123), "en_US"); + testNumberFormatParsing(nfUS, "123-", 123L, "en_US"); + testNumberFormatParsing(nfUS, "-123",-123L, "en_US"); testNumberFormatParsingCheckException(nfUS, "--123", 0, "en_US"); } diff --git a/jdk/test/java/text/Format/DateFormat/Bug4845901.java b/jdk/test/java/text/Format/DateFormat/Bug4845901.java index a88b47a761e..363a3518bf0 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug4845901.java +++ b/jdk/test/java/text/Format/DateFormat/Bug4845901.java @@ -55,6 +55,7 @@ public class Bug4845901 { } } + @SuppressWarnings("deprecation") static void testParse(SimpleDateFormat sdf, String str, int expectedHour) { try { Date parsedDate = sdf.parse(str); diff --git a/jdk/test/java/text/Format/DateFormat/Bug6609750.java b/jdk/test/java/text/Format/DateFormat/Bug6609750.java index ccd5d5e814b..5529bc6c812 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug6609750.java +++ b/jdk/test/java/text/Format/DateFormat/Bug6609750.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, 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 @@ -37,6 +37,7 @@ public class Bug6609750 { Locale defaultLocale = Locale.getDefault(); Locale.setDefault(Locale.US); + @SuppressWarnings("deprecation") Date[] dates = { new Date(9-1900, Calendar.JUNE, 12), new Date(99-1900, Calendar.JUNE, 12), diff --git a/jdk/test/java/text/Format/DateFormat/Bug6683975.java b/jdk/test/java/text/Format/DateFormat/Bug6683975.java index 1f401058e5a..0afdcd74c4a 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug6683975.java +++ b/jdk/test/java/text/Format/DateFormat/Bug6683975.java @@ -66,6 +66,7 @@ public class Bug6683975 { System.err.println("\tth_TH: " + str_th_TH); } + @SuppressWarnings("deprecation") Date date = new Date(2008-1900, Calendar.SEPTEMBER, 30, 8, 0, 0); str_th = df_th.format(date); if (!expected_th[style].equals(str_th)) { diff --git a/jdk/test/java/text/Format/DateFormat/DateFormatRegression.java b/jdk/test/java/text/Format/DateFormat/DateFormatRegression.java index 5c416b0dc53..d4230fb2cb7 100644 --- a/jdk/test/java/text/Format/DateFormat/DateFormatRegression.java +++ b/jdk/test/java/text/Format/DateFormat/DateFormatRegression.java @@ -41,7 +41,7 @@ public class DateFormatRegression extends IntlTest { } public void Test4029195() { - + @SuppressWarnings("deprecation") Date today = new Date(); logln("today: " + today); @@ -74,19 +74,20 @@ public class DateFormatRegression extends IntlTest { public void Test4052408() { DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US); + @SuppressWarnings("deprecation") Date date = new Date(97, Calendar.MAY, 3, 8, 55); String str; logln(str = fmt.format(date)); if (!str.equals("5/3/97 8:55 AM")) errln("Fail: Test broken; Want 5/3/97 8:55 AM Got " + str); - Hashtable expected = new Hashtable(); - expected.put(new Integer(DateFormat.MONTH_FIELD), "5"); - expected.put(new Integer(DateFormat.DATE_FIELD), "3"); - expected.put(new Integer(DateFormat.YEAR_FIELD), "97"); - expected.put(new Integer(DateFormat.HOUR1_FIELD), "8"); - expected.put(new Integer(DateFormat.MINUTE_FIELD), "55"); - expected.put(new Integer(DateFormat.AM_PM_FIELD), "AM"); + Map expected = new HashMap<>(); + expected.put(DateFormat.MONTH_FIELD, "5"); + expected.put(DateFormat.DATE_FIELD, "3"); + expected.put(DateFormat.YEAR_FIELD, "97"); + expected.put(DateFormat.HOUR1_FIELD, "8"); + expected.put(DateFormat.MINUTE_FIELD, "55"); + expected.put(DateFormat.AM_PM_FIELD, "AM"); StringBuffer buf = new StringBuffer(); String fieldNames[] = { @@ -120,7 +121,7 @@ public class DateFormatRegression extends IntlTest { ", \"" + str + "\", " + pos.getBeginIndex() + ", " + pos.getEndIndex()); - String exp = (String) expected.get(new Integer(i)); + String exp = expected.get(i); if ((exp == null && str.length() == 0) || str.equals(exp)) logln(" ok"); @@ -135,6 +136,7 @@ public class DateFormatRegression extends IntlTest { /** * Verify the function of the [s|g]et2DigitYearStart() API. */ + @SuppressWarnings("deprecation") public void Test4056591() { try { SimpleDateFormat fmt = new SimpleDateFormat("yyMMdd", Locale.US); @@ -255,6 +257,7 @@ public class DateFormatRegression extends IntlTest { if (!ok) errln("Fail: Lenient not working"); } + @SuppressWarnings("deprecation") public void Test4065240() { Date curDate; DateFormat shortdate, fulldate; @@ -297,6 +300,7 @@ public class DateFormatRegression extends IntlTest { Currently this bug breaks MessageFormat.toPattern */ + @SuppressWarnings("deprecation") public void Test4071441() { DateFormat fmtA = DateFormat.getInstance(); DateFormat fmtB = DateFormat.getInstance(); @@ -488,6 +492,7 @@ public class DateFormatRegression extends IntlTest { public void Test4101483() { SimpleDateFormat sdf = new SimpleDateFormat("z", Locale.US); FieldPosition fp = new FieldPosition(DateFormat.TIMEZONE_FIELD); + @SuppressWarnings("deprecation") Date d= new Date(9234567890L); StringBuffer buf = new StringBuffer(""); logln(sdf.format(d, buf, fp).toString()); @@ -508,6 +513,7 @@ public class DateFormatRegression extends IntlTest { public void Test4103340() { // choose a date that is the FIRST of some month // and some arbitrary time + @SuppressWarnings("deprecation") Date d=new Date(97, 3, 1, 1, 1, 1); SimpleDateFormat df=new SimpleDateFormat("MMMM", Locale.US); @@ -538,6 +544,7 @@ public class DateFormatRegression extends IntlTest { sdf.applyPattern(pattern); logln("pattern: \"" + pattern + "\""); + @SuppressWarnings("deprecation") Object[] DATA = { "time 10:30", new ParsePosition(10), new Date(70, Calendar.JANUARY, 1, 10, 30), "time 10:x", new ParsePosition(0), null, @@ -698,6 +705,7 @@ public class DateFormatRegression extends IntlTest { String pattern = "'TO_DATE('''dd'-'MM'-'yyyy HH:mm:ss''' , ''DD-MM-YYYY HH:MI:SS'')'"; logln("pattern=" + pattern); SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.US); + @SuppressWarnings("deprecation") String result = format.format(new Date(1998-1900, Calendar.JUNE, 30, 13, 30, 0)); if (!result.equals("TO_DATE('30-06-1998 13:30:00' , 'DD-MM-YYYY HH:MI:SS')")) { errln("Fail: result=" + result); @@ -711,6 +719,7 @@ public class DateFormatRegression extends IntlTest { * 'z' at end of date format throws index exception in SimpleDateFormat * CANNOT REPRODUCE THIS BUG ON 1.2FCS */ + @SuppressWarnings("deprecation") public void Test4151706() { SimpleDateFormat fmt = new SimpleDateFormat("EEEE, dd-MMM-yy HH:mm:ss z", Locale.US); @@ -755,6 +764,7 @@ public class DateFormatRegression extends IntlTest { * Confirm that "EST"(GMT-5:00) and "CST"(GMT-6:00) are used in US * as "EST" or "CST", not Australian "EST" and "CST". */ + @SuppressWarnings("deprecation") public void Test4406615() { Locale savedLocale = Locale.getDefault(); TimeZone savedTimeZone = TimeZone.getDefault(); @@ -823,6 +833,7 @@ public class DateFormatRegression extends IntlTest { * greater than "99", are treated as literal years. So "1/2/3456" * becomes 3456 AD. Likewise, "1/2/-3" becomes -3 AD == 2 BC. */ + @SuppressWarnings("deprecation") Object[] DATA = { "02/29/00", new Date(2000-1900, Calendar.FEBRUARY, 29), "01/23/01", new Date(2001-1900, Calendar.JANUARY, 23), @@ -878,6 +889,7 @@ public class DateFormatRegression extends IntlTest { DateFormat fmt = new SimpleDateFormat(pattern, DateFormatSymbols.getInstance(Locale.US)); fmt.getCalendar().setLenient(false); + @SuppressWarnings("deprecation") Date d = new Date(2000-1900, Calendar.FEBRUARY, 29); String s = fmt.format(d); logln(d + " x " + pattern + " => " + s); @@ -957,6 +969,7 @@ public class DateFormatRegression extends IntlTest { } } + @SuppressWarnings("deprecation") public void Test4253490() throws ParseException { SimpleDateFormat fmt = new SimpleDateFormat("S", Locale.US); @@ -1026,6 +1039,7 @@ public class DateFormatRegression extends IntlTest { public void Test4250359() { DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.US); + @SuppressWarnings("deprecation") Date d = new Date(1999-1900, Calendar.DECEMBER, 25, 1, 2, 3); String s = df.format(d); @@ -1052,6 +1066,7 @@ public class DateFormatRegression extends IntlTest { // pick up another time zone when L10N is done to that file. TimeZone.setDefault(TimeZone.getTimeZone("PST")); SimpleDateFormat fmt = new SimpleDateFormat("yy/MM/dd hh:ss zzz", Locale.JAPAN); + @SuppressWarnings("deprecation") String result = fmt.format(new Date(1999, 0, 1)); logln("format()=>" + result); if (!result.endsWith("PST")) { diff --git a/jdk/test/java/text/Format/DateFormat/DateFormatRoundTripTest.java b/jdk/test/java/text/Format/DateFormat/DateFormatRoundTripTest.java index 73d023163f1..9bf3ac3835a 100644 --- a/jdk/test/java/text/Format/DateFormat/DateFormatRoundTripTest.java +++ b/jdk/test/java/text/Format/DateFormat/DateFormatRoundTripTest.java @@ -104,7 +104,7 @@ public class DateFormatRoundTripTest extends IntlTest { String pat = null; Date date = null; - Vector newArgs = new Vector(); + List newArgs = new ArrayList<>(); for (int i=0; i#.###E00", 'm'); - test(new Double(1234), "

    1.234E03"); - test(new Double(0.1234), "

    1.234Em01"); - test(new Double(-1234), "m

    1.234E03"); - test(new Double(-0.1234), "m

    1.234Em01"); + test(1234D, "

    1.234E03"); + test(0.1234, "

    1.234Em01"); + test(-1234D, "m

    1.234E03"); + test(-0.1234, "m

    1.234Em01"); prepareFormatter("

    #.###E00;#.###E00", 'm'); - test(new Double(1234), "

    1.234E03"); - test(new Double(0.1234), "

    1.234Em01"); - test(new Double(-1234), "1.234E03"); - test(new Double(-0.1234), "1.234Em01"); + test(1234D, "

    1.234E03"); + test(0.1234, "

    1.234Em01"); + test(-1234D, "1.234E03"); + test(-0.1234, "1.234Em01"); prepareFormatter("#.###E00;

    #.###E00", 'm'); - test(new Double(1234), "1.234E03"); - test(new Double(0.1234), "1.234Em01"); - test(new Double(-1234), "

    1.234E03"); - test(new Double(-0.1234), "

    1.234Em01"); + test(1234D, "1.234E03"); + test(0.1234, "1.234Em01"); + test(-1234D, "

    1.234E03"); + test(-0.1234, "

    1.234Em01"); prepareFormatter("

    #.###E00;

    -#.###E00", 'm'); - test(new Double(1234), "

    1.234E03"); - test(new Double(0.1234), "

    1.234Em01"); - test(new Double(-1234), "

    m1.234E03"); - test(new Double(-0.1234), "

    m1.234Em01"); + test(1234D, "

    1.234E03"); + test(0.1234, "

    1.234Em01"); + test(-1234D, "

    m1.234E03"); + test(-0.1234, "

    m1.234Em01"); - test(new Double(Double.POSITIVE_INFINITY), "

    \u221e"); - test(new Double(Double.NEGATIVE_INFINITY), "

    m\u221e"); - test(new Double(Double.NaN), "\ufffd"); // without prefix and suffix - test(new Double(0.0), "

    0E00"); - test(new Double(-0.0), "

    m0E00"); // with the minus sign + test(Double.POSITIVE_INFINITY, "

    \u221e"); + test(Double.NEGATIVE_INFINITY, "

    m\u221e"); + test(Double.NaN, "\ufffd"); // without prefix and suffix + test(0.0, "

    0E00"); + test(-0.0, "

    m0E00"); // with the minus sign } static void test_BigDecimal() { @@ -151,19 +151,19 @@ public class Bug4838107 extends IntlTest { dfs = df.getDecimalFormatSymbols(); /* Test with default pattern */ - test(new Long(123456789), "123,456,789"); - test(new Long(-123456789), "-123,456,789"); + test(123456789L, "123,456,789"); + test(-123456789L, "-123,456,789"); - test(new Long(0), "0"); - test(new Long(-0), "0"); + test(0L, "0"); + test(-0L, "0"); /* Specify a pattern and the minus sign. */ prepareFormatter("

    #,###;

    -#,###", 'm'); - test(new Long(123456789), "

    123,456,789"); - test(new Long(-123456789), "

    m123,456,789"); + test(123456789L, "

    123,456,789"); + test(-123456789L, "

    m123,456,789"); - test(new Long(0), "

    0"); - test(new Long(-0), "

    0"); + test(0L, "

    0"); + test(-0L, "

    0"); } static void test_BigInteger() { diff --git a/jdk/test/java/text/Format/NumberFormat/Bug4944439.java b/jdk/test/java/text/Format/NumberFormat/Bug4944439.java index beb4d77c235..0e85a98119d 100644 --- a/jdk/test/java/text/Format/NumberFormat/Bug4944439.java +++ b/jdk/test/java/text/Format/NumberFormat/Bug4944439.java @@ -84,7 +84,7 @@ public class Bug4944439 { } int index = s.indexOf('.'); - Long l = new Long(s.substring(0, index)); + Long l = Long.valueOf(s.substring(0, index)); if (!l.equals(number)) { err = true; System.err.println("Failed: DecimalFormat.parse(" + s + @@ -101,7 +101,7 @@ public class Bug4944439 { number.getClass().getName()); } - Double d = new Double(s); + Double d = Double.valueOf(s); if (!d.equals(number)) { err = true; System.err.println("Failed: DecimalFormat.parse(" + s + diff --git a/jdk/test/java/text/Format/NumberFormat/Bug4990596.java b/jdk/test/java/text/Format/NumberFormat/Bug4990596.java index a8c03b8a035..2b311fb1b5f 100644 --- a/jdk/test/java/text/Format/NumberFormat/Bug4990596.java +++ b/jdk/test/java/text/Format/NumberFormat/Bug4990596.java @@ -35,6 +35,7 @@ public class Bug4990596 { new DecimalFormat().format(new MutableInteger(0)); } + @SuppressWarnings("serial") public static class MutableInteger extends Number { public int value; diff --git a/jdk/test/java/text/Format/NumberFormat/Bug6278616.java b/jdk/test/java/text/Format/NumberFormat/Bug6278616.java index 9066a7da02e..b1684b4d177 100644 --- a/jdk/test/java/text/Format/NumberFormat/Bug6278616.java +++ b/jdk/test/java/text/Format/NumberFormat/Bug6278616.java @@ -47,7 +47,7 @@ public class Bug6278616 { NumberFormat nf = NumberFormat.getInstance(); for (int j = 0; j < ints.length; j++) { - String s_i = nf.format(new Integer(ints[j])); + String s_i = nf.format(ints[j]); String s_ai = nf.format(new AtomicInteger(ints[j])); if (!s_i.equals(s_ai)) { throw new RuntimeException("format(AtomicInteger " + s_ai + @@ -57,7 +57,7 @@ public class Bug6278616 { } for (int j = 0; j < longs.length; j++) { - String s_l = nf.format(new Long(longs[j])); + String s_l = nf.format(longs[j]); String s_al = nf.format(new AtomicLong(longs[j])); if (!s_l.equals(s_al)) { throw new RuntimeException("format(AtomicLong " + s_al + diff --git a/jdk/test/java/text/Format/NumberFormat/NumberRegression.java b/jdk/test/java/text/Format/NumberFormat/NumberRegression.java index b194d270a5c..48147f35d2a 100644 --- a/jdk/test/java/text/Format/NumberFormat/NumberRegression.java +++ b/jdk/test/java/text/Format/NumberFormat/NumberRegression.java @@ -289,7 +289,7 @@ public class NumberRegression extends IntlTest { DecimalFormat df = new DecimalFormat(); Double d = (Double)df.parse("123.55456", pos=new ParsePosition(0)); if (!d.toString().equals("123.55456")) { - errln("Result -> " + d.doubleValue()); + errln("Result -> " + d); } Locale.setDefault(savedLocale); } @@ -395,11 +395,11 @@ public class NumberRegression extends IntlTest { Locale.setDefault(Locale.US); DecimalFormat df = new DecimalFormat(); String str = "0.1234"; - Double d1 = new Double(str); + Double d1 = 0.1234; Double d2 = (Double) df.parse(str, new ParsePosition(0)); logln(d1.toString()); if (d2.doubleValue() != d1.doubleValue()) - errln("Bug 4095713 test failed, new double value : " + d2.doubleValue()); + errln("Bug 4095713 test failed, new double value : " + d2); Locale.setDefault(savedLocale); } @@ -870,7 +870,7 @@ public class NumberRegression extends IntlTest { DecimalFormat fmt = new DecimalFormat("#,##0.00"); StringBuffer formatted = new StringBuffer(); FieldPosition field = new FieldPosition(0); - Double num = new Double(1234.5); + Double num = 1234.5; fmt.format(num, formatted, field); if (field.getBeginIndex() != 0 && field.getEndIndex() != 5) errln("Format 1234.5 failed. Begin index: " + field.getBeginIndex() + " End index: " + field.getEndIndex()); @@ -1416,7 +1416,7 @@ public class NumberRegression extends IntlTest { DecimalFormat fmt = new DecimalFormat("#", DecimalFormatSymbols.getInstance(Locale.US)); for (int i=0; i 0 != DATA[i] > 0) { errln("\"" + str + "\" parse(x " + fmt.getMultiplier() + ") => " + n); @@ -1637,15 +1637,15 @@ public class NumberRegression extends IntlTest { */ public void Test4217661() { Object[] DATA = { - new Double(0.001), "0", - new Double(1.001), "1", - new Double(0.006), "0.01", - new Double(1.006), "1.01", + 0.001, "0", + 1.001, "1", + 0.006, "0.01", + 1.006, "1.01", }; NumberFormat fmt = NumberFormat.getInstance(Locale.US); fmt.setMaximumFractionDigits(2); for (int i=0; i contents = parser.parse(new BufferedReader( new FileReader(file))); - Vector test = (Vector)contents.get("tests"); + List test = (List)contents.get("tests"); for (int counter = 0; counter < test.size(); counter++) { logln("creating: " + (counter / 2)); AttributedCharacterIterator iterator = - create((Hashtable)test.get(counter)); + create((Map)test.get(counter)); logln("verifying: " + (counter / 2)); - verify(iterator, (Hashtable)test.get(++counter)); + verify(iterator, (Map)test.get(++counter)); } } catch (IOException ioe) { errln("Error reading: " + ioe); } } - public void verify(AttributedCharacterIterator iterator,Hashtable table) { + @SuppressWarnings("unchecked") + public void verify(AttributedCharacterIterator iterator,Map table) { int length = Integer.parseInt((String)table.get("length")); // Verify the text @@ -185,10 +186,10 @@ public class FormatIteratorTest extends IntlTest { for (int counter = 0; counter < length; counter++) { iterator.setIndex(counter); if (!verifyAttributes(iterator.getAttributes().keySet(), - makeAttributes((Vector)table.get(Integer. + makeAttributes((List)table.get(Integer. toString(counter))))) { errln("Attributes don't match at " + counter + " expecting " + - makeAttributes((Vector)table.get(Integer.toString + makeAttributes((List)table.get(Integer.toString (counter))) + " got " + iterator.getAttributes().keySet()); } @@ -196,10 +197,10 @@ public class FormatIteratorTest extends IntlTest { for (int counter = length - 1; counter >= 0; counter--) { iterator.setIndex(counter); if (!verifyAttributes(iterator.getAttributes().keySet(), - makeAttributes((Vector)table.get(Integer. + makeAttributes((List)table.get(Integer. toString(counter))))) { errln("Attributes don't match at " + counter + " expecting " + - makeAttributes((Vector)table.get(Integer.toString + makeAttributes((List)table.get(Integer.toString (counter))) + " got " + iterator.getAttributes().keySet()); } @@ -207,31 +208,33 @@ public class FormatIteratorTest extends IntlTest { verifyLimits(iterator, table); text = escapeIfNecessary((String)table.get("text")); - Vector fps = (Vector)table.get("fieldPositions"); + List fps = (List)table.get("fieldPositions"); if (fps != null) { for (int counter = 0; counter < fps.size(); counter++) { - verifyFieldPosition(counter, (Hashtable)fps.get(counter)); + verifyFieldPosition(counter,(Map)fps.get(counter)); } } } + @SuppressWarnings("unchecked") private void verifyLimits(AttributedCharacterIterator iterator, - Hashtable table) { - Vector limits = (Vector)table.get("limits"); + Map table) { + List limits = (List)table.get("limits"); if (limits != null) { for (int counter = 0; counter < limits.size(); counter++) { - verifyLimit(iterator, (Hashtable)limits.get(counter)); + verifyLimit(iterator, (Map)limits.get(counter)); } } } private void verifyLimit(AttributedCharacterIterator iterator, - Hashtable table) { + Map table) { int begin = Integer.parseInt((String)table.get("begin")); int end = Integer.parseInt((String)table.get("end")); - Set attrs = makeAttributes((Vector)table.get("attributes")); + @SuppressWarnings("unchecked") + Set attrs = makeAttributes((List)table.get("attributes")); String begin2S = (String)table.get("begin2"); int begin2 = (begin2S != null) ? Integer.parseInt(begin2S) : begin; String end2S = (String)table.get("end2"); @@ -262,9 +265,9 @@ public class FormatIteratorTest extends IntlTest { } } - private boolean verifyAttributes(Set a, Set b) { - boolean aEmpty = (a.size() == 0); - boolean bEmpty = (b.size() == 0); + private boolean verifyAttributes(Set a, Set b) { + boolean aEmpty = a.isEmpty(); + boolean bEmpty = b.isEmpty(); if (aEmpty && bEmpty) { return true; @@ -284,14 +287,14 @@ public class FormatIteratorTest extends IntlTest { return buffer.toString(); } - private void verifyFieldPosition(int index, Hashtable table) { + private void verifyFieldPosition(int index, Map table) { Object o = table.get("field"); int begin = Integer.parseInt((String)table.get("begin")); int end = Integer.parseInt((String)table.get("end")); if (o != null) { FieldPosition fp = new FieldPosition(((Integer) - lookupField((String)o)).intValue()); + lookupField((String)o))); verifyFieldPosition(fp, begin, end, index); } @@ -322,11 +325,11 @@ public class FormatIteratorTest extends IntlTest { } } - public AttributedCharacterIterator create(Hashtable table) { + public AttributedCharacterIterator create(Map table) { format = (Format)createInstance((String)table.get("class"), - ((Vector)table.get("args")).toArray()); + ((List)table.get("args")).toArray()); value = createInstance((String)table.get("valueClass"), - ((Vector)table.get("valueArgs")).toArray()); + ((List)table.get("valueArgs")).toArray()); logln("Created format: " + format + " value " + value); AttributedCharacterIterator aci = format. @@ -343,11 +346,12 @@ public class FormatIteratorTest extends IntlTest { private Object createInstance(String className, Object[] args) { if (className.equals("java.lang.reflect.Array")) { for (int counter = 0; counter < args.length; counter++) { - if (args[counter] instanceof Vector) { - Vector v = (Vector)args[counter]; + if (args[counter] instanceof List) { + @SuppressWarnings("unchecked") + List v = (List)args[counter]; args[counter] = createInstance((String)v.get(0), - ((Vector)v.get(1)).toArray()); + ((List)v.get(1)).toArray()); } } return args; @@ -361,9 +365,9 @@ public class FormatIteratorTest extends IntlTest { } else if (className.equals("java.util.concurrent.atomic.AtomicLong")) { return new AtomicLong(Long.valueOf((String)args[0])); } else { - Class klass = lookupClass(className); - Constructor cons = klass.getConstructor( - new Class[] { String.class }); + Class klass = lookupClass(className); + Constructor cons = klass.getConstructor( + new Class[] { String.class }); Object value = cons.newInstance(args); return value; @@ -374,20 +378,20 @@ public class FormatIteratorTest extends IntlTest { } } - private Class lookupClass(String name) throws ClassNotFoundException { + private Class lookupClass(String name) throws ClassNotFoundException { try { - Class klass = Class.forName(name); + Class klass = Class.forName(name); return klass; } catch (ClassNotFoundException e1) {} try { - Class klass = Class.forName("java.lang." + name); + Class klass = Class.forName("java.lang." + name); return klass; } catch (ClassNotFoundException e1) {} - Class klass = Class.forName("java.text." + name); + Class klass = Class.forName("java.text." + name); return klass; } @@ -397,7 +401,7 @@ public class FormatIteratorTest extends IntlTest { try { int dotIndex = name.indexOf('.'); - Class klass = lookupClass(name.substring(0, dotIndex)); + Class klass = lookupClass(name.substring(0, dotIndex)); String fieldName = name.substring(dotIndex + 1); Field[] fields = klass.getFields(); @@ -429,8 +433,8 @@ public class FormatIteratorTest extends IntlTest { return string; } - public Set makeAttributes(Vector names) { - HashSet set = new HashSet(Math.max(1, names.size())); + public Set makeAttributes(List names) { + Set set = new HashSet<>(Math.max(1, names.size())); for (int counter = 0; counter < names.size(); counter++) { set.add(makeAttribute((String)names.get(counter))); diff --git a/jdk/test/java/text/Format/common/PParser.java b/jdk/test/java/text/Format/common/PParser.java index 6ada76b1059..eb7ccd11315 100644 --- a/jdk/test/java/text/Format/common/PParser.java +++ b/jdk/test/java/text/Format/common/PParser.java @@ -58,7 +58,7 @@ public class PParser { public PParser() { } - public Hashtable parse(Reader r) throws IOException { + public Map parse(Reader r) throws IOException { this.reader = r; bufferedToken = false; lineNumber = 0; @@ -91,23 +91,23 @@ public class PParser { } protected Object parseArray() throws IOException { - Vector array = new Vector(); - int token; + List array = new ArrayList<>(); + int token; while ((token = getToken()) != CLOSE_ARRAY) { if (token == MORE) { token = getToken(); } if (token != CLOSE_ARRAY) { - array.addElement(parseValue(token)); + array.add(parseValue(token)); } } return array; } - protected Hashtable parsePair() throws IOException { - Hashtable ht = new Hashtable(11); - int token; + protected Map parsePair() throws IOException { + Map ht = new HashMap<>(11); + int token; while ((token = getToken()) != CLOSE_PAIR) { if (token != STRING) { @@ -133,11 +133,12 @@ public class PParser { } protected int getToken() throws IOException { - int token = getToken(false, false); + int token = getToken(false, false); return token; } + @SuppressWarnings("fallthrough") protected int getToken(boolean wantsWS, boolean inString) throws IOException { if (bufferedToken) { @@ -225,31 +226,26 @@ public class PParser { throw new RuntimeException(errorString + " at line " + lineNumber + " column " + column); } + @SuppressWarnings("unchecked") public static void dump(Object o) { if (o instanceof String) { System.out.print(o); - } else if(o instanceof Vector) { - Enumeration e = ((Vector)o).elements(); - + } else if(o instanceof List) { dump(" ("); - while (e.hasMoreElements()) { - dump(e.nextElement()); + ((List)o).forEach((l) -> { + dump(l); dump(" -- "); - } + }); dump(" )"); } else { - Hashtable ht = (Hashtable)o; - Enumeration e = ht.keys(); - + Map ht = (Map)o; dump(" {"); - while (e.hasMoreElements()) { - Object key = e.nextElement(); - - dump(key); + ht.keySet().forEach(l -> { + dump(l); dump(" = "); - dump(ht.get(key)); + dump(ht.get(l)); dump(";"); - } + }); dump(" }"); } } @@ -259,9 +255,9 @@ public class PParser { System.out.println("need filename"); } else { try { - FileReader fr = new FileReader(args[0]); - PParser parser = new PParser(); - Hashtable ht = parser.parse(fr); + FileReader fr = new FileReader(args[0]); + PParser parser = new PParser(); + Map ht = parser.parse(fr); dump(ht); System.out.println(); diff --git a/jdk/test/java/util/logging/Level/CustomLevel.java b/jdk/test/java/util/logging/Level/CustomLevel.java index a3c452a1e09..8045831d33c 100644 --- a/jdk/test/java/util/logging/Level/CustomLevel.java +++ b/jdk/test/java/util/logging/Level/CustomLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, 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 @@ -22,12 +22,20 @@ */ import java.io.*; +import java.lang.ref.Reference; +import java.lang.ref.ReferenceQueue; +import java.lang.ref.WeakReference; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; import java.util.*; import java.util.logging.*; /* * @test - * @bug 8026027 + * @bug 8026027 6543126 * @summary Test Level.parse to look up custom levels by name and its * localized name * @@ -41,23 +49,168 @@ public class CustomLevel extends Level { private static final List levels = new ArrayList<>(); private static final String RB_NAME = "myresource"; + private static final String OTHERRB_NAME = "myresource2"; + + private static class CustomLevelReference extends WeakReference { + final String name; + final int value; + final String resourceBundleName; + public CustomLevelReference(Level level, ReferenceQueue queue) { + super(level, queue); + name = level.getName(); + value = level.intValue(); + resourceBundleName = level.getResourceBundleName(); + } + + @Override + public String toString() { + return "CustomLevelReference(\"" + name + "\", " + value + ", \"" + + resourceBundleName + "\")"; + } + + } + public static void main(String[] args) throws Exception { setupCustomLevels(); + setUpCustomLevelsOtherLoader(); // Level.parse will return the custom Level instance - ResourceBundle rb = ResourceBundle.getBundle(RB_NAME); for (Level level : levels) { + final ResourceBundle rb = getResourceBundle(level); String name = level.getName(); - if (!name.equals("WARNING") && !name.equals("INFO")) { + Level l = Level.parse(name); + if (!name.equals("WARNING") && !name.equals("INFO") + && !name.equals("SEVERE")) { // custom level whose name doesn't conflict with any standard one - checkCustomLevel(Level.parse(name), level); + checkCustomLevel(l, level); + } else if (l != Level.WARNING && l != Level.INFO && l != Level.SEVERE + || !name.equals(l.getName())) { + throw new RuntimeException("Unexpected level " + formatLevel(l)); } + System.out.println("Level.parse found expected level: " + + formatLevel(l)); String localizedName = rb.getString(level.getName()); - Level l = Level.parse(localizedName); + l = Level.parse(localizedName); if (l != level) { - throw new RuntimeException("Unexpected level " + l + " " + l.getClass()); + throw new RuntimeException("Unexpected level " + l + " " + + l.getClass() + " for " + localizedName + + " in " + rb.getBaseBundleName()); } } + + final long otherLevelCount = levels.stream() + .filter(CustomLevel::isCustomLoader) + .count(); + + // Now verify that custom level instances are correctly + // garbage collected when no longer referenced + ReferenceQueue queue = new ReferenceQueue<>(); + List refs = new ArrayList<>(); + List customRefs = new ArrayList<>(); + int otherLevels = 0; + while (!levels.isEmpty()) { + Level l = levels.stream().findAny().get(); + boolean isCustomLoader = isCustomLoader(l); + if (isCustomLoader) otherLevels++; + + CustomLevelReference ref = new CustomLevelReference(l, queue); + if (isCustomLoader) { + customRefs.add(ref); + } else { + refs.add(ref); + } + + // remove strong references to l + levels.remove(l); + l = null; + + // Run gc and wait for garbage collection + if (otherLevels == otherLevelCount) { + if (customRefs.size() != otherLevelCount) { + throw new RuntimeException("Test bug: customRefs.size() != " + + otherLevelCount); + } + waitForGC(customRefs, queue); + } + } + if (otherLevelCount != otherLevels || otherLevelCount == 0) { + throw new RuntimeException("Test bug: " + + "no or wrong count of levels loaded from custom loader"); + } + if (!customRefs.isEmpty()) { + throw new RuntimeException( + "Test bug: customRefs.size() should be empty!"); + } + while (!refs.isEmpty()) { + final Reference ref = refs.remove(0); + if (ref.get() == null) { + throw new RuntimeException("Unexpected garbage collection for " + + ref); + } + } + } + + private static void waitForGC(List customRefs, + ReferenceQueue queue) + throws InterruptedException + { + while (!customRefs.isEmpty()) { + Reference ref2; + do { + System.gc(); + Thread.sleep(100); + } while ((ref2 = queue.poll()) == null); + + // Check garbage collected reference + if (!customRefs.contains(ref2)) { + throw new RuntimeException("Unexpected reference: " + ref2); + } + CustomLevelReference ref = customRefs.remove(customRefs.indexOf(ref2)); + System.out.println(ref2 + " garbage collected"); + final String name = ref.name; + Level l; + try { + l = Level.parse(name); + if (!name.equals("SEVERE") + && !name.equals("INFO") + || !name.equals(l.getName())) { + throw new RuntimeException("Unexpected level " + + formatLevel(l)); + } else { + if (l == Level.WARNING || l == Level.INFO + || l == Level.SEVERE) { + System.out.println("Level.parse found expected level: " + + formatLevel(l)); + } else { + throw new RuntimeException("Unexpected level " + + formatLevel(l)); + } + } + } catch (IllegalArgumentException iae) { + if (!name.equals("WARNING") + && !name.equals("INFO") + && !name.equals("SEVERE")) { + System.out.println("Level.parse fired expected exception: " + + iae); + } else { + throw iae; + } + } + } + } + + private static boolean isCustomLoader(Level level) { + final ClassLoader cl = level.getClass().getClassLoader(); + return cl != null + && cl != ClassLoader.getPlatformClassLoader() + && cl != ClassLoader.getSystemClassLoader(); + } + + static ResourceBundle getResourceBundle(Level level) { + return isCustomLoader(level) + ? ResourceBundle.getBundle(OTHERRB_NAME, Locale.getDefault(), + level.getClass().getClassLoader()) + : ResourceBundle.getBundle(RB_NAME); } private static void setupCustomLevels() throws IOException { @@ -67,22 +220,53 @@ public class CustomLevel extends Level { levels.add(new CustomLevel("WARNING", 1010, RB_NAME)); levels.add(new CustomLevel("INFO", 1000, RB_NAME)); } + + static void setUpCustomLevelsOtherLoader() + throws MalformedURLException, + ClassNotFoundException, NoSuchMethodException, + IllegalAccessException, InvocationTargetException + { + final String classes = System.getProperty("test.classes", + "build/classes"); + final String sources = System.getProperty("test.src", + "src"); + final URL curl = new File(classes).toURI().toURL(); + final URL surl = new File(sources).toURI().toURL(); + URLClassLoader loader = new URLClassLoader(new URL[] {curl, surl}, + ClassLoader.getPlatformClassLoader()); + Class customLevelClass = Class.forName("CustomLevel", false, loader); + Method m = customLevelClass.getMethod("setUpCustomLevelsOtherLoader", + List.class); + m.invoke(null, levels); + } + + public static void setUpCustomLevelsOtherLoader(List levels) { + levels.add(new CustomLevel("OTHEREMERGENCY", 1091, OTHERRB_NAME)); + levels.add(new CustomLevel("OTHERALERT", 1061, OTHERRB_NAME)); + levels.add(new CustomLevel("OTHERCRITICAL", 1031, OTHERRB_NAME)); + levels.add(new CustomLevel("SEVERE", 1011, OTHERRB_NAME)); + levels.add(new CustomLevel("INFO", 1000, OTHERRB_NAME)); + } + static void checkCustomLevel(Level level, Level expected) { // Level value must be the same if (!level.equals(expected)) { - throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + throw new RuntimeException(formatLevel(level) + " != " + + formatLevel(expected)); } if (!level.getName().equals(expected.getName())) { - throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + throw new RuntimeException(formatLevel(level) + " != " + + formatLevel(expected)); } // Level.parse is expected to return the custom Level if (level != expected) { - throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + throw new RuntimeException(formatLevel(level) + " != " + + formatLevel(expected)); } - ResourceBundle rb = ResourceBundle.getBundle(RB_NAME); + final ResourceBundle rb = getResourceBundle(level); String name = rb.getString(level.getName()); if (!level.getLocalizedName().equals(name)) { // must have the same localized name diff --git a/jdk/test/java/util/logging/Level/myresource2.properties b/jdk/test/java/util/logging/Level/myresource2.properties new file mode 100644 index 00000000000..b7e68d4673a --- /dev/null +++ b/jdk/test/java/util/logging/Level/myresource2.properties @@ -0,0 +1,5 @@ +OTHEREMERGENCY=localized.otheremergency +OTHERALERT=localized.otheralert +OTHERCRITICAL=localized.othercritical +SEVERE=localized.severe +INFO=localized.info.2 diff --git a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java index 259b09c8e17..cfca351e1cb 100644 --- a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java +++ b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -30,6 +30,7 @@ * @key intermittent * @summary Datagram Transport Layer Security (DTLS) * @modules java.base/sun.security.util + * jdk.crypto.ec * @build DTLSOverDatagram * @run main/othervm CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA * @run main/othervm CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSBufferOverflowUnderflowTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSBufferOverflowUnderflowTest.java index 82d66a9e538..8ebbc44e461 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSBufferOverflowUnderflowTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSBufferOverflowUnderflowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS buffer overflow and underflow status when dealing with * application data. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.base/sun.security.util + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSBufferOverflowUnderflowTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSDataExchangeTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSDataExchangeTest.java index 4a2b5ad08e7..94f3a1ba170 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSDataExchangeTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSDataExchangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS application data exchange using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSEnginesClosureTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSEnginesClosureTest.java index d9441e48233..fc987a3e5c1 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSEnginesClosureTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSEnginesClosureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines closing using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeTest.java index 6841053869c..aaf155d5444 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines handshake using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSHandshakeTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeWithReplicatedPacketsTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeWithReplicatedPacketsTest.java index c345e82be94..b3b26bc75cc 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeWithReplicatedPacketsTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeWithReplicatedPacketsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines handshake using each of the supported * cipher suites with replicated packets check. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSHandshakeWithReplicatedPacketsTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java index 1e0c6b6e629..9bc2b10a725 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS incorrect app data packages unwrapping. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSIncorrectAppDataTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSMFLNTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSMFLNTest.java index d9e038cc9c2..e44246fc3a6 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSMFLNTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSMFLNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with different maximum fragment length. Testing of * MFLN extension. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSMFLNTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSNotEnabledRC4Test.java b/jdk/test/javax/net/ssl/DTLS/DTLSNotEnabledRC4Test.java index fa26b5261ae..3b5bee35e95 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSNotEnabledRC4Test.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSNotEnabledRC4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,13 @@ * @bug 8043758 * @summary Testing DTLS engines do not enable RC4 ciphers by default. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS DTLSNotEnabledRC4Test */ diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeTest.java index 2952dfcbdeb..2e1c9d56cc4 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines re-handshaking using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java index 55cb62294bb..ff7bac90ea3 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,13 @@ * is taken randomly from the supporetd ciphers list. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * DTLSRehandshakeWithCipherChangeTest */ diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithDataExTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithDataExTest.java index de0f500e3de..dff5a8a0c1f 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithDataExTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithDataExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with application data exchange before and after * re-handshake and closing of the engines. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java index b9291a189e4..7eb019d95df 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * data exchange. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS * -Dtest.mode=norm DTLSSequenceNumberTest * @run main/othervm -Dtest.security.protocol=DTLS diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSUnsupportedCiphersTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSUnsupportedCiphersTest.java index 15569a7dd9d..e7c51741e69 100644 --- a/jdk/test/javax/net/ssl/DTLS/DTLSUnsupportedCiphersTest.java +++ b/jdk/test/javax/net/ssl/DTLS/DTLSUnsupportedCiphersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,13 @@ * @summary Testing that try to enable unsupported ciphers * causes IllegalArgumentException. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLS DTLSUnsupportedCiphersTest */ diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java index 96d762fb398..bcbdd753389 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS buffer overflow and underflow status when dealing with * application data. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10BufferOverflowUnderflowTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10DataExchangeTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10DataExchangeTest.java index 66acc50d68b..0a73dbf61b9 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10DataExchangeTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10DataExchangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS application data exchange using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10DataExchangeTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10EnginesClosureTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10EnginesClosureTest.java index db8b660ce4a..c84c364af48 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10EnginesClosureTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10EnginesClosureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines closing using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10EnginesClosureTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeTest.java index 79976dfb9f9..9ed88f685af 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines handshake using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10HandshakeTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeWithReplicatedPacketsTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeWithReplicatedPacketsTest.java index 14bf25b94fd..92b5dab1880 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeWithReplicatedPacketsTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeWithReplicatedPacketsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines handshake using each of the supported * cipher suites with replicated packets check. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10HandshakeWithReplicatedPacketsTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10IncorrectAppDataTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10IncorrectAppDataTest.java index 6e3035f6aec..43567e5c0d9 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10IncorrectAppDataTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10IncorrectAppDataTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS incorrect app data packages unwrapping. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSIncorrectAppDataTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10MFLNTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10MFLNTest.java index 0fa34feb850..61a38889c06 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10MFLNTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10MFLNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with different maximum fragment length. Testing of * MFLN extension. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10MFLNTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10NotEnabledRC4Test.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10NotEnabledRC4Test.java index bc72a159d8c..a4d4f4394f3 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10NotEnabledRC4Test.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10NotEnabledRC4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,13 @@ * @bug 8043758 * @summary Testing DTLS engines do not enable RC4 ciphers by default. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 DTLSv10NotEnabledRC4Test */ diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeTest.java index be2c990e7cf..4af0fc0e0af 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing DTLS engines re-handshaking using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10RehandshakeTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java index 0fedfea2d05..7677baa76c5 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,13 @@ * is taken randomly from the supporetd ciphers list. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * DTLSv10RehandshakeWithCipherChangeTest */ diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithDataExTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithDataExTest.java index 24a4d81e4a4..560e924d322 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithDataExTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithDataExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with application data exchange before and after * re-handshake and closing of the engines. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10RehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10SequenceNumberTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10SequenceNumberTest.java index 7a1fa07d7c9..edf14364002 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10SequenceNumberTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10SequenceNumberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * data exchange. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * -Dtest.mode=norm DTLSv10SequenceNumberTest * @run main/othervm -Dtest.security.protocol=DTLSv1.0 diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10UnsupportedCiphersTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10UnsupportedCiphersTest.java index 0e656eaad90..2d10634c71e 100644 --- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10UnsupportedCiphersTest.java +++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10UnsupportedCiphersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,13 @@ * @summary Testing that try to enable unsupported ciphers * causes IllegalArgumentException. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=DTLSv1.0 * DTLSv10UnsupportedCiphersTest */ diff --git a/jdk/test/javax/net/ssl/TLS/TLSClientPropertyTest.java b/jdk/test/javax/net/ssl/TLS/TLSClientPropertyTest.java index 8d7c1b2a716..0f51afd3959 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSClientPropertyTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSClientPropertyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, 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 @@ -21,18 +21,19 @@ * questions. */ -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.util.Arrays; -import java.util.List; -import javax.net.ssl.SSLContext; - /* * @test * @bug 8049432 8069038 * @summary New tests for TLS property jdk.tls.client.protocols * @summary javax/net/ssl/TLS/TLSClientPropertyTest.java needs to be * updated for JDK-8061210 + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm TLSClientPropertyTest NoProperty * @run main/othervm TLSClientPropertyTest SSLv3 * @run main/othervm TLSClientPropertyTest TLSv1 @@ -41,6 +42,12 @@ import javax.net.ssl.SSLContext; * @run main/othervm TLSClientPropertyTest WrongProperty */ +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.List; +import javax.net.ssl.SSLContext; + /** * Sets the property jdk.tls.client.protocols to one of this protocols: * SSLv3,TLSv1,TLSv1.1,TLSv1.2 and TLSV(invalid) or removes this diff --git a/jdk/test/javax/net/ssl/TLS/TLSDataExchangeTest.java b/jdk/test/javax/net/ssl/TLS/TLSDataExchangeTest.java index 1d3e49efc42..8a2957b2f5d 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSDataExchangeTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSDataExchangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS application data exchange using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSDataExchangeTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSEnginesClosureTest.java b/jdk/test/javax/net/ssl/TLS/TLSEnginesClosureTest.java index 4c9dea4a427..65d8d6c4990 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSEnginesClosureTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSEnginesClosureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines closing using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSEnginesClosureTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSHandshakeTest.java b/jdk/test/javax/net/ssl/TLS/TLSHandshakeTest.java index 0ae33347a2e..9b09fe2a928 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSHandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines handshake using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSHandshakeTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSMFLNTest.java b/jdk/test/javax/net/ssl/TLS/TLSMFLNTest.java index cde859e891b..edd8898f4a5 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSMFLNTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSMFLNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with different maximum fragment length. Testing of * MFLN extension. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSMFLNTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSNotEnabledRC4Test.java b/jdk/test/javax/net/ssl/TLS/TLSNotEnabledRC4Test.java index 37dd90efc1a..38b7116f71c 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSNotEnabledRC4Test.java +++ b/jdk/test/javax/net/ssl/TLS/TLSNotEnabledRC4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,13 @@ * @bug 8085979 * @summary Testing TLS engines do not enable RC4 ciphers by default. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS TLSNotEnabledRC4Test */ diff --git a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeTest.java b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeTest.java index 09d93ccb761..36be822b53e 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines re-handshaking using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSRehandshakeTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java index c16b673dbed..cc8fc79d994 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,13 @@ * is taken randomly from the supporetd ciphers list. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS TLSRehandshakeWithCipherChangeTest */ diff --git a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithDataExTest.java b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithDataExTest.java index a84cd914e72..0b277b2432a 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithDataExTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithDataExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with application data exchange before and after * re-handshake and closing of the engines. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=norm_sni TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLS -Dtest.mode=krb TLSRehandshakeWithDataExTest diff --git a/jdk/test/javax/net/ssl/TLS/TLSUnsupportedCiphersTest.java b/jdk/test/javax/net/ssl/TLS/TLSUnsupportedCiphersTest.java index 300ab9b84e6..843f9678574 100644 --- a/jdk/test/javax/net/ssl/TLS/TLSUnsupportedCiphersTest.java +++ b/jdk/test/javax/net/ssl/TLS/TLSUnsupportedCiphersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,13 @@ * @summary Testing that try to enable unsupported ciphers * causes IllegalArgumentException. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLS TLSUnsupportedCiphersTest */ diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSDataExchangeTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSDataExchangeTest.java index 47748467a09..4e357e5755d 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSDataExchangeTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSDataExchangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS application data exchange using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSDataExchangeTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSEnginesClosureTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSEnginesClosureTest.java index fa875962256..e0418c495d0 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSEnginesClosureTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSEnginesClosureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines closing using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSEnginesClosureTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSHandshakeTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSHandshakeTest.java index f48666a40eb..bddcc189a39 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSHandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines handshake using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSHandshakeTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSMFLNTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSMFLNTest.java index 6df9debe003..8b213eb1e2a 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSMFLNTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSMFLNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with different maximum fragment length. Testing of * MFLN extension. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSMFLNTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSNotEnabledRC4Test.java b/jdk/test/javax/net/ssl/TLSv1/TLSNotEnabledRC4Test.java index d00b09dd382..1a8f544ab84 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSNotEnabledRC4Test.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSNotEnabledRC4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,13 @@ * @bug 8085979 * @summary Testing TLS engines do not enable RC4 ciphers by default. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 TLSNotEnabledRC4Test */ diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeTest.java index acb69f0ad61..8208b6bf255 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines re-handshaking using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSRehandshakeTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java index cf634faabb6..3eb59d07cfe 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,13 @@ * is taken randomly from the supporetd ciphers list. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 TLSRehandshakeWithCipherChangeTest */ diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithDataExTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithDataExTest.java index 601ed311a40..17cce20c001 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithDataExTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithDataExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with application data exchange before and after * re-handshake and closing of the engines. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=norm_sni TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLSv1 -Dtest.mode=krb TLSRehandshakeWithDataExTest diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSUnsupportedCiphersTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSUnsupportedCiphersTest.java index 7cea3e5c2bd..357b9e4dab8 100644 --- a/jdk/test/javax/net/ssl/TLSv1/TLSUnsupportedCiphersTest.java +++ b/jdk/test/javax/net/ssl/TLSv1/TLSUnsupportedCiphersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,13 @@ * @summary Testing that try to enable unsupported ciphers * causes IllegalArgumentException. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1 TLSUnsupportedCiphersTest */ diff --git a/jdk/test/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java b/jdk/test/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java index 97383271dae..3e86849470c 100644 --- a/jdk/test/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java +++ b/jdk/test/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -33,14 +33,33 @@ * @bug 4873188 * @summary Support TLS 1.1 * @run main/othervm EmptyCertificateAuthorities + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @author Xuelei Fan */ -import java.io.*; -import java.net.*; -import java.security.*; -import java.security.cert.*; -import javax.net.ssl.*; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.security.KeyStore; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; public class EmptyCertificateAuthorities { diff --git a/jdk/test/javax/net/ssl/TLSv11/ExportableBlockCipher.java b/jdk/test/javax/net/ssl/TLSv11/ExportableBlockCipher.java index 1a2c1801ea6..a8f944084a6 100644 --- a/jdk/test/javax/net/ssl/TLSv11/ExportableBlockCipher.java +++ b/jdk/test/javax/net/ssl/TLSv11/ExportableBlockCipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -33,12 +33,25 @@ * @bug 4873188 * @summary Support TLS 1.1 * @run main/othervm ExportableBlockCipher + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @author Xuelei Fan */ -import java.io.*; -import java.net.*; -import javax.net.ssl.*; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; public class ExportableBlockCipher { diff --git a/jdk/test/javax/net/ssl/TLSv11/ExportableStreamCipher.java b/jdk/test/javax/net/ssl/TLSv11/ExportableStreamCipher.java index 6686c4c3837..47939ecdd76 100644 --- a/jdk/test/javax/net/ssl/TLSv11/ExportableStreamCipher.java +++ b/jdk/test/javax/net/ssl/TLSv11/ExportableStreamCipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -32,13 +32,26 @@ * @test * @bug 4873188 * @summary Support TLS 1.1 + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm ExportableStreamCipher * @author Xuelei Fan */ -import java.io.*; -import java.net.*; -import javax.net.ssl.*; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; public class ExportableStreamCipher { diff --git a/jdk/test/javax/net/ssl/TLSv11/GenericBlockCipher.java b/jdk/test/javax/net/ssl/TLSv11/GenericBlockCipher.java index 5f851843ffb..067da2ab322 100644 --- a/jdk/test/javax/net/ssl/TLSv11/GenericBlockCipher.java +++ b/jdk/test/javax/net/ssl/TLSv11/GenericBlockCipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -27,6 +27,13 @@ * @test * @bug 4873188 * @summary Support TLS 1.1 + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm GenericBlockCipher * * SunJSSE does not support dynamic system properties, no way to re-use @@ -35,9 +42,12 @@ * @author Xuelei Fan */ -import java.io.*; -import java.net.*; -import javax.net.ssl.*; +import java.io.InputStream; +import java.io.OutputStream; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; public class GenericBlockCipher { diff --git a/jdk/test/javax/net/ssl/TLSv11/GenericStreamCipher.java b/jdk/test/javax/net/ssl/TLSv11/GenericStreamCipher.java index 38dbaf2a9f5..e84f0149982 100644 --- a/jdk/test/javax/net/ssl/TLSv11/GenericStreamCipher.java +++ b/jdk/test/javax/net/ssl/TLSv11/GenericStreamCipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -27,6 +27,13 @@ * @test * @bug 4873188 * @summary Support TLS 1.1 + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm GenericStreamCipher * * SunJSSE does not support dynamic system properties, no way to re-use @@ -35,9 +42,13 @@ * @author Xuelei Fan */ -import java.io.*; +import java.io.InputStream; +import java.io.OutputStream; import java.security.Security; -import javax.net.ssl.*; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; public class GenericStreamCipher { diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSDataExchangeTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSDataExchangeTest.java index a07a303176c..fa3051fcb1b 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSDataExchangeTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSDataExchangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS application data exchange using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSDataExchangeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSDataExchangeTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSEnginesClosureTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSEnginesClosureTest.java index 4a591be9912..d56b2c79656 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSEnginesClosureTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSEnginesClosureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines closing using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSEnginesClosureTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSEnginesClosureTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSHandshakeTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSHandshakeTest.java index 516a46b9877..437181e0d0a 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSHandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines handshake using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSHandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSHandshakeTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSMFLNTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSMFLNTest.java index 6c6073f190d..1a0abbbca2c 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSMFLNTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSMFLNTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with different maximum fragment length. Testing of * MFLN extension. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSMFLNTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSMFLNTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSNotEnabledRC4Test.java b/jdk/test/javax/net/ssl/TLSv11/TLSNotEnabledRC4Test.java index c97b1d0ce7f..629edfab22f 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSNotEnabledRC4Test.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSNotEnabledRC4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,13 @@ * @bug 8085979 * @summary Testing TLS engines do not enable RC4 ciphers by default. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 TLSNotEnabledRC4Test */ diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeTest.java index a81868c31e6..b4b2b784521 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,14 @@ * @summary Testing TLS engines re-handshaking using each of the supported * cipher suites. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSRehandshakeTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSRehandshakeTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java index 1537676eafc..bd537156fe8 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,13 @@ * is taken randomly from the supporetd ciphers list. * @key randomness * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 TLSRehandshakeWithCipherChangeTest */ diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithDataExTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithDataExTest.java index 00f3acc207c..43df7e98184 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithDataExTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithDataExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,14 @@ * cipher suites with application data exchange before and after * re-handshake and closing of the engines. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * jdk.security.auth + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=norm_sni TLSRehandshakeWithDataExTest * @run main/othervm -Dtest.security.protocol=TLSv1.1 -Dtest.mode=krb TLSRehandshakeWithDataExTest diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSUnsupportedCiphersTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSUnsupportedCiphersTest.java index 357e93d4ad2..afab2fda060 100644 --- a/jdk/test/javax/net/ssl/TLSv11/TLSUnsupportedCiphersTest.java +++ b/jdk/test/javax/net/ssl/TLSv11/TLSUnsupportedCiphersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -27,6 +27,13 @@ * @summary Testing that try to enable unsupported ciphers * causes IllegalArgumentException. * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon + * @modules java.security.jgss + * java.security.jgss/sun.security.krb5 + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal + * java.security.jgss/sun.security.krb5.internal.ktab + * java.base/sun.security.util * @run main/othervm -Dtest.security.protocol=TLSv1.1 TLSUnsupportedCiphersTest */ diff --git a/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java b/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java index f1fd67d9b38..e42c9915f79 100644 --- a/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java +++ b/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -21,6 +21,15 @@ * questions. */ +/* + * @test + * @bug 8076221 + * @summary Check if weak cipher suites are disabled + * @modules jdk.crypto.ec + * @run main/othervm DisabledAlgorithms default + * @run main/othervm DisabledAlgorithms empty + */ + import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; @@ -36,13 +45,6 @@ import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; -/** - * @test - * @bug 8076221 - * @summary Check if weak cipher suites are disabled - * @run main/othervm DisabledAlgorithms default - * @run main/othervm DisabledAlgorithms empty - */ public class DisabledAlgorithms { private static final String pathToStores = "../etc"; diff --git a/jdk/test/javax/net/ssl/ciphersuites/ECCurvesconstraints.java b/jdk/test/javax/net/ssl/ciphersuites/ECCurvesconstraints.java index 9e7e692455a..742f71192dd 100644 --- a/jdk/test/javax/net/ssl/ciphersuites/ECCurvesconstraints.java +++ b/jdk/test/javax/net/ssl/ciphersuites/ECCurvesconstraints.java @@ -32,24 +32,29 @@ * @test * @bug 8148516 * @summary Improve the default strength of EC in JDK + * @modules jdk.crypyo.ec * @run main/othervm ECCurvesconstraints PKIX * @run main/othervm ECCurvesconstraints SunX509 */ -import java.net.*; -import java.util.*; -import java.io.*; -import javax.net.ssl.*; -import java.security.Security; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.OutputStream; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; -import java.security.cert.X509Certificate; import java.security.cert.CertificateFactory; -import java.security.spec.*; -import java.security.interfaces.*; +import java.security.interfaces.ECPrivateKey; +import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; - +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManagerFactory; public class ECCurvesconstraints { diff --git a/jdk/test/javax/script/ExceptionTest.java b/jdk/test/javax/script/ExceptionTest.java index ccfcc73130f..02c86e304d2 100644 --- a/jdk/test/javax/script/ExceptionTest.java +++ b/jdk/test/javax/script/ExceptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, 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 @@ -26,10 +26,14 @@ * @bug 6474943 6705893 * @summary Test that script engine exception messages are * available from ScriptException. + * @modules jdk.scripting.nashorn */ -import java.io.*; -import javax.script.*; +import javax.script.Compilable; +import javax.script.CompiledScript; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; public class ExceptionTest { private static final String ERROR_MSG = "error from JavaScript"; diff --git a/jdk/test/javax/script/JavaScriptScopeTest.java b/jdk/test/javax/script/JavaScriptScopeTest.java index 248fdb7c108..b1ed27e36a1 100644 --- a/jdk/test/javax/script/JavaScriptScopeTest.java +++ b/jdk/test/javax/script/JavaScriptScopeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -28,9 +28,13 @@ * get affected by default scope assignments. Also, verify * that script globals can be created and accessed from Java * as well as JavaScript. + * @modules jdk.scripting.nashorn */ -import javax.script.*; +import javax.script.Bindings; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; + public class JavaScriptScopeTest { diff --git a/jdk/test/javax/script/NullUndefinedVarTest.java b/jdk/test/javax/script/NullUndefinedVarTest.java index a02656f895d..e9ad24705a4 100644 --- a/jdk/test/javax/script/NullUndefinedVarTest.java +++ b/jdk/test/javax/script/NullUndefinedVarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -26,9 +26,11 @@ * @bug 6346732 6705893 * @summary should be able to assign null and undefined * value to JavaScript global variables. + * @modules jdk.scripting.nashorn */ -import javax.script.*; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class NullUndefinedVarTest { diff --git a/jdk/test/javax/script/PluggableContextTest.java b/jdk/test/javax/script/PluggableContextTest.java index 9f68090c159..07a32125740 100644 --- a/jdk/test/javax/script/PluggableContextTest.java +++ b/jdk/test/javax/script/PluggableContextTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, 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 @@ -26,9 +26,12 @@ * @bug 6398614 6705893 * @summary Create a user defined ScriptContext and check * that script can access variables from non-standard scopes + * @modules jdk.scripting.nashorn */ -import javax.script.*; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class PluggableContextTest { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test1.java b/jdk/test/javax/script/Test1.java index 9d5bebbebda..3c45b938f1e 100644 --- a/jdk/test/javax/script/Test1.java +++ b/jdk/test/javax/script/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -26,10 +26,13 @@ * @bug 6249843 6705893 * @summary Create JavaScript engine and execute a simple script. * Tests script engine discovery mechanism. + * @modules jdk.scripting.nashorn */ -import javax.script.*; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test1 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test2.java b/jdk/test/javax/script/Test2.java index ea93ca5918c..318aae09d8e 100644 --- a/jdk/test/javax/script/Test2.java +++ b/jdk/test/javax/script/Test2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,10 +25,13 @@ * @test * @bug 6249843 * @summary Test exposing a Java object to script + * @modules jdk.scripting.nashorn */ -import javax.script.*; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test2 { public static class Testobj { diff --git a/jdk/test/javax/script/Test3.java b/jdk/test/javax/script/Test3.java index 83237193e52..0c28bf35437 100644 --- a/jdk/test/javax/script/Test3.java +++ b/jdk/test/javax/script/Test3.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,11 +25,17 @@ * @test * @bug 6249843 6705893 * @summary Test engine and global scopes + * @modules jdk.scripting.nashorn */ -import javax.script.*; -import java.io.*; -import java.util.*; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import javax.script.Bindings; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.SimpleBindings; public class Test3 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test4.java b/jdk/test/javax/script/Test4.java index a92c99c22ed..106de4fd59a 100644 --- a/jdk/test/javax/script/Test4.java +++ b/jdk/test/javax/script/Test4.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,10 +25,14 @@ * @test * @bug 6249843 6705893 * @summary Test script functions implementing Java interface + * @modules jdk.scripting.nashorn */ -import javax.script.*; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import javax.script.Invocable; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test4 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test5.java b/jdk/test/javax/script/Test5.java index 2159647c6c4..1bcb7239b8d 100644 --- a/jdk/test/javax/script/Test5.java +++ b/jdk/test/javax/script/Test5.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,10 +25,18 @@ * @test * @bug 6249843 6705893 * @summary Tests engine, global scopes and scope hiding. + * @modules jdk.scripting.nashorn */ -import java.io.*; -import javax.script.*; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import javax.script.Bindings; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.SimpleBindings; +import javax.script.SimpleScriptContext; public class Test5 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test6.java b/jdk/test/javax/script/Test6.java index fadff34bc08..949b3af67a3 100644 --- a/jdk/test/javax/script/Test6.java +++ b/jdk/test/javax/script/Test6.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -26,10 +26,16 @@ * @bug 6249843 6705893 * @summary Test basic script compilation. Value eval'ed from * compiled and interpreted scripts should be same. + * @modules jdk.scripting.nashorn */ -import java.io.*; -import javax.script.*; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import javax.script.Compilable; +import javax.script.CompiledScript; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test6 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test7.java b/jdk/test/javax/script/Test7.java index dbe1890df5c..fd7402fbb66 100644 --- a/jdk/test/javax/script/Test7.java +++ b/jdk/test/javax/script/Test7.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,10 +25,14 @@ * @test * @bug 6249843 6705893 * @summary Tests importPackage and java access in script + * @modules jdk.scripting.nashorn */ -import java.io.*; -import javax.script.*; +import java.io.File; +import java.io.FileReader; +import java.io.Reader; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test7 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/javax/script/Test8.java b/jdk/test/javax/script/Test8.java index f83cd1c3a0f..3848e434750 100644 --- a/jdk/test/javax/script/Test8.java +++ b/jdk/test/javax/script/Test8.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -25,10 +25,14 @@ * @test * @bug 6249843 6705893 * @summary Test invoking script function or method from Java + * @modules jdk.scripting.nashorn */ -import javax.script.*; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import javax.script.Invocable; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; public class Test8 { public static void main(String[] args) throws Exception { diff --git a/jdk/test/jdk/internal/misc/Unsafe/TestBadHostClass.java b/jdk/test/jdk/internal/misc/Unsafe/TestBadHostClass.java new file mode 100644 index 00000000000..1dd55404a6c --- /dev/null +++ b/jdk/test/jdk/internal/misc/Unsafe/TestBadHostClass.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2016, 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 8058575 + * @summary Test that bad host classes cause exceptions to get thrown. + * @library /test/lib + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.org.objectweb.asm + * @run main TestBadHostClass + */ + + +import java.lang.*; +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; +import jdk.test.lib.unsafe.UnsafeHelper; +import jdk.internal.org.objectweb.asm.ClassWriter; +import static jdk.internal.org.objectweb.asm.Opcodes.*; + +// Test that bad host classes cause exceptions. +public class TestBadHostClass { + + private static final Unsafe unsafe = Unsafe.getUnsafe(); + + private static String packageName(Class c) { + if (c.isArray()) { + return packageName(c.getComponentType()); + } else { + String name = c.getName(); + int dot = name.lastIndexOf('.'); + if (dot == -1) return ""; + return name.substring(0, dot); + } + } + + private static int constantPoolSize(byte[] classFile) { + return ((classFile[8] & 0xFF) << 8) | (classFile[9] & 0xFF); + } + + static public void badHostClass(Class hostClass) { + // choose a class name in the same package as the host class + String className; + if (hostClass != null) { + String prefix = packageName(hostClass); + if (prefix.length() > 0) + prefix = prefix.replace('.', '/') + "/"; + className = prefix + "Anon"; + } else { + className = "Anon"; + } + + // create the class + String superName = "java/lang/Object"; + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + + ClassWriter.COMPUTE_FRAMES); + cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, + className, null, superName, null); + byte[] classBytes = cw.toByteArray(); + int cpPoolSize = constantPoolSize(classBytes); + Class anonClass + = unsafe.defineAnonymousClass(hostClass, classBytes, new Object[cpPoolSize]); + } + + public static void main(String args[]) throws Exception { + // host class is an array of java.lang.Objects. + try { + badHostClass(Object[].class); + } catch (IllegalArgumentException ex) { + } + + // host class is an array of objects of this class. + try { + badHostClass(TestBadHostClass[].class); + } catch (IllegalArgumentException ex) { + } + + // host class is null. + try { + badHostClass(null); + } catch (NullPointerException ex) { + } + + // host class is a primitive array class. + try { + badHostClass(int[].class); + } catch (IllegalArgumentException ex) { + } + } +} diff --git a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java new file mode 100644 index 00000000000..12e45f03b77 --- /dev/null +++ b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2016, 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 8163798 + * @summary basic tests for multi-release jar versioned streams + * @modules jdk.jartool/sun.tools.jar java.base/jdk.internal.util.jar + * @run testng TestVersionedStream + */ + +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.net.URI; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.util.zip.ZipFile; + +public class TestVersionedStream { + private String userdir; + + @BeforeClass + public void initialize() { + userdir = System.getProperty("user.dir", "."); + + // These are not real class files even though they end with .class. + // They are resource files so jar tool validation won't reject them. + // But they are what we want to test, especially q/Bar.class that + // could be in a concealed package if this was a modular multi-release + // jar. + createFiles( + "base/p/Foo.class", + "base/p/Main.class", + "v9/p/Foo.class", + "v10/p/Foo.class", + "v10/q/Bar.class", + "v11/p/Foo.class" + ); + + jar("cf mmr.jar -C base . --release 9 -C v9 . --release 10 -C v10 . --release 11 -C v11 ."); + + System.out.println("Contents of mmr.jar\n======="); + jar("tf mmr.jar"); + System.out.println("======="); + } + + @AfterClass + public void close() throws IOException { + Path root = Paths.get(userdir); + Files.walkFileTree(root, new SimpleFileVisitor<>() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + Files.delete(file); + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + if (!dir.equals(root)) { + Files.delete(dir); + } + return FileVisitResult.CONTINUE; + } + }); + } + + @DataProvider + public Object[][] data() { + List p = List.of( + "META-INF/", + "META-INF/MANIFEST.MF", + "p/", + "p/Foo.class", + "p/Main.class" + ); + List q = List.of( + "META-INF/", + "META-INF/MANIFEST.MF", + "p/", + "p/Foo.class", + "p/Main.class", + "q/", + "q/Bar.class" + ); + Runtime.Version rt = JarFile.runtimeVersion(); + return new Object[][] { + {Runtime.Version.parse("8"), p}, + {Runtime.Version.parse("9"), p}, + {Runtime.Version.parse("10"), q}, + {Runtime.Version.parse("11"), q}, + {JarFile.baseVersion(), p}, + {rt, rt.major() > 9 ? q : p} + }; + } + + @Test(dataProvider="data") + public void test(Runtime.Version version, List names) throws Exception { + try (JarFile jf = new JarFile(new File("mmr.jar"), false, ZipFile.OPEN_READ, version); + Stream jes = jdk.internal.util.jar.VersionedStream.stream(jf)) + { + Assert.assertNotNull(jes); + + List entries = jes.collect(Collectors.toList()); + + // verify the correct order + List enames = entries.stream() + .map(je -> je.getName()) + .collect(Collectors.toList()); + Assert.assertEquals(enames, names); + + // verify the contents + Map contents = new HashMap<>(); + contents.put("p/Main.class", "base/p/Main.class\n"); + if (version.major() > 9) { + contents.put("q/Bar.class", "v10/q/Bar.class\n"); + } + switch (version.major()) { + case 8: + contents.put("p/Foo.class", "base/p/Foo.class\n"); + break; + case 9: + contents.put("p/Foo.class", "v9/p/Foo.class\n"); + break; + case 10: + contents.put("p/Foo.class", "v10/p/Foo.class\n"); + break; + case 11: + contents.put("p/Foo.class", "v11/p/Foo.class\n"); + break; + default: + Assert.fail("Test out of date, please add more cases"); + } + + contents.entrySet().stream().forEach(e -> { + String name = e.getKey(); + int i = enames.indexOf(name); + Assert.assertTrue(i != -1, name + " not in enames"); + JarEntry je = entries.get(i); + try (InputStream is = jf.getInputStream(je)) { + String s = new String(is.readAllBytes()); + Assert.assertTrue(s.endsWith(e.getValue()), s); + } catch (IOException x) { + throw new UncheckedIOException(x); + } + }); + } + } + + private void createFiles(String... files) { + ArrayList list = new ArrayList(); + Arrays.stream(files) + .map(f -> "file:///" + userdir + "/" + f) + .map(f -> URI.create(f)) + .filter(u -> u != null) + .map(u -> Paths.get(u)) + .forEach(p -> { + try { + Files.createDirectories(p.getParent()); + Files.createFile(p); + list.clear(); + list.add(p.toString()); + Files.write(p, list); + } catch (IOException x) { + throw new UncheckedIOException(x); + }}); + } + + private void jar(String args) { + new sun.tools.jar.Main(System.out, System.err, "jar") + .run(args.split(" +")); + } + +} diff --git a/jdk/test/jdk/nio/zipfs/jarfs/JFSTester.java b/jdk/test/jdk/nio/zipfs/jarfs/JFSTester.java index 881e27dbd4f..78a663f7a7f 100644 --- a/jdk/test/jdk/nio/zipfs/jarfs/JFSTester.java +++ b/jdk/test/jdk/nio/zipfs/jarfs/JFSTester.java @@ -26,6 +26,7 @@ * @bug 8164389 * @summary walk entries in a jdk.nio.zipfs.JarFileSystem * @modules jdk.jartool/sun.tools.jar + * jdk.zipfs * @run testng JFSTester */ diff --git a/jdk/test/sun/net/www/protocol/jar/JarURLConnectionUseCaches.java b/jdk/test/sun/net/www/protocol/jar/JarURLConnectionUseCaches.java new file mode 100644 index 00000000000..433a72cc55b --- /dev/null +++ b/jdk/test/sun/net/www/protocol/jar/JarURLConnectionUseCaches.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2016, 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 6947916 + * @summary JarURLConnection does not handle useCaches correctly + * @run main/othervm JarURLConnectionUseCaches + */ + +import java.io.*; +import java.net.JarURLConnection; +import java.net.URL; +import java.util.jar.*; + +public class JarURLConnectionUseCaches { + public static void main( String[] args ) throws IOException { + JarOutputStream out = new JarOutputStream( + new FileOutputStream("usecache.jar")); + out.putNextEntry(new JarEntry("test.txt")); + out.write("Test txt file".getBytes()); + out.closeEntry(); + out.close(); + + URL url = new URL("jar:" + + new File(".").toURI().toString() + + "/usecache.jar!/test.txt"); + + JarURLConnection c1 = (JarURLConnection)url.openConnection(); + c1.setDefaultUseCaches( false ); + c1.setUseCaches( true ); + c1.connect(); + + JarURLConnection c2 = (JarURLConnection)url.openConnection(); + c2.setDefaultUseCaches( false ); + c2.setUseCaches( true ); + c2.connect(); + + c1.getInputStream().close(); + c2.getInputStream().read(); + c2.getInputStream().close(); + } +} diff --git a/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java b/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java index 58a81065746..cca4e77befb 100644 --- a/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java +++ b/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -31,6 +31,7 @@ import java.util.List; * OID and algorithm transformation string should match. * Both could be able to be used to generate the algorithm instance. * @compile ../../TestSignatureOidHelper.java + * @modules jdk.crypto.ec * @run main TestSHAwithECDSASignatureOids */ public class TestSHAwithECDSASignatureOids { diff --git a/jdk/test/sun/security/krb5/IPv6.java b/jdk/test/sun/security/krb5/IPv6.java index 20085c0f9e0..5f541035528 100644 --- a/jdk/test/sun/security/krb5/IPv6.java +++ b/jdk/test/sun/security/krb5/IPv6.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, 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 @@ -25,11 +25,16 @@ * @test * @bug 6877357 6885166 * @run main/othervm IPv6 + * @modules jdk.security.auth * @summary IPv6 address does not work */ import com.sun.security.auth.module.Krb5LoginModule; -import java.io.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.PrintStream; +import java.io.StringReader; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; diff --git a/jdk/test/sun/security/krb5/auto/MaxRetries.java b/jdk/test/sun/security/krb5/auto/MaxRetries.java index b732becd169..973873a6524 100644 --- a/jdk/test/sun/security/krb5/auto/MaxRetries.java +++ b/jdk/test/sun/security/krb5/auto/MaxRetries.java @@ -24,7 +24,6 @@ /* * @test * @bug 6844193 - * @key intermittent * @compile -XDignore.symbol.file MaxRetries.java * @run main/othervm/timeout=300 MaxRetries * @summary support max_retries in krb5.conf diff --git a/jdk/test/sun/security/krb5/auto/Unreachable.java b/jdk/test/sun/security/krb5/auto/Unreachable.java index fdc1aa2ee25..fddf040d517 100644 --- a/jdk/test/sun/security/krb5/auto/Unreachable.java +++ b/jdk/test/sun/security/krb5/auto/Unreachable.java @@ -24,7 +24,6 @@ /* * @test * @bug 7162687 8015595 - * @key intermittent * @summary enhance KDC server availability detection * @compile -XDignore.symbol.file Unreachable.java * @run main/othervm Unreachable diff --git a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java index db7098e5fdf..72dbb728687 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitCipher * @run main/othervm ReinitCipher sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java b/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java index 5fa94cbfc54..49880d3706e 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6687725 * @summary Test internal PKCS5Padding impl with various error conditions. * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestPKCS5PaddingError * @run main/othervm TestPKCS5PaddingError sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java index b9656a54086..160ce1cb5a1 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898468 6994008 * @summary basic test for RSA cipher * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSACipher * @run main/othervm TestRSACipher sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java index 8637302b547..4e4fb600852 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6572331 6994008 * @summary basic test for RSA cipher key wrapping functionality * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSACipherWrap * @run main/othervm TestRSACipherWrap sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java index cebe4224129..ed85f315a75 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6994008 * @summary basic test for RSA/ECB/NoPadding cipher * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRawRSACipher * @run main/othervm TestRawRSACipher sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java index 018edc7417a..e94c61d2938 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898461 6604496 * @summary basic test for symmetric ciphers with padding * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSymmCiphers * @run main/othervm TestSymmCiphers sm */ diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java index 2359e77bf03..4fc7d7b9553 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898484 6604496 8001284 * @summary basic test for symmetric ciphers with no padding * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSymmCiphersNoPad * @run main/othervm TestSymmCiphersNoPad sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java b/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java index 50154df7c77..52b69892dae 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java @@ -21,21 +21,23 @@ * questions. */ -/** +/* * @test * @bug 8072452 * @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm SupportedDHKeys * @run main/othervm SupportedDHKeys sm */ import java.math.BigInteger; - -import java.security.*; -import javax.crypto.*; -import javax.crypto.interfaces.*; -import javax.crypto.spec.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import javax.crypto.interfaces.DHPrivateKey; +import javax.crypto.interfaces.DHPublicKey; +import javax.crypto.spec.DHParameterSpec; public class SupportedDHKeys extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java index 45e03897359..c43dc081878 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4921804 6324825 * @summary Verify that DH works properly * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDH * @run main/othervm TestDH sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java index 15a96b9b19e..4834b761f89 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java @@ -21,11 +21,12 @@ * questions. */ -/** +/* * @test * @bug 7146728 * @summary Interop test for DH with secret that has a leading 0x00 byte * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestInterop * @run main/othervm TestInterop sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java index aec6c0c7c16..f082fee09ac 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4942494 7146728 * @summary KAT test for DH (normal and with secret that has leading a 0x00 byte) * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestShort * @run main/othervm TestShort sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java b/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java index 0725171cb53..cdfa887de0a 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java @@ -21,21 +21,19 @@ * questions. */ -/** +/* * @test * @bug 8072452 * @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm UnsupportedDHKeys * @run main/othervm UnsupportedDHKeys sm */ -import java.math.BigInteger; - -import java.security.*; -import javax.crypto.*; -import javax.crypto.interfaces.*; -import javax.crypto.spec.*; +import java.security.InvalidParameterException; +import java.security.KeyPairGenerator; +import java.security.Provider; public class UnsupportedDHKeys extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java index 3c8b3a52283..9e2b6da7b43 100644 --- a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898479 * @summary Verify that the parity bits are set correctly * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm DESParity * @run main/othervm DESParity sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java b/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java index e0f669f58e3..f5297390348 100644 --- a/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4917233 6461727 6490213 6720456 * @summary test the KeyGenerator * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyGenerator * @run main/othervm TestKeyGenerator sm */ diff --git a/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java b/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java index 4655678c31e..f5a0a105fe8 100644 --- a/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java +++ b/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 7196382 8072452 * @summary Ensure that DH key pairs can be generated for 512 - 8192 bits * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDH2048 * @run main/othervm TestDH2048 sm */ diff --git a/jdk/test/sun/security/pkcs11/Mac/MacKAT.java b/jdk/test/sun/security/pkcs11/Mac/MacKAT.java index d7679f91ffd..c068ac0e3c1 100644 --- a/jdk/test/sun/security/pkcs11/Mac/MacKAT.java +++ b/jdk/test/sun/security/pkcs11/Mac/MacKAT.java @@ -21,6 +21,17 @@ * questions. */ +/* + * @test + * @bug 4846410 6313661 4963723 + * @summary Basic known-answer-test for Hmac algorithms + * @author Andreas Sterbenz + * @library .. + * @modules jdk.crypto.pkcs11 + * @run main/othervm MacKAT + * @run main/othervm MacKAT sm + */ + import java.io.UnsupportedEncodingException; import java.security.Provider; import java.util.Arrays; @@ -30,15 +41,6 @@ import javax.crypto.Mac; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; -/** - * @test - * @bug 4846410 6313661 4963723 - * @summary Basic known-answer-test for Hmac algorithms - * @author Andreas Sterbenz - * @library .. - * @run main/othervm MacKAT - * @run main/othervm MacKAT sm - */ public class MacKAT extends PKCS11Test { private final static byte[] ALONG, BLONG, BKEY, BKEY_20, DDDATA_50, diff --git a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java index 8d6689721fc..c1ee2ec4a67 100644 --- a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java +++ b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java @@ -21,6 +21,18 @@ * questions. */ +/* + * @test + * @bug 8048603 + * @summary Check if doFinal and update operation result in same Mac + * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin + * @library .. + * @modules jdk.crypto.pkcs11 + * @run main/othervm MacSameTest + * @run main/othervm MacSameTest sm + * @key randomness + */ + import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; @@ -30,16 +42,6 @@ import java.util.List; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; -/** - * @test - * @bug 8048603 - * @summary Check if doFinal and update operation result in same Mac - * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin - * @library .. - * @run main/othervm MacSameTest - * @run main/othervm MacSameTest sm - * @key randomness - */ public class MacSameTest extends PKCS11Test { private static final int MESSAGE_SIZE = 25; diff --git a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java index 39970d8df00..97dcb7305b4 100644 --- a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java +++ b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitMac * @run main/othervm ReinitMac sm */ diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java index eca0485c8a9..64d7ff5ba65 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the MessageDigest.update(ByteBuffer) method * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ByteBuffers * @run main/othervm ByteBuffers sm */ diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java b/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java index 0f48f28c859..4a3b71f7deb 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Basic known-answer-test for all our MessageDigest algorithms * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm DigestKAT * @run main/othervm DigestKAT sm */ diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java index 9d8250c9ab0..3414a579754 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitDigest * @run main/othervm ReinitDigest sm */ diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java index 0aca8fbf791..4bac0794227 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6414899 * @summary Ensure the cloning functionality works. * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestCloning * @run main/othervm TestCloning sm */ diff --git a/jdk/test/sun/security/pkcs11/PKCS11Test.java b/jdk/test/sun/security/pkcs11/PKCS11Test.java index f3e14c7d213..3752baba8da 100644 --- a/jdk/test/sun/security/pkcs11/PKCS11Test.java +++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java @@ -82,8 +82,6 @@ public abstract class PKCS11Test { System.setProperty("closed.base", CLOSED_BASE); } - static String NSPR_PREFIX = ""; - // NSS version info public static enum ECCState { None, Basic, Extended }; static double nss_version = -1; @@ -294,7 +292,6 @@ public abstract class PKCS11Test { String osName = props.getProperty("os.name"); if (osName.startsWith("Win")) { osName = "Windows"; - NSPR_PREFIX = "lib"; } else if (osName.equals("Mac OS X")) { osName = "MacOSX"; } @@ -342,9 +339,9 @@ public abstract class PKCS11Test { static boolean loadNSPR(String libdir) throws Exception { // load NSS softoken dependencies in advance to avoid resolver issues - safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "nspr4")); - safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "plc4")); - safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "plds4")); + safeReload(libdir + System.mapLibraryName("nspr4")); + safeReload(libdir + System.mapLibraryName("plc4")); + safeReload(libdir + System.mapLibraryName("plds4")); safeReload(libdir + System.mapLibraryName("sqlite3")); safeReload(libdir + System.mapLibraryName("nssutil3")); return true; diff --git a/jdk/test/sun/security/pkcs11/Provider/Absolute.java b/jdk/test/sun/security/pkcs11/Provider/Absolute.java index 85bbd216ba1..7906ac129c5 100644 --- a/jdk/test/sun/security/pkcs11/Provider/Absolute.java +++ b/jdk/test/sun/security/pkcs11/Provider/Absolute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -20,13 +20,16 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/** +/* * @test * @bug 7003952 7191662 * @library .. + * @modules jdk.crypto.pkcs11 * @summary load DLLs and launch executables using fully qualified path */ -import java.security.*; + +import java.security.InvalidParameterException; +import java.security.Provider; public class Absolute { diff --git a/jdk/test/sun/security/pkcs11/SampleTest.java b/jdk/test/sun/security/pkcs11/SampleTest.java index 43cd13ae333..5d5c68414f0 100644 --- a/jdk/test/sun/security/pkcs11/SampleTest.java +++ b/jdk/test/sun/security/pkcs11/SampleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -21,20 +21,16 @@ * questions. */ -/** +/* * @test * @bug 4000000 * @summary XXX todo * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.Provider; public class SampleTest extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java index 67c691a3bc2..82fc4ab5f74 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6414980 * @summary Test that the PKCS#11 KeyStore handles RSA, DSA, and EC keys * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm AddPrivateKey * @run main/othervm AddPrivateKey sm policy */ diff --git a/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java b/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java index 2eedf3cd506..1e085c33a24 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java +++ b/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6298106 * @summary make sure we can add a trusted cert to the NSS KeyStore module * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm AddTrustedCert * @run main/othervm AddTrustedCert sm policy */ diff --git a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java index 2e571051cbd..b1b4372a49b 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java +++ b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6329006 * @summary verify that NSS no-db mode works correctly * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm Crypto * @run main/othervm Crypto sm policy */ diff --git a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java index b3170597b5d..9dd1fe0aaba 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6273877 6322208 6275523 * @summary make sure we can access the NSS softtoken KeyStore * and use a private key * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm GetPrivateKey * @run main/othervm GetPrivateKey sm policy */ diff --git a/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java index 7613fce9ba5..360e5d1e684 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6269847 * @summary store a NSS PKCS11 PrivateKeyEntry to JKS KeyStore throws confusing NPE * @author Wang Weijun * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm JksSetPrivateKey * @run main/othervm JksSetPrivateKey sm policy */ diff --git a/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java b/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java index c08fe8446aa..2e1d85ce58f 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java +++ b/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java @@ -21,6 +21,16 @@ * questions. */ +/* + * @test + * @bug 8048622 8134232 + * @summary Checks that PKCS#11 keystore can't be loaded with wrong password + * @library ../ + * @modules jdk.crypto.pkcs11 + * @run main/othervm LoadKeystore + * @run main/othervm LoadKeystore sm policy + */ + import java.io.File; import java.io.IOException; import java.security.KeyStore; @@ -30,14 +40,6 @@ import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.Collections; -/* - * @test - * @bug 8048622 8134232 - * @summary Checks that PKCS#11 keystore can't be loaded with wrong password - * @library ../ - * @run main/othervm LoadKeystore - * @run main/othervm LoadKeystore sm policy - */ public class LoadKeystore extends SecmodTest { public static void main(String[] args) throws Exception { diff --git a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java index 277a51ec4c2..a26a5862d59 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java +++ b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6298106 6275523 6420252 8059627 * @summary make sure we can access the NSS trust anchor module * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TrustAnchors * @run main/othervm TrustAnchors sm policy */ diff --git a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java index 8c2c1686f73..3145431b867 100644 --- a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java +++ b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6246411 * @summary basic test for PKCS#11 SecureRandom * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm Basic * @run main/othervm Basic sm */ diff --git a/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java b/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java index 117fb62d900..37985dd96e7 100644 --- a/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java +++ b/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, 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 @@ -21,15 +21,22 @@ * questions. */ -/** +/* * @test * @bug 6837847 * @summary Ensure a deserialized PKCS#11 SecureRandom is functional. * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.security.*; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.SecureRandom; +import java.security.Security; public class TestDeserialization extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java b/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java index 35f13bb16a0..a3deb72c974 100644 --- a/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java +++ b/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -21,18 +21,22 @@ * questions. */ -/** +/* * @test * @bug 4921802 * @summary Test that the SunPKCS11 provider can be serialized * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.io.*; -import java.util.*; - -import java.security.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.security.Provider; +import java.security.Security; public class SerializeProvider extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java index 39e4424af35..3d1afa3bcb0 100644 --- a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java +++ b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the Signature.update(ByteBuffer) method * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ByteBuffers * @run main/othervm ByteBuffers sm */ diff --git a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java index 0f51ffaa096..30f1d7f4f17 100644 --- a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java +++ b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary test that reinitializing Signatures works correctly * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main ReinitSignature * @run main ReinitSignature * @run main ReinitSignature @@ -330,9 +331,13 @@ * @run main ReinitSignature */ -import java.util.*; - -import java.security.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.util.Random; public class ReinitSignature extends PKCS11Test { diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java index c4fcf5d5956..b707d98ee20 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary basic test of SHA1withDSA and RawDSA signing/verifying * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDSA * @run main/othervm TestDSA sm */ diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java index f671bba3bd7..c1a0dc1bc57 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java @@ -28,6 +28,7 @@ * with unsupported key sizes * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDSAKeyLength * @run main/othervm TestDSAKeyLength sm */ diff --git a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java index 43341472e99..7618851bc2a 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test %W% %E% * @bug 6695485 * @summary Make sure initSign/initVerify() check RSA key lengths * @author Yu-Ching Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSAKeyLength * @run main/othervm TestRSAKeyLength sm */ diff --git a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java index 4c0bbfba8f6..3117c983402 100644 --- a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java +++ b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 6414980 8051972 * @summary Make sure that we can parse certificates using various named curves @@ -29,6 +29,7 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm ReadCertificates * @run main/othervm ReadCertificates sm policy */ diff --git a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java index 3252b08d195..57af80441f8 100644 --- a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java +++ b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Verify that we can parse ECPrivateKeys from PKCS#12 and use them @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReadPKCS12 * @run main/othervm ReadPKCS12 sm policy */ diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDH.java b/jdk/test/sun/security/pkcs11/ec/TestECDH.java index 421f46ccfc2..d5432b03968 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDH.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Basic known answer test for ECDH * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECDH * @run main/othervm TestECDH sm policy */ diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDH2.java b/jdk/test/sun/security/pkcs11/ec/TestECDH2.java index dee7a706ce7..d064e5263c3 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDH2.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH2.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary basic test of ECDSA signatures for P-256 and P-384 from the @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util + * jdk.crypto.pkcs11 * @compile -XDignore.symbol.file TestECDH2.java * @run main/othervm TestECDH2 * @run main/othervm TestECDH2 sm diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java index 9e0b8401aa9..fd5de680064 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 8042967 * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECDSA * @run main/othervm TestECDSA sm policy */ diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java index c2cd7188a03..fa0c5fc26b8 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary basic test of ECDSA signatures for P-256 and P-384 from the @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util + * jdk.crypto.pkcs11 * @compile -XDignore.symbol.file TestECDSA2.java * @run main/othervm TestECDSA2 * @run main/othervm TestECDSA2 sm diff --git a/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java b/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java index 829b44ee7d9..4ce105030da 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Verify that we can use ECGenParameterSpec * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECGenSpec * @run main/othervm TestECGenSpec sm */ diff --git a/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java b/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java index 519c861ce3d..827af91ed9e 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java +++ b/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Test the P11ECKeyFactory * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyFactory * @run main/othervm TestKeyFactory sm */ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk index 7ea34d02d97..60c46169a6b 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll index 6c03f7d54e5..bb662ad9e82 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll deleted file mode 100644 index fc573be7d36..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib deleted file mode 100644 index 64aa29695e1..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll deleted file mode 100644 index 519c80e3e09..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib deleted file mode 100644 index 1df6f28c331..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll deleted file mode 100644 index dc56672cb02..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib deleted file mode 100644 index b424eefcce1..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.dll new file mode 100644 index 00000000000..5b65fc625f2 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.lib new file mode 100644 index 00000000000..f6026ecc84e Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nspr4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll index 67f06d47bd1..18248a2b928 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib index c73d3efa1ad..278fd95ed9d 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll index 28c84743adb..20b011561fe 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk index e8e9b94fb10..797ec741495 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll index f1a722cd983..8eb93e01e6d 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll index 3eeca26f262..80f3ad0ad88 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib index 9f6ea2dee6c..819ade0768c 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.dll new file mode 100644 index 00000000000..94da505ad6a Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.lib new file mode 100644 index 00000000000..e319cd3873d Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plc4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.dll new file mode 100644 index 00000000000..be9c1cf1691 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.lib new file mode 100644 index 00000000000..7a93bec3cb9 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/plds4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk index f002c3468fe..85e7b4a5f64 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll index 6293c7d1f20..7fb079f61ea 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll index 18c8fca90cb..288025baf05 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll index 5e06d337e68..c00687e37b2 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib index 21e83def697..e96c9185843 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk index 7f4e14757a5..a716ed40f75 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll index eea9e978e04..e5934cf33d1 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll deleted file mode 100644 index f073dc911bd..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib deleted file mode 100644 index 7351a9ebceb..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll deleted file mode 100644 index 0e74aec020e..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib deleted file mode 100644 index cff555e3826..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll deleted file mode 100644 index 3247b929767..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib deleted file mode 100644 index 876979f6473..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.dll new file mode 100644 index 00000000000..4ec833a7e35 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.lib new file mode 100644 index 00000000000..e6195bdae33 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nspr4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll index 0411891b692..053aaa3ad93 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib index 1d8272ff195..a07111d38d4 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll index 123a8bf6536..9013e5cf072 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk index bc51e406988..cf0c1048d57 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll index 0572b4ecfdf..eedb562e31d 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll index f4dba08eeaf..a679872b0b7 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib index 7cd24f33feb..088c3960372 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.dll new file mode 100644 index 00000000000..d9b31663f3d Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.lib new file mode 100644 index 00000000000..7f2ad9b9298 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plc4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.dll new file mode 100644 index 00000000000..07c08735491 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.lib new file mode 100644 index 00000000000..0f8854e72a2 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/plds4.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk index 84ea2e2d5ac..7f18d4830f1 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll index 615e7c0a100..16eb7cc8227 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll index 9a130aa5606..08f0d702380 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll index 41f962ae861..73d69a3512f 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll differ diff --git a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib index 72400591d64..99e29e2baec 100644 Binary files a/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib and b/jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib differ diff --git a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz new file mode 100644 index 00000000000..63fa5feb510 Binary files /dev/null and b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz differ diff --git a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz.sha256 b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz.sha256 new file mode 100644 index 00000000000..e4802dc7dea --- /dev/null +++ b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16-with-nspr-4.10.4.tar.gz.sha256 @@ -0,0 +1 @@ +9d23633683ab3cea14519a22a997bc7f5d8d9664b6342df492c194966184ce0d nss-3.16-with-nspr-4.10.4.tar.gz diff --git a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz deleted file mode 100644 index 09273547484..00000000000 Binary files a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz and /dev/null differ diff --git a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256 b/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256 deleted file mode 100644 index 6ea9a98fef8..00000000000 --- a/jdk/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -d2374795528f9cf36de07bf7c77d8c8414bb5b4da12ee7c78a57ec90d68e3706 nss-3.16_nspr-4.10_src.tar.gz diff --git a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java index e0bad7cd2d4..311a9b7f5aa 100644 --- a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java +++ b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6231216 * @summary Verify key wrapping (of extractable keys) works for RSA/PKCS1 * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm KeyWrap * @run main/othervm KeyWrap sm */ diff --git a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java index 24c16243585..a79330b8fcb 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the new RSA provider can verify all the RSA certs in the cacerts file * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm TestCACerts * @run main/othervm TestCACerts sm TestCACerts.policy */ diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java index 802774285c3..d8292bcbad3 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test KeyFactory of the new RSA provider * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyFactory * @run main/othervm TestKeyFactory sm rsakeys.ks.policy */ diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java index dd60d406fa6..84bbb60ab53 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed) @@ -29,6 +29,7 @@ * @library .. * @library /lib/testlibrary * @build jdk.testlibrary.* + * @modules jdk.crypto.pkcs11 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator * sm TestKeyPairGenerator.policy diff --git a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java index ae4718f4f56..84283b81ef8 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test signing/verifying using all the signature algorithms * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSignatures * @run main/othervm TestSignatures sm rsakeys.ks.policy */ diff --git a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java index 1fab350dc9d..11fcaacaf79 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java +++ b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java @@ -33,6 +33,7 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" * ClientJSSEServerJSSE * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" diff --git a/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java b/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java index 1511dff4d4b..27944e92f89 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java +++ b/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Known-answer-test for TlsKeyMaterial generator * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestKeyMaterial * @run main/othervm TestKeyMaterial sm policy */ diff --git a/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java b/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java index a8d8f72a299..2d9dc2890aa 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java +++ b/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java @@ -27,6 +27,7 @@ * @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement * @library .. * @author Pasi Eronen + * @modules jdk.crypto.pkcs11 * @run main/othervm TestLeadingZeroesP11 * @run main/othervm TestLeadingZeroesP11 sm */ diff --git a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java index 855b8c21f13..67ee6e708bd 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java +++ b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Known-answer-test for TlsMasterSecret generator @@ -29,6 +29,7 @@ * @library .. * @modules java.base/sun.security.internal.interfaces * java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestMasterSecret * @run main/othervm TestMasterSecret sm TestMasterSecret.policy */ diff --git a/jdk/test/sun/security/pkcs11/tls/TestPRF.java b/jdk/test/sun/security/pkcs11/tls/TestPRF.java index 6e05ea64f90..47b49e9a634 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestPRF.java +++ b/jdk/test/sun/security/pkcs11/tls/TestPRF.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 6345251 * @summary Basic known-answer-test for TlsPrf * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestPRF * @run main/othervm TestPRF sm policy */ diff --git a/jdk/test/sun/security/pkcs11/tls/TestPremaster.java b/jdk/test/sun/security/pkcs11/tls/TestPremaster.java index bbbbf2c376d..a179bb81c2a 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestPremaster.java +++ b/jdk/test/sun/security/pkcs11/tls/TestPremaster.java @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Basic tests for TlsRsaPremasterSecret generator * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestPremaster * @run main/othervm TestPremaster sm policy */ diff --git a/jdk/test/sun/security/provider/FileInputStreamPool/FileInputStreamPoolTest.java b/jdk/test/sun/security/provider/FileInputStreamPool/FileInputStreamPoolTest.java index 63d5fce25ba..55811ddaf53 100644 --- a/jdk/test/sun/security/provider/FileInputStreamPool/FileInputStreamPoolTest.java +++ b/jdk/test/sun/security/provider/FileInputStreamPool/FileInputStreamPoolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, 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 @@ -69,7 +69,7 @@ public class FileInputStreamPoolTest { // make JVM process References System.gc(); // help ReferenceHandler thread enqueue References - while (TestProxy.Reference_tryHandlePending(false)) {} + while (TestProxy.Reference_waitForReferenceProcessing()) { } // help run Finalizers System.runFinalization(); } @@ -103,11 +103,11 @@ public class FileInputStreamPoolTest { /** * A proxy for (package)private static methods: * sun.security.provider.FileInputStreamPool.getInputStream - * java.lang.ref.Reference.tryHandlePending + * java.lang.ref.Reference.waitForReferenceProcessing */ static class TestProxy { private static final Method getInputStreamMethod; - private static final Method tryHandlePendingMethod; + private static final Method waitForReferenceProcessingMethod; static { try { @@ -118,9 +118,9 @@ public class FileInputStreamPoolTest { "getInputStream", File.class); getInputStreamMethod.setAccessible(true); - tryHandlePendingMethod = Reference.class.getDeclaredMethod( - "tryHandlePending", boolean.class); - tryHandlePendingMethod.setAccessible(true); + waitForReferenceProcessingMethod = + Reference.class.getDeclaredMethod("waitForReferenceProcessing"); + waitForReferenceProcessingMethod.setAccessible(true); } catch (Exception e) { throw new Error(e); } @@ -146,13 +146,14 @@ public class FileInputStreamPoolTest { } } - static boolean Reference_tryHandlePending(boolean waitForNotify) { + static boolean Reference_waitForReferenceProcessing() { try { - return (boolean) tryHandlePendingMethod - .invoke(null, waitForNotify); + return (boolean) waitForReferenceProcessingMethod.invoke(null); } catch (InvocationTargetException e) { Throwable te = e.getTargetException(); - if (te instanceof RuntimeException) { + if (te instanceof InterruptedException) { + return true; + } else if (te instanceof RuntimeException) { throw (RuntimeException) te; } else if (te instanceof Error) { throw (Error) te; diff --git a/jdk/test/sun/security/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java b/jdk/test/sun/security/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java index 38d513632dc..35cbf3a3b09 100644 --- a/jdk/test/sun/security/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java +++ b/jdk/test/sun/security/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -83,6 +83,8 @@ import java.io.*; import java.net.*; import java.security.*; import java.nio.*; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; public class SSLEngineBadBufferArrayAccess { @@ -103,9 +105,6 @@ public class SSLEngineBadBufferArrayAccess { private static boolean debug = false; private SSLContext sslc; private SSLEngine serverEngine; // server-side SSLEngine - private SSLSocket sslSocket; // client-side socket - private ServerSocket serverSocket; // server-side Socket, generates the... - private Socket socket; // server-side socket that will read private final byte[] serverMsg = "Hi there Client, I'm a Server".getBytes(); private final byte[] clientMsg = "Hello Server, I'm a Client".getBytes(); @@ -136,6 +135,21 @@ public class SSLEngineBadBufferArrayAccess { System.getProperty("test.src", ".") + "/" + pathToStores + "/" + trustStoreFile; + /* + * Is the server ready to serve? + */ + private static final CountDownLatch serverCondition = new CountDownLatch(1); + + /* + * Is the client ready to handshake? + */ + private static final CountDownLatch clientCondition = new CountDownLatch(1); + + /* + * What's the server port? Use any free port by default + */ + private volatile int serverPort = 0; + /* * Main entry point for this test. */ @@ -171,8 +185,13 @@ public class SSLEngineBadBufferArrayAccess { char[] passphrase = "passphrase".toCharArray(); - ks.load(new FileInputStream(keyFilename), passphrase); - ts.load(new FileInputStream(trustFilename), passphrase); + try (FileInputStream fis = new FileInputStream(keyFilename)) { + ks.load(fis, passphrase); + } + + try (FileInputStream fis = new FileInputStream(trustFilename)) { + ts.load(fis, passphrase); + } KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, passphrase); @@ -207,127 +226,177 @@ public class SSLEngineBadBufferArrayAccess { private void runTest(boolean direct) throws Exception { boolean serverClose = direct; - serverSocket = new ServerSocket(0); - int port = serverSocket.getLocalPort(); - Thread thread = createClientThread(port, serverClose); + ServerSocket serverSocket = new ServerSocket(0); + serverPort = serverSocket.getLocalPort(); + + // Signal the client, the server is ready to accept connection. + serverCondition.countDown(); + + Thread clientThread = runClient(serverClose); + + // Try to accept a connection in 30 seconds. + Socket socket; + try { + serverSocket.setSoTimeout(30000); + socket = (Socket) serverSocket.accept(); + } catch (SocketTimeoutException ste) { + serverSocket.close(); + + // Ignore the test case if no connection within 30 seconds. + System.out.println( + "No incoming client connection in 30 seconds. " + + "Ignore in server side."); + return; + } + + // handle the connection + try { + // Is it the expected client connection? + // + // Naughty test cases or third party routines may try to + // connection to this server port unintentionally. In + // order to mitigate the impact of unexpected client + // connections and avoid intermittent failure, it should + // be checked that the accepted connection is really linked + // to the expected client. + boolean clientIsReady = + clientCondition.await(30L, TimeUnit.SECONDS); + + if (clientIsReady) { + // Run the application in server side. + runServerApplication(socket, direct, serverClose); + } else { // Otherwise, ignore + // We don't actually care about plain socket connections + // for TLS communication testing generally. Just ignore + // the test if the accepted connection is not linked to + // the expected client or the client connection timeout + // in 30 seconds. + System.out.println( + "The client is not the expected one or timeout. " + + "Ignore in server side."); + } + } catch (Exception e) { + System.out.println("Server died ..."); + e.printStackTrace(System.out); + serverException = e; + } finally { + socket.close(); + serverSocket.close(); + } + + clientThread.join(); + + if (clientException != null || serverException != null) { + throw new RuntimeException("Test failed"); + } + } + + /* + * Define the server side application of the test for the specified socket. + */ + void runServerApplication(Socket socket, boolean direct, + boolean serverClose) throws Exception { - socket = serverSocket.accept(); socket.setSoTimeout(500); - serverSocket.close(); createSSLEngine(); createBuffers(direct); - try { - boolean closed = false; + boolean closed = false; - InputStream is = socket.getInputStream(); - OutputStream os = socket.getOutputStream(); + InputStream is = socket.getInputStream(); + OutputStream os = socket.getOutputStream(); - SSLEngineResult serverResult; // results from last operation + SSLEngineResult serverResult; // results from last operation - /* - * Examining the SSLEngineResults could be much more involved, - * and may alter the overall flow of the application. - * - * For example, if we received a BUFFER_OVERFLOW when trying - * to write to the output pipe, we could reallocate a larger - * pipe, but instead we wait for the peer to drain it. - */ - byte[] inbound = new byte[8192]; - byte[] outbound = new byte[8192]; + /* + * Examining the SSLEngineResults could be much more involved, + * and may alter the overall flow of the application. + * + * For example, if we received a BUFFER_OVERFLOW when trying + * to write to the output pipe, we could reallocate a larger + * pipe, but instead we wait for the peer to drain it. + */ + byte[] inbound = new byte[8192]; + byte[] outbound = new byte[8192]; - while (!isEngineClosed(serverEngine)) { - int len = 0; + while (!isEngineClosed(serverEngine)) { + int len = 0; - // Inbound data - log("================"); + // Inbound data + log("================"); - // Read from the Client side. - try { - len = is.read(inbound); - if (len == -1) { - throw new Exception("Unexpected EOF"); - } - cTOs.put(inbound, 0, len); - } catch (SocketTimeoutException ste) { - // swallow. Nothing yet, probably waiting on us. + // Read from the Client side. + try { + len = is.read(inbound); + if (len == -1) { + throw new Exception("Unexpected EOF"); } + cTOs.put(inbound, 0, len); + } catch (SocketTimeoutException ste) { + // swallow. Nothing yet, probably waiting on us. + System.out.println("Warning: " + ste); + } - cTOs.flip(); + cTOs.flip(); - serverResult = serverEngine.unwrap(cTOs, serverIn); - log("server unwrap: ", serverResult); - runDelegatedTasks(serverResult, serverEngine); - cTOs.compact(); + serverResult = serverEngine.unwrap(cTOs, serverIn); + log("server unwrap: ", serverResult); + runDelegatedTasks(serverResult, serverEngine); + cTOs.compact(); - // Outbound data - log("----"); + // Outbound data + log("----"); - serverResult = serverEngine.wrap(serverOut, sTOc); - log("server wrap: ", serverResult); - runDelegatedTasks(serverResult, serverEngine); + serverResult = serverEngine.wrap(serverOut, sTOc); + log("server wrap: ", serverResult); + runDelegatedTasks(serverResult, serverEngine); - sTOc.flip(); + sTOc.flip(); - if ((len = sTOc.remaining()) != 0) { - sTOc.get(outbound, 0, len); - os.write(outbound, 0, len); - // Give the other side a chance to process - } + if ((len = sTOc.remaining()) != 0) { + sTOc.get(outbound, 0, len); + os.write(outbound, 0, len); + // Give the other side a chance to process + } - sTOc.compact(); + sTOc.compact(); - if (!closed && (serverOut.remaining() == 0)) { - closed = true; + if (!closed && (serverOut.remaining() == 0)) { + closed = true; - /* - * We'll alternate initiatating the shutdown. - * When the server initiates, it will take one more - * loop, but tests the orderly shutdown. - */ - if (serverClose) { - serverEngine.closeOutbound(); - } - } - - if (closed && isEngineClosed(serverEngine)) { - serverIn.flip(); - - /* - * A sanity check to ensure we got what was sent. - */ - if (serverIn.remaining() != clientMsg.length) { - throw new Exception("Client: Data length error -" + - " IF THIS FAILS, PLEASE REPORT THIS TO THE" + - " SECURITY TEAM. WE HAVE BEEN UNABLE TO" + - " RELIABLY DUPLICATE."); - } - - for (int i = 0; i < clientMsg.length; i++) { - if (clientMsg[i] != serverIn.get()) { - throw new Exception("Client: Data content error -" + - " IF THIS FAILS, PLEASE REPORT THIS TO THE" + - " SECURITY TEAM. WE HAVE BEEN UNABLE TO" + - " RELIABLY DUPLICATE."); - } - } - serverIn.compact(); + /* + * We'll alternate initiatating the shutdown. + * When the server initiates, it will take one more + * loop, but tests the orderly shutdown. + */ + if (serverClose) { + serverEngine.closeOutbound(); } } - return; - } catch (Exception e) { - serverException = e; - } finally { - socket.close(); - // Wait for the client to join up with us. - thread.join(); - if (serverException != null) { - throw serverException; - } - if (clientException != null) { - throw clientException; + if (closed && isEngineClosed(serverEngine)) { + serverIn.flip(); + + /* + * A sanity check to ensure we got what was sent. + */ + if (serverIn.remaining() != clientMsg.length) { + throw new Exception("Client: Data length error -" + + " IF THIS FAILS, PLEASE REPORT THIS TO THE" + + " SECURITY TEAM. WE HAVE BEEN UNABLE TO" + + " RELIABLY DUPLICATE."); + } + + for (int i = 0; i < clientMsg.length; i++) { + if (clientMsg[i] != serverIn.get()) { + throw new Exception("Client: Data content error -" + + " IF THIS FAILS, PLEASE REPORT THIS TO THE" + + " SECURITY TEAM. WE HAVE BEEN UNABLE TO" + + " RELIABLY DUPLICATE."); + } + } + serverIn.compact(); } } } @@ -336,56 +405,113 @@ public class SSLEngineBadBufferArrayAccess { * Create a client thread which does simple SSLSocket operations. * We'll write and read one data packet. */ - private Thread createClientThread(final int port, - final boolean serverClose) throws Exception { + private Thread runClient(final boolean serverClose) + throws Exception { Thread t = new Thread("ClientThread") { @Override public void run() { try { - Thread.sleep(1000); // Give server time to finish setup. - - sslSocket = (SSLSocket) sslc.getSocketFactory(). - createSocket("localhost", port); - OutputStream os = sslSocket.getOutputStream(); - InputStream is = sslSocket.getInputStream(); - - // write(byte[]) goes in one shot. - os.write(clientMsg); - - byte[] inbound = new byte[2048]; - int pos = 0; - - int len; -done: - while ((len = is.read(inbound, pos, 2048 - pos)) != -1) { - pos += len; - // Let the client do the closing. - if ((pos == serverMsg.length) && !serverClose) { - sslSocket.close(); - break done; - } - } - - if (pos != serverMsg.length) { - throw new Exception("Client: Data length error"); - } - - for (int i = 0; i < serverMsg.length; i++) { - if (inbound[i] != serverMsg[i]) { - throw new Exception("Client: Data content error"); - } - } + doClientSide(serverClose); } catch (Exception e) { + System.out.println("Client died ..."); + e.printStackTrace(System.out); clientException = e; } } }; + t.start(); return t; } + /* + * Define the client side of the test. + */ + void doClientSide(boolean serverClose) throws Exception { + // Wait for server to get started. + // + // The server side takes care of the issue if the server cannot + // get started in 90 seconds. The client side would just ignore + // the test case if the serer is not ready. + boolean serverIsReady = + serverCondition.await(90L, TimeUnit.SECONDS); + if (!serverIsReady) { + System.out.println( + "The server is not ready yet in 90 seconds. " + + "Ignore in client side."); + return; + } + + SSLSocketFactory sslsf = sslc.getSocketFactory(); + try (SSLSocket sslSocket = (SSLSocket)sslsf.createSocket()) { + try { + sslSocket.connect( + new InetSocketAddress("localhost", serverPort), 15000); + } catch (IOException ioe) { + // The server side may be impacted by naughty test cases or + // third party routines, and cannot accept connections. + // + // Just ignore the test if the connection cannot be + // established. + System.out.println( + "Cannot make a connection in 15 seconds. " + + "Ignore in client side."); + return; + } + + // OK, here the client and server get connected. + + // Signal the server, the client is ready to communicate. + clientCondition.countDown(); + + // There is still a chance in theory that the server thread may + // wait client-ready timeout and then quit. The chance should + // be really rare so we don't consider it until it becomes a + // real problem. + + // Run the application in client side. + runClientApplication(sslSocket, serverClose); + } + } + + /* + * Define the server side application of the test for the specified socket. + */ + void runClientApplication(SSLSocket sslSocket, boolean serverClose) + throws Exception { + + OutputStream os = sslSocket.getOutputStream(); + InputStream is = sslSocket.getInputStream(); + + // write(byte[]) goes in one shot. + os.write(clientMsg); + + byte[] inbound = new byte[2048]; + int pos = 0; + + int len; + while ((len = is.read(inbound, pos, 2048 - pos)) != -1) { + pos += len; + // Let the client do the closing. + if ((pos == serverMsg.length) && !serverClose) { + sslSocket.close(); + break; + } + } + + if (pos != serverMsg.length) { + throw new Exception("Client: Data length error"); + } + + for (int i = 0; i < serverMsg.length; i++) { + if (inbound[i] != serverMsg[i]) { + throw new Exception("Client: Data content error"); + } + } + } + /* * Using the SSLContext created during object creation, * create/configure the SSLEngines we'll use for this test. diff --git a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java index 90cfad8898c..0c718db925e 100644 --- a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java +++ b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java @@ -26,6 +26,7 @@ * @bug 8138766 * @summary New default -sigalg for keytool * @modules java.base/sun.security.tools.keytool + * @modules jdk.crypto.ec * @run main/othervm DefaultSignatureAlgorithm RSA 1024 SHA256withRSA * @run main/othervm DefaultSignatureAlgorithm RSA 3072 SHA256withRSA * @run main/othervm DefaultSignatureAlgorithm RSA 3073 SHA384withRSA diff --git a/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java b/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java index 17e2e7caa53..0b5bdf7900a 100644 --- a/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java +++ b/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java @@ -23,6 +23,15 @@ * questions. */ +/* + * @test + * @bug 8134708 + * @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded + * @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp + * @modules jdk.security.auth + * @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia + */ + import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -45,13 +54,6 @@ import java.util.List; import java.util.Set; import java.util.function.Consumer; -/* - * @test - * @bug 8134708 - * @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded - * @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp - * @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia - */ public class ExtensionsWithLDAP { /* diff --git a/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java b/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java index 479cbc10621..6fde08c73c9 100644 --- a/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java +++ b/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -21,6 +21,17 @@ * questions. */ +/* + * @test + * @bug 8049237 + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * jdk.crypto.ec + * @summary This test generates V3 certificate with all the supported + * extensions. Writes back the generated certificate in to a file and checks for + * equality with the original certificate. + */ + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -28,7 +39,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; -import static java.lang.System.out; import java.security.InvalidKeyException; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -50,15 +60,8 @@ import sun.security.util.BitArray; import sun.security.util.ObjectIdentifier; import sun.security.x509.*; -/** - * @test - * @bug 8049237 - * @modules java.base/sun.security.x509 - * java.base/sun.security.util - * @summary This test generates V3 certificate with all the supported - * extensions. Writes back the generated certificate in to a file and checks for - * equality with the original certificate. - */ +import static java.lang.System.out; + public class V3Certificate { public static final String V3_FILE = "certV3"; diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java index 31384717ac9..998e1b2eed2 100644 --- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java +++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java @@ -31,12 +31,10 @@ * @run main BasicLauncherTest */ -import static jdk.testlibrary.Asserts.assertTrue; - import java.io.BufferedReader; import java.io.IOException; +import java.io.OutputStream; import java.io.InputStreamReader; -import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Arrays; @@ -84,15 +82,56 @@ public class BasicLauncherTest { ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand()); processBuilder.redirectError(ProcessBuilder.Redirect.INHERIT); Process toolProcess = processBuilder.start(); - toolProcess.getOutputStream().write("quit\n".getBytes()); - toolProcess.getOutputStream().close(); + + try (OutputStream out = toolProcess.getOutputStream()) { + out.write("universe\n".getBytes()); + out.write("printmdo -a\n".getBytes()); + out.write("quit\n".getBytes()); + } // By default child process output stream redirected to pipe, so we are reading it in foreground. - BufferedReader reader = new BufferedReader(new InputStreamReader(toolProcess.getInputStream())); + Exception unexpected = null; + try (BufferedReader reader = + new BufferedReader(new InputStreamReader(toolProcess.getInputStream()))) { + String line; + String unexpectedMsg = + "One or more of 'VirtualCallData', 'CounterData', " + + "'ReceiverTypeData', 'bci', 'MethodData' " + + "or 'java/lang/Object' not found"; + boolean knownClassFound = false; + boolean knownProfileDataTypeFound = false; + boolean knownTokensFound = false; - String line; - while ((line = reader.readLine()) != null) { - System.out.println(line.trim()); + while ((line = reader.readLine()) != null) { + line = line.trim(); + System.out.println(line); + + if (line.contains("unknown subtype of CollectedHeap")) { + unexpected = new RuntimeException("CollectedHeap type should be known."); + break; + } + else if (line.contains("missing reason for ")) { + unexpected = new RuntimeException("missing reason for "); + break; + } + if (line.contains("VirtualCallData") || + line.contains("CounterData") || + line.contains("ReceiverTypeData")) { + knownProfileDataTypeFound = true; + } + if (line.contains("bci") || + line.contains("MethodData")) { + knownTokensFound = true; + } + if (line.contains("java/lang/Object")) { + knownClassFound = true; + } + } + if ((knownClassFound == false) || + (knownTokensFound == false) || + (knownProfileDataTypeFound == false)) { + unexpected = new RuntimeException(unexpectedMsg); + } } toolProcess.waitFor(); @@ -100,6 +139,14 @@ public class BasicLauncherTest { if (toolProcess.exitValue() != 0) { throw new RuntimeException("FAILED CLHSDB terminated with non-zero exit code " + toolProcess.exitValue()); } + + if (unexpected != null) { + throw unexpected; + } + + if (unexpected != null) { + throw unexpected; + } } catch (Exception ex) { throw new RuntimeException("Test ERROR " + ex, ex); } finally { @@ -183,21 +230,6 @@ public class BasicLauncherTest { Arrays.asList(toolArgs)); } - public static void testHeapDump() throws IOException { - File dump = new File("jhsdb.jmap.dump." + - System.currentTimeMillis() + ".hprof"); - if (dump.exists()) { - dump.delete(); - } - dump.deleteOnExit(); - - launch("heap written to", null, "jmap", - "--binaryheap", "--dumpfile=" + dump.getAbsolutePath()); - - assertTrue(dump.exists() && dump.isFile(), - "Could not create dump file " + dump.getAbsolutePath()); - } - public static void main(String[] args) throws IOException { @@ -216,8 +248,6 @@ public class BasicLauncherTest { "System Properties info not available", "jinfo"); launch("java.threads", null, "jsnap"); - testHeapDump(); - // The test throws RuntimeException on error. // IOException is thrown if LingeredApp can't start because of some bad // environment condition diff --git a/jdk/test/sun/tools/jhsdb/HeapDumpTest.java b/jdk/test/sun/tools/jhsdb/HeapDumpTest.java new file mode 100644 index 00000000000..59772a3c421 --- /dev/null +++ b/jdk/test/sun/tools/jhsdb/HeapDumpTest.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2016, 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 8163346 + * @summary Test hashing of extended characters in Serviceability Agent. + * @library /test/lib + * @library /lib/testlibrary + * @compile -encoding utf8 HeapDumpTest.java + * @run main/timeout=240 HeapDumpTest + */ + +import static jdk.testlibrary.Asserts.assertTrue; + +import java.io.IOException; +import java.io.File; +import java.util.List; +import java.util.Arrays; +import jdk.testlibrary.JDKToolLauncher; +import jdk.testlibrary.OutputAnalyzer; +import jdk.testlibrary.ProcessTools; +import jdk.test.lib.apps.LingeredApp; +import jdk.testlibrary.Platform; + +public class HeapDumpTest { + + private static LingeredAppWithExtendedChars theApp = null; + + /** + * + * @param vmArgs - tool arguments to launch jhsdb + * @return exit code of tool + */ + public static void launch(String expectedMessage, List toolArgs) + throws IOException { + + System.out.println("Starting LingeredApp"); + try { + theApp = new LingeredAppWithExtendedChars(); + LingeredApp.startApp(Arrays.asList("-Xmx256m"), theApp); + + System.out.println(theApp.\u00CB); + System.out.println("Starting " + toolArgs.get(0) + " against " + theApp.getPid()); + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb"); + + for (String cmd : toolArgs) { + launcher.addToolArg(cmd); + } + + launcher.addToolArg("--pid=" + Long.toString(theApp.getPid())); + + ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand()); + processBuilder.redirectError(ProcessBuilder.Redirect.INHERIT); + OutputAnalyzer output = ProcessTools.executeProcess(processBuilder); + System.out.println("stdout:"); + System.out.println(output.getStdout()); + System.out.println("stderr:"); + System.out.println(output.getStderr()); + output.shouldContain(expectedMessage); + output.shouldHaveExitValue(0); + + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + } + + public static void launch(String expectedMessage, String... toolArgs) + throws IOException { + + launch(expectedMessage, Arrays.asList(toolArgs)); + } + + public static void testHeapDump() throws IOException { + File dump = new File("jhsdb.jmap.heap." + + System.currentTimeMillis() + ".hprof"); + if (dump.exists()) { + dump.delete(); + } + + launch("heap written to", "jmap", + "--binaryheap", "--dumpfile=" + dump.getAbsolutePath()); + + assertTrue(dump.exists() && dump.isFile(), + "Could not create dump file " + dump.getAbsolutePath()); + + dump.delete(); + } + + public static void main(String[] args) + throws IOException { + + if (!Platform.shouldSAAttach()) { + // Silently skip the test if we don't have enough permissions to attach + System.err.println("Error! Insufficient permissions to attach - test skipped."); + return; + } + + + testHeapDump(); + + // The test throws RuntimeException on error. + // IOException is thrown if LingeredApp can't start because of some bad + // environment condition + System.out.println("Test PASSED"); + } +} diff --git a/jdk/test/sun/tools/jhsdb/LingeredAppWithExtendedChars.java b/jdk/test/sun/tools/jhsdb/LingeredAppWithExtendedChars.java new file mode 100644 index 00000000000..90431d25ab9 --- /dev/null +++ b/jdk/test/sun/tools/jhsdb/LingeredAppWithExtendedChars.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016, 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. + */ +import jdk.test.lib.apps.LingeredApp; + +public class LingeredAppWithExtendedChars extends LingeredApp { + + public static int \u00CB = 1; + + public static void main(String args[]) { + LingeredApp.main(args); + } + } diff --git a/jdk/test/sun/tools/jps/TestJpsJar.java b/jdk/test/sun/tools/jps/TestJpsJar.java index 00cc5423018..97d744ec85f 100644 --- a/jdk/test/sun/tools/jps/TestJpsJar.java +++ b/jdk/test/sun/tools/jps/TestJpsJar.java @@ -38,7 +38,7 @@ import jdk.testlibrary.ProcessTools; * @library /lib/testlibrary * @modules jdk.jartool/sun.tools.jar * java.management - * @build jdk.testlibrary.* JpsHelper JpsBase + * @build JpsHelper JpsBase * @run main/othervm TestJpsJar */ public class TestJpsJar { diff --git a/jdk/test/tools/jlink/IntegrationTest.java b/jdk/test/tools/jlink/IntegrationTest.java index ad0a01bd541..970e1371131 100644 --- a/jdk/test/tools/jlink/IntegrationTest.java +++ b/jdk/test/tools/jlink/IntegrationTest.java @@ -210,25 +210,29 @@ public class IntegrationTest { props.load(reader); } - if (props.getProperty("JAVA_VERSION") == null) { - throw new AssertionError("release file does not contain JAVA_VERSION"); - } - - if (props.getProperty("OS_NAME") == null) { - throw new AssertionError("release file does not contain OS_NAME"); - } - - if (props.getProperty("OS_ARCH") == null) { - throw new AssertionError("release file does not contain OS_ARCH"); - } - - if (props.getProperty("OS_VERSION") == null) { - throw new AssertionError("release file does not contain OS_VERSION"); - } + checkReleaseProperty(props, "JAVA_VERSION"); + checkReleaseProperty(props, "JAVA_FULL_VERSION"); + checkReleaseProperty(props, "OS_NAME"); + checkReleaseProperty(props, "OS_ARCH"); + checkReleaseProperty(props, "OS_VERSION"); if (!Files.exists(output.resolve("toto.txt"))) { throw new AssertionError("Post processing not called"); } } + + static void checkReleaseProperty(Properties props, String name) { + if (! props.containsKey(name)) { + throw new AssertionError("release file does not contain property : " + name); + } + + // property value is of min. length 3 and double quoted at the ends. + String value = props.getProperty(name); + if (value.length() < 3 || + value.charAt(0) != '"' || + value.charAt(value.length() - 1) != '"') { + throw new AssertionError("release property " + name + " is not quoted property"); + } + } } diff --git a/langtools/.hgtags b/langtools/.hgtags index f4500a88ff0..cddf72d74e6 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -377,3 +377,4 @@ aebfafc43714d5a27d5064d8a0011eaccde633cf jdk-9+131 2c17b65a37a8d7afdb9f96d5f11b28a3f21c78f2 jdk-9+132 7efa4b3477b2b93edbdb4abf827b74c6391f056e jdk-9+133 f08683786207a48b652266b3b7b908e6c863c3fc jdk-9+134 +af5eb8f3ffd21288305a54ea177ffad75021a741 jdk-9+135 diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index a8e79f79928..e9a423ffd95 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -426,8 +426,8 @@ public class JavaCompiler { verboseCompilePolicy = options.isSet("verboseCompilePolicy"); - if (options.isSet("shouldstop.at") && - CompileState.valueOf(options.get("shouldstop.at")) == CompileState.ATTR) + if (options.isSet("should-stop.at") && + CompileState.valueOf(options.get("should-stop.at")) == CompileState.ATTR) compilePolicy = CompilePolicy.ATTR_ONLY; else compilePolicy = CompilePolicy.decode(options.get("compilePolicy")); @@ -440,14 +440,14 @@ public class JavaCompiler { : null; shouldStopPolicyIfError = - options.isSet("shouldstop.at") // backwards compatible - ? CompileState.valueOf(options.get("shouldstop.at")) - : options.isSet("shouldstop.ifError") - ? CompileState.valueOf(options.get("shouldstop.ifError")) + options.isSet("should-stop.at") // backwards compatible + ? CompileState.valueOf(options.get("should-stop.at")) + : options.isSet("should-stop.ifError") + ? CompileState.valueOf(options.get("should-stop.ifError")) : CompileState.INIT; shouldStopPolicyIfNoError = - options.isSet("shouldstop.ifNoError") - ? CompileState.valueOf(options.get("shouldstop.ifNoError")) + options.isSet("should-stop.ifNoError") + ? CompileState.valueOf(options.get("should-stop.ifNoError")) : CompileState.GENERATE; if (options.isUnset("diags.legacy")) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java index 6d39408b095..03327387b47 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java @@ -509,33 +509,21 @@ public enum Option { XDIAGS("-Xdiags:", "opt.diags", EXTENDED, BASIC, ONEOF, "compact", "verbose"), - XDEBUG("-Xdebug:", null, HIDDEN, BASIC) { + DEBUG("--debug:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { - String p = option.substring(option.indexOf(':') + 1).trim(); - String[] subOptions = p.split(";"); - for (String subOption : subOptions) { - subOption = "debug." + subOption.trim(); - XD.process(helper, subOption, subOption); - } - return false; + return HiddenGroup.DEBUG.process(helper, option); } }, - XSHOULDSTOP("-Xshouldstop:", null, HIDDEN, BASIC) { + SHOULDSTOP("--should-stop:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { - String p = option.substring(option.indexOf(':') + 1).trim(); - String[] subOptions = p.split(";"); - for (String subOption : subOptions) { - subOption = "shouldstop." + subOption.trim(); - XD.process(helper, subOption, subOption); - } - return false; + return HiddenGroup.SHOULDSTOP.process(helper, option); } }, - DIAGS("-diags:", null, HIDDEN, BASIC) { + DIAGS("--diags:", null, HIDDEN, BASIC) { @Override public boolean process(OptionHelper helper, String option) { return HiddenGroup.DIAGS.process(helper, option); @@ -754,7 +742,12 @@ public enum Option { } enum HiddenGroup { - DIAGS("diags"); + DIAGS("diags"), + DEBUG("debug"), + SHOULDSTOP("should-stop"); + + static final Set skipSet = new java.util.HashSet<>( + Arrays.asList("--diags:", "--debug:", "--should-stop:")); final String text; @@ -771,6 +764,10 @@ public enum Option { } return false; } + + static boolean skip(String name) { + return skipSet.contains(name); + } } /** @@ -930,7 +927,7 @@ public enum Option { } private boolean matches(String option, String name) { - if (name.startsWith("--")) { + if (name.startsWith("--") && !HiddenGroup.skip(name)) { return option.equals(name) || hasArg() && option.startsWith(name + "="); } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java index a6299916709..4f212a86a19 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java @@ -313,7 +313,7 @@ public class Options { } // Enable dependency generation - args.add("-Xdebug:completionDeps=source,class"); + args.add("--debug:completionDeps=source,class"); // This can't be anything but 'none'. Enforced by sjavac main method. args.add("-implicit:" + implicitPolicy); diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java index 5712a2202fe..7b9d73c1a66 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java @@ -95,24 +95,6 @@ class ReplParser extends JavacParser { mods = modifiersOpt(); } - if (token.kind == PACKAGE) { - int packagePos = token.pos; - List annotations = List.nil(); - seenPackage = true; - if (mods != null) { - checkNoMods(mods.flags); - annotations = mods.annotations; - mods = null; - } - nextToken(); - JCExpression pid = qualident(false); - accept(SEMI); - JCPackageDecl pd = F.at(packagePos).PackageDecl(annotations, pid); - attach(pd, firstToken.comment(CommentStyle.JAVADOC)); - storeEnd(pd, token.pos); - defs.append(pd); - } - boolean firstTypeDecl = true; while (token.kind != EOF) { if (token.pos > 0 && token.pos <= endPosTable.errorEndPos) { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java index 090bfb6d969..309f4b4ba09 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java @@ -838,8 +838,31 @@ class SourceCodeAnalysisImpl extends SourceCodeAnalysis { } private Stream localElements(Scope scope) { - @SuppressWarnings("unchecked") - Stream elements = Util.stream((Iterable)scope.getLocalElements()); + //workaround for: JDK-8024687 + Iterable elementsIt = () -> new Iterator() { + Iterator it = scope.getLocalElements().iterator(); + @Override + public boolean hasNext() { + while (true) { + try { + return it.hasNext(); + } catch (CompletionFailure cf) { + //ignore... + } + } + } + @Override + public Element next() { + while (true) { + try { + return it.next(); + } catch (CompletionFailure cf) { + //ignore... + } + } + } + }; + Stream elements = Util.stream(elementsIt); if (scope.getEnclosingScope() != null && scope.getEnclosingClass() != scope.getEnclosingScope().getEnclosingClass()) { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java index 191d43cc088..28ed2d2acb8 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java @@ -222,7 +222,7 @@ class TaskFactory { this(wraps.stream(), new WrapSourceHandler(), Util.join(new String[] { - "-Xshouldstop:at=FLOW", "-Xlint:unchecked", + "--should-stop:at=FLOW", "-Xlint:unchecked", "-proc:none" }, extraArgs)); } diff --git a/langtools/test/jdk/jshell/CompletionSuggestionTest.java b/langtools/test/jdk/jshell/CompletionSuggestionTest.java index 8c2c723bc1e..b3a40be8e87 100644 --- a/langtools/test/jdk/jshell/CompletionSuggestionTest.java +++ b/langtools/test/jdk/jshell/CompletionSuggestionTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8141092 8153761 + * @bug 8131025 8141092 8153761 * @summary Test Completion * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -610,4 +610,26 @@ public class CompletionSuggestionTest extends KullaTesting { keepParameterNames.setAccessible(true); keepParameterNames.set(getAnalysis(), new String[0]); } + + public void testBrokenClassFile2() throws IOException { + Path broken = outDir.resolve("broken"); + compiler.compile(broken, + "package p;\n" + + "public class BrokenA {\n" + + "}", + "package p.q;\n" + + "public class BrokenB {\n" + + "}", + "package p;\n" + + "public class BrokenC {\n" + + "}"); + Path cp = compiler.getPath(broken); + Path target = cp.resolve("p").resolve("BrokenB.class"); + Files.deleteIfExists(target); + Files.move(cp.resolve("p").resolve("q").resolve("BrokenB.class"), target); + addToClasspath(cp); + + assertEval("import p.*;"); + assertCompletion("Broke|", "BrokenA", "BrokenC"); + } } diff --git a/langtools/test/jdk/jshell/RejectedFailedTest.java b/langtools/test/jdk/jshell/RejectedFailedTest.java index b9d8bece7cb..5411d5d8aee 100644 --- a/langtools/test/jdk/jshell/RejectedFailedTest.java +++ b/langtools/test/jdk/jshell/RejectedFailedTest.java @@ -22,7 +22,7 @@ */ /* - * @test + * @test 8080352 * @summary Tests for hard errors, like syntax errors * @build KullaTesting * @run testng RejectedFailedTest @@ -81,6 +81,7 @@ public class RejectedFailedTest extends KullaTesting { " a b c", ")", "class interface A", + "package foo;" }; checkByKind(inputsErroneous, Kind.ERRONEOUS); } diff --git a/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java b/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java index 728ddbda217..77bf387f7e7 100644 --- a/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java +++ b/langtools/test/tools/javac/ClassFileModifiers/ClassModifiers.java @@ -28,7 +28,7 @@ * file are correct, including those within InnerClasses attributes. * @author John Rose (jrose). Entered as a regression test by Bill Maddox (maddox). * - * @compile/ref=ClassModifiers.out -Xdebug:dumpmodifiers=ci ClassModifiers.java + * @compile/ref=ClassModifiers.out --debug:dumpmodifiers=ci ClassModifiers.java * */ diff --git a/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java b/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java index b6697d0afa0..fa134f816ae 100644 --- a/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java +++ b/langtools/test/tools/javac/ClassFileModifiers/MemberModifiers.java @@ -26,7 +26,7 @@ * @bug 4249112 4785453 * @summary Verify that implicit member modifiers are set correctly. * - * @compile/ref=MemberModifiers.out -Xdebug:dumpmodifiers=cfm MemberModifiers.java + * @compile/ref=MemberModifiers.out --debug:dumpmodifiers=cfm MemberModifiers.java */ // Currently, we check only that members of final classes are not final. diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java index 0d48df3d2a4..04008efcfb3 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java @@ -3,8 +3,8 @@ * @bug 6722234 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars T6722234a.java - * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6722234a.java + * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars T6722234a.java + * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6722234a.java */ class T6722234a { diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java index 6c58f552b56..47a1716cf2a 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java @@ -3,8 +3,8 @@ * @bug 6722234 8078024 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics -diags:formatterOptions=simpleNames T6722234b.java - * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics -diags:formatterOptions=simpleNames,where T6722234b.java + * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234b.java + * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags:formatterOptions=simpleNames,where T6722234b.java */ import java.util.*; diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java index 443e53b921f..4b12953003d 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java @@ -3,7 +3,7 @@ * @bug 6722234 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234c.out -XDrawDiagnostics -diags:formatterOptions=simpleNames T6722234c.java + * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234c.java */ class T6722234c { diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java index 7cdcbf7c26f..95fa4fb24ab 100644 --- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java +++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java @@ -3,8 +3,8 @@ * @bug 6722234 8078024 * @summary javac diagnostics need better integration with the type-system * @author mcimadamore - * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics -diags:formatterOptions=where T6722234d.java - * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics -diags:formatterOptions=where,simpleNames T6722234d.java + * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags:formatterOptions=where T6722234d.java + * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags:formatterOptions=where,simpleNames T6722234d.java */ class T6722234d { diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java index 2117363a939..1713c05e202 100644 --- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java @@ -3,7 +3,7 @@ * @bug 6862608 * @summary rich diagnostic sometimes contain wrong type variable numbering * @author mcimadamore - * @compile/fail/ref=T6862608a.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6862608a.java + * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608a.java */ diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java index 9889b3bc8c9..14c61a33142 100644 --- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java @@ -3,7 +3,7 @@ * @bug 6862608 * @summary rich diagnostic sometimes contain wrong type variable numbering * @author mcimadamore - * @compile/fail/ref=T6862608b.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T6862608b.java + * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608b.java */ class T66862608b { diff --git a/langtools/test/tools/javac/Diagnostics/7010608/Test.java b/langtools/test/tools/javac/Diagnostics/7010608/Test.java index 9265995685e..332d26a0d9d 100644 --- a/langtools/test/tools/javac/Diagnostics/7010608/Test.java +++ b/langtools/test/tools/javac/Diagnostics/7010608/Test.java @@ -46,9 +46,9 @@ public class Test { try { test(Arrays.asList(), "myfo://test:1: error: cannot find symbol"); - test(Arrays.asList("-diags:layout=OLD"), + test(Arrays.asList("--diags:layout=OLD"), "myfo://test:1: cannot find symbol"); - test(Arrays.asList("-diags:legacy"), + test(Arrays.asList("--diags:legacy"), "myfo://test:1: cannot find symbol"); } finally { Locale.setDefault(prev); diff --git a/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java b/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java index 0ab5f0229c9..74a664cd160 100644 --- a/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java +++ b/langtools/test/tools/javac/Diagnostics/8010387/T8010387.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8010387 * @summary rich diagnostic sometimes contain wrong type variable numbering - * @compile/fail/ref=T8010387.out -XDrawDiagnostics -diags:formatterOptions=disambiguateTvars,where T8010387.java + * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T8010387.java */ abstract class T8010387 { diff --git a/langtools/test/tools/javac/InterfaceMemberClassModifiers.java b/langtools/test/tools/javac/InterfaceMemberClassModifiers.java index 638cb731ff9..bb5fd1367e6 100644 --- a/langtools/test/tools/javac/InterfaceMemberClassModifiers.java +++ b/langtools/test/tools/javac/InterfaceMemberClassModifiers.java @@ -4,7 +4,7 @@ * @summary Verify that invalid access modifiers on interface members don't cause crash. * @author maddox * - * @compile/fail/ref=InterfaceMemberClassModifiers.out -diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java + * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java */ public interface InterfaceMemberClassModifiers { diff --git a/langtools/test/tools/javac/T5003235/T5003235a.java b/langtools/test/tools/javac/T5003235/T5003235a.java index f30ad7a8ebf..1eea9628b3b 100644 --- a/langtools/test/tools/javac/T5003235/T5003235a.java +++ b/langtools/test/tools/javac/T5003235/T5003235a.java @@ -3,7 +3,7 @@ * @bug 5003235 * @summary Private inner class accessible from subclasses * @author Peter von der Ah\u00e9 - * @compile/fail/ref=T5003235a.out -diags:layout=%b:%l:%_%m T5003235a.java + * @compile/fail/ref=T5003235a.out --diags:layout=%b:%l:%_%m T5003235a.java */ class Super { diff --git a/langtools/test/tools/javac/T5003235/T5003235b.java b/langtools/test/tools/javac/T5003235/T5003235b.java index 3384f909b6c..629e077dba5 100644 --- a/langtools/test/tools/javac/T5003235/T5003235b.java +++ b/langtools/test/tools/javac/T5003235/T5003235b.java @@ -3,7 +3,7 @@ * @bug 5003235 * @summary Accessibility of private inner class * @author Peter von der Ah\u00e9 - * @compile/fail/ref=T5003235b.out -diags:layout=%b:%l:%_%m T5003235b.java + * @compile/fail/ref=T5003235b.out --diags:layout=%b:%l:%_%m T5003235b.java */ class Outer { diff --git a/langtools/test/tools/javac/T6214885.java b/langtools/test/tools/javac/T6214885.java index 73fff2c10a9..f79b752ecbc 100644 --- a/langtools/test/tools/javac/T6214885.java +++ b/langtools/test/tools/javac/T6214885.java @@ -2,8 +2,8 @@ * @test /nodynamiccopyright/ * @bug 6214885 * @summary This test exercises features provided by the new internal Diagnostics API - * @compile/fail/ref=T6214885a.out -diags:layout=%b:%l%_%t%m|%p%m T6214885.java - * @compile/fail/ref=T6214885b.out -diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java + * @compile/fail/ref=T6214885a.out --diags:layout=%b:%l%_%t%m|%p%m T6214885.java + * @compile/fail/ref=T6214885b.out --diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java */ class T6214885 { diff --git a/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java b/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java index 83707369e62..49fd4d46cf7 100644 --- a/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java +++ b/langtools/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8026963 * @summary type annotations code crashes for lambdas with void argument - * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics -Xshouldstop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java + * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java */ public class TypeAnnotationsCrashWithErroneousTreeTest { diff --git a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java index 61809f98a25..263a145af38 100644 --- a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java +++ b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java @@ -237,7 +237,7 @@ public class VerifyErroneousAnnotationsAttributed { JavacTask task = tool.getTask(null, fm, devNull, - Arrays.asList("-Xshouldstop:at=FLOW"), + Arrays.asList("--should-stop:at=FLOW"), null, Arrays.asList(new MyFileObject(code))); diff --git a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java index 0fae6e01d5d..bea25e934c8 100644 --- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java +++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java @@ -54,7 +54,7 @@ public class AfterMethodTypeParams { String test = TEMPLATE.replace("CONTENT", tc.snippet); List files = Arrays.asList(new MyFileObject(test)); StringWriter out = new StringWriter(); - List options = Arrays.asList("-XDrawDiagnostics", "-Xshouldstop:at=FLOW"); + List options = Arrays.asList("-XDrawDiagnostics", "--should-stop:at=FLOW"); JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files); new TreePathScanner() { diff --git a/langtools/test/tools/javac/api/6731573/T6731573.java b/langtools/test/tools/javac/api/6731573/T6731573.java index 141cc9d7234..435e2b26f98 100644 --- a/langtools/test/tools/javac/api/6731573/T6731573.java +++ b/langtools/test/tools/javac/api/6731573/T6731573.java @@ -62,8 +62,8 @@ public class T6731573 extends ToolTester { enum SourceLine { STANDARD(null), - ENABLED("-diags:showSource=true"), - DISABLED("-diags:showSource=false"); + ENABLED("--diags:showSource=true"), + DISABLED("--diags:showSource=false"); String optValue; diff --git a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java index 1b51e2af078..b55053c7a81 100644 --- a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java +++ b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java @@ -63,11 +63,11 @@ public class EventsBalancedTest { test(null, Arrays.asList(b, a)); for (CompileState stop : CompileState.values()) { - test(Arrays.asList("-Xshouldstop:ifNoError=" + stop, - "-Xshouldstop:ifError=" + stop), + test(Arrays.asList("--should-stop:ifNoError=" + stop, + "--should-stop:ifError=" + stop), Arrays.asList(a, b)); - test(Arrays.asList("-Xshouldstop:ifNoError=" + stop, - "-Xshouldstop:ifError=" + stop), + test(Arrays.asList("--should-stop:ifNoError=" + stop, + "--should-stop:ifError=" + stop), Arrays.asList(b, a)); } } diff --git a/langtools/test/tools/javac/completionDeps/DepsAndAnno.java b/langtools/test/tools/javac/completionDeps/DepsAndAnno.java index 072010bc40e..8ba7f54e183 100644 --- a/langtools/test/tools/javac/completionDeps/DepsAndAnno.java +++ b/langtools/test/tools/javac/completionDeps/DepsAndAnno.java @@ -47,7 +47,7 @@ public class DepsAndAnno { public static void main(String[] args) { ToolBox toolBox = new ToolBox(); new JavacTask(toolBox, Task.Mode.CMDLINE) - .options("-Xdebug:completionDeps") + .options("--debug:completionDeps") .outdir(".") .files(ToolBox.testSrc + "/DepsAndAnno.java") .run(); diff --git a/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java b/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java index 86501ea091d..95912f01c52 100644 --- a/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java +++ b/langtools/test/tools/javac/completionDeps/DepsAndDocLint.java @@ -25,7 +25,7 @@ * @test * @bug 8078389 * @summary Make sure there is no interference between completionDeps and doclint - * @compile -Xdebug:completionDeps -Xdoclint DepsAndDocLint.java + * @compile --debug:completionDeps -Xdoclint DepsAndDocLint.java */ public class DepsAndDocLint { diff --git a/langtools/test/tools/javac/diags/CheckResourceKeys.java b/langtools/test/tools/javac/diags/CheckResourceKeys.java index dfd43d6e9c2..dde2681054b 100644 --- a/langtools/test/tools/javac/diags/CheckResourceKeys.java +++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java @@ -260,8 +260,8 @@ public class CheckResourceKeys { // ignore debug flag names if (cs.startsWith("debug.")) continue; - // ignore shouldstop flag names - if (cs.startsWith("shouldstop.")) + // ignore should-stop flag names + if (cs.startsWith("should-stop.")) continue; // ignore diagsformat flag names if (cs.startsWith("diags.")) diff --git a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java index 8eb43ad566a..bb324afa790 100644 --- a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java +++ b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound.java @@ -23,7 +23,7 @@ // key: compiler.misc.applicable.method.found // key: compiler.note.verbose.resolve.multi -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class ApplicableMethodFound { diff --git a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java index 67e70c3423e..5ecca3a329f 100644 --- a/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java +++ b/langtools/test/tools/javac/diags/examples/ApplicableMethodFound1.java @@ -24,7 +24,7 @@ // key: compiler.misc.applicable.method.found.1 // key: compiler.note.verbose.resolve.multi // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class ApplicableMethodFound1 { diff --git a/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java b/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java index f0c2c853dad..59bfd4c37f8 100644 --- a/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java +++ b/langtools/test/tools/javac/diags/examples/DeferredMethodInst.java @@ -25,7 +25,7 @@ // key: compiler.note.verbose.resolve.multi // key: compiler.note.deferred.method.inst // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success,deferred-inference +// options: --debug:verboseResolution=applicable,success,deferred-inference class DeferredMethodInst { diff --git a/langtools/test/tools/javac/diags/examples/LambdaStat.java b/langtools/test/tools/javac/diags/examples/LambdaStat.java index a57b4e33778..c3ee38d6f8e 100644 --- a/langtools/test/tools/javac/diags/examples/LambdaStat.java +++ b/langtools/test/tools/javac/diags/examples/LambdaStat.java @@ -22,7 +22,7 @@ */ // key: compiler.note.lambda.stat -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class LambdaStat { Runnable r = ()->{}; diff --git a/langtools/test/tools/javac/diags/examples/MrefStat.java b/langtools/test/tools/javac/diags/examples/MrefStat.java index 5d79977c1f1..7f84baa8ca0 100644 --- a/langtools/test/tools/javac/diags/examples/MrefStat.java +++ b/langtools/test/tools/javac/diags/examples/MrefStat.java @@ -22,7 +22,7 @@ */ // key: compiler.note.mref.stat -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class MrefStat { Runnable r = MrefStat::m; diff --git a/langtools/test/tools/javac/diags/examples/MrefStat1.java b/langtools/test/tools/javac/diags/examples/MrefStat1.java index b3128eedbe7..c4bdf4cff2d 100644 --- a/langtools/test/tools/javac/diags/examples/MrefStat1.java +++ b/langtools/test/tools/javac/diags/examples/MrefStat1.java @@ -22,7 +22,7 @@ */ // key: compiler.note.mref.stat.1 -// options: -Xdebug:dumpLambdaToMethodStats +// options: --debug:dumpLambdaToMethodStats class MrefStat1 { diff --git a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java index edbaabe8c6e..dc199bc3e38 100644 --- a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java +++ b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java @@ -26,7 +26,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -Xdebug:verboseResolution=inapplicable,failure +// options: --debug:verboseResolution=inapplicable,failure class NotApplicableMethodFound { diff --git a/langtools/test/tools/javac/diags/examples/PartialInstSig.java b/langtools/test/tools/javac/diags/examples/PartialInstSig.java index e2a9c8e0aa0..4a56058856f 100644 --- a/langtools/test/tools/javac/diags/examples/PartialInstSig.java +++ b/langtools/test/tools/javac/diags/examples/PartialInstSig.java @@ -24,7 +24,7 @@ // key: compiler.misc.applicable.method.found.1 // key: compiler.note.verbose.resolve.multi // key: compiler.misc.partial.inst.sig -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class PartialInstSig { diff --git a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java index 40108785d0e..c097c74085a 100644 --- a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java +++ b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti.java @@ -23,7 +23,7 @@ // key: compiler.misc.applicable.method.found // key: compiler.note.verbose.resolve.multi -// options: -Xdebug:verboseResolution=applicable,success +// options: --debug:verboseResolution=applicable,success class VerboseResolveMulti { diff --git a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java index d9a5b8bcc3e..33e7a2deef4 100644 --- a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java +++ b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java @@ -26,7 +26,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -Xdebug:verboseResolution=inapplicable,failure +// options: --debug:verboseResolution=inapplicable,failure class VerboseResolveMulti1 { diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured.java b/langtools/test/tools/javac/diags/examples/WhereCaptured.java index 5ea17aea1ed..22fc86530dd 100644 --- a/langtools/test/tools/javac/diags/examples/WhereCaptured.java +++ b/langtools/test/tools/javac/diags/examples/WhereCaptured.java @@ -28,7 +28,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.incompatible.eq.bounds // key: compiler.misc.captured.type -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java index f5ce62e2188..26fdf3e8f5b 100644 --- a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java +++ b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java @@ -29,7 +29,7 @@ // key: compiler.misc.incompatible.eq.bounds // key: compiler.misc.captured.type // key: compiler.misc.type.null -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java b/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java index eb894a9f2cb..fb060c89c1e 100644 --- a/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java +++ b/langtools/test/tools/javac/diags/examples/WhereFreshTvar.java @@ -25,7 +25,7 @@ // key: compiler.misc.where.description.typevar // key: compiler.err.prob.found.req // key: compiler.misc.inconvertible.types -// options: -diags:formatterOptions=where,simpleNames +// options: --diags:formatterOptions=where,simpleNames // run: simple import java.util.*; diff --git a/langtools/test/tools/javac/diags/examples/WhereIntersection.java b/langtools/test/tools/javac/diags/examples/WhereIntersection.java index 8b8a6fbd612..beec1d7cd6e 100644 --- a/langtools/test/tools/javac/diags/examples/WhereIntersection.java +++ b/langtools/test/tools/javac/diags/examples/WhereIntersection.java @@ -26,7 +26,7 @@ // key: compiler.misc.where.description.intersection.1 // key: compiler.misc.where.intersection // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereIntersection { diff --git a/langtools/test/tools/javac/diags/examples/WhereIntersection2.java b/langtools/test/tools/javac/diags/examples/WhereIntersection2.java index 6850627db88..91cab029c46 100644 --- a/langtools/test/tools/javac/diags/examples/WhereIntersection2.java +++ b/langtools/test/tools/javac/diags/examples/WhereIntersection2.java @@ -29,7 +29,7 @@ // key: compiler.misc.where.description.intersection // key: compiler.misc.where.intersection // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereIntersection2 { diff --git a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java index 9adca945a28..55097a8ce6a 100644 --- a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java +++ b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java @@ -27,7 +27,7 @@ // key: compiler.err.cant.apply.symbol // key: compiler.misc.no.conforming.assignment.exists // key: compiler.misc.inconvertible.types -// options: -diags:formatterOptions=where,disambiguateTvars +// options: --diags:formatterOptions=where,disambiguateTvars // run: simple class WhereTypeVar { diff --git a/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java b/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java index 41341f68275..1f6f51b9431 100644 --- a/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java +++ b/langtools/test/tools/javac/diags/examples/WhereTypeVar2.java @@ -25,7 +25,7 @@ // key: compiler.misc.where.description.typevar // key: compiler.misc.where.typevar // key: compiler.err.prob.found.req -// options: -diags:formatterOptions=where +// options: --diags:formatterOptions=where // run: simple class WhereTypeVar2 { diff --git a/langtools/test/tools/javac/failover/CheckAttributedTree.java b/langtools/test/tools/javac/failover/CheckAttributedTree.java index b9bb22bac2d..6c2d2cbc60d 100644 --- a/langtools/test/tools/javac/failover/CheckAttributedTree.java +++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java @@ -311,7 +311,7 @@ public class CheckAttributedTree { final List trees = new ArrayList<>(); Iterable elems = newCompilationTask() .withWriter(pw) - .withOption("-Xshouldstop:at=ATTR") + .withOption("--should-stop:at=ATTR") .withOption("-XDverboseCompilePolicy") .withSource(files.iterator().next()) .withListener(new TaskListener() { diff --git a/langtools/test/tools/javac/failover/FailOver01.java b/langtools/test/tools/javac/failover/FailOver01.java index 473adfd4759..e8d4da79272 100644 --- a/langtools/test/tools/javac/failover/FailOver01.java +++ b/langtools/test/tools/javac/failover/FailOver01.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver01.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver01.java + * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver01.java */ class Test { { x = "" } } diff --git a/langtools/test/tools/javac/failover/FailOver02.java b/langtools/test/tools/javac/failover/FailOver02.java index 75c44665418..0aac6fa4546 100644 --- a/langtools/test/tools/javac/failover/FailOver02.java +++ b/langtools/test/tools/javac/failover/FailOver02.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver02.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver02.java + * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver02.java */ class Test implements AutoCloseable { diff --git a/langtools/test/tools/javac/failover/FailOver03.java b/langtools/test/tools/javac/failover/FailOver03.java index 268f8acd044..cdfe3a8d81c 100644 --- a/langtools/test/tools/javac/failover/FailOver03.java +++ b/langtools/test/tools/javac/failover/FailOver03.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver03.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver03.java + * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver03.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver04.java b/langtools/test/tools/javac/failover/FailOver04.java index e8b72ddd521..e9a723d1a19 100644 --- a/langtools/test/tools/javac/failover/FailOver04.java +++ b/langtools/test/tools/javac/failover/FailOver04.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver04.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver04.java + * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver04.java */ class Test { diff --git a/langtools/test/tools/javac/failover/FailOver05.java b/langtools/test/tools/javac/failover/FailOver05.java index 5209373272a..cbbbc222b7c 100644 --- a/langtools/test/tools/javac/failover/FailOver05.java +++ b/langtools/test/tools/javac/failover/FailOver05.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver05.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver05.java + * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver05.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver06.java b/langtools/test/tools/javac/failover/FailOver06.java index fb28274cde7..14f7fa34f97 100644 --- a/langtools/test/tools/javac/failover/FailOver06.java +++ b/langtools/test/tools/javac/failover/FailOver06.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver06.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver06.java + * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver06.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver07.java b/langtools/test/tools/javac/failover/FailOver07.java index 216c462d50a..a73037a0e99 100644 --- a/langtools/test/tools/javac/failover/FailOver07.java +++ b/langtools/test/tools/javac/failover/FailOver07.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver07.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver07.java + * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver07.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver08.java b/langtools/test/tools/javac/failover/FailOver08.java index e993f3dee09..d2446ae59af 100644 --- a/langtools/test/tools/javac/failover/FailOver08.java +++ b/langtools/test/tools/javac/failover/FailOver08.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver08.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver08.java + * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver08.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver09.java b/langtools/test/tools/javac/failover/FailOver09.java index ca4976895fb..bc126e140f6 100644 --- a/langtools/test/tools/javac/failover/FailOver09.java +++ b/langtools/test/tools/javac/failover/FailOver09.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver09.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver09.java + * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver09.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver10.java b/langtools/test/tools/javac/failover/FailOver10.java index 2265de57442..5d32c85437d 100644 --- a/langtools/test/tools/javac/failover/FailOver10.java +++ b/langtools/test/tools/javac/failover/FailOver10.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver10.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver10.java + * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver10.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver11.java b/langtools/test/tools/javac/failover/FailOver11.java index aaad2800747..863053982bc 100644 --- a/langtools/test/tools/javac/failover/FailOver11.java +++ b/langtools/test/tools/javac/failover/FailOver11.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver11.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver11.java + * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver11.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver12.java b/langtools/test/tools/javac/failover/FailOver12.java index da1e126ffeb..ed8699e039c 100644 --- a/langtools/test/tools/javac/failover/FailOver12.java +++ b/langtools/test/tools/javac/failover/FailOver12.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver12.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver12.java + * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver12.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver13.java b/langtools/test/tools/javac/failover/FailOver13.java index 03cf4259011..f85249d0833 100644 --- a/langtools/test/tools/javac/failover/FailOver13.java +++ b/langtools/test/tools/javac/failover/FailOver13.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver13.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver13.java + * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver13.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver14.java b/langtools/test/tools/javac/failover/FailOver14.java index 6f24ff3e558..c0d3ab78abd 100644 --- a/langtools/test/tools/javac/failover/FailOver14.java +++ b/langtools/test/tools/javac/failover/FailOver14.java @@ -4,7 +4,7 @@ * @summary Flow.java should be more error-friendly * @author mcimadamore * - * @compile/fail/ref=FailOver14.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver14.java + * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver14.java */ class Test extends Test { diff --git a/langtools/test/tools/javac/failover/FailOver15.java b/langtools/test/tools/javac/failover/FailOver15.java index 6fe5e5ae485..619cfd3a5ac 100644 --- a/langtools/test/tools/javac/failover/FailOver15.java +++ b/langtools/test/tools/javac/failover/FailOver15.java @@ -3,7 +3,7 @@ * @bug 6970584 7060926 * @summary Attr.PostAttrAnalyzer misses a case * - * @compile/fail/ref=FailOver15.out -XDrawDiagnostics -Xshouldstop:at=FLOW -XDdev FailOver15.java + * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver15.java */ class Test { diff --git a/langtools/test/tools/javac/generics/inference/8158355/T8158355.java b/langtools/test/tools/javac/generics/inference/8158355/T8158355.java index a123a33ab91..edc6fe95254 100644 --- a/langtools/test/tools/javac/generics/inference/8158355/T8158355.java +++ b/langtools/test/tools/javac/generics/inference/8158355/T8158355.java @@ -27,7 +27,7 @@ * @test * @bug 8158355 * @summary Inference graph dot support broken - * @compile -Xdebug:dumpInferenceGraphsTo=. T8158355.java + * @compile --debug:dumpInferenceGraphsTo=. T8158355.java */ import java.util.List; diff --git a/langtools/test/tools/javac/lambda/MostSpecific09.java b/langtools/test/tools/javac/lambda/MostSpecific09.java index 311af8d7b1a..82e12d69839 100644 --- a/langtools/test/tools/javac/lambda/MostSpecific09.java +++ b/langtools/test/tools/javac/lambda/MostSpecific09.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8029718 * @summary Should always use lambda body structure to disambiguate overload resolution - * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics -Xshouldstop:at=ATTR -Xdebug:verboseResolution=applicable,success MostSpecific09.java + * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop:at=ATTR --debug:verboseResolution=applicable,success MostSpecific09.java */ class MostSpecific09 { diff --git a/langtools/test/tools/javac/lambda/MostSpecific09.out b/langtools/test/tools/javac/lambda/MostSpecific09.out index 75330535ba0..5359cb7f3bf 100644 --- a/langtools/test/tools/javac/lambda/MostSpecific09.out +++ b/langtools/test/tools/javac/lambda/MostSpecific09.out @@ -3,7 +3,7 @@ MostSpecific09.java:26:9: compiler.note.verbose.resolve.multi: foo, MostSpecific MostSpecific09.java:27:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.J), null)} MostSpecific09.java:27:32: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:28:13: compiler.err.lambda.body.neither.value.nor.void.compatible -MostSpecific09.java:28:9: compiler.err.cant.apply.symbols: kindname.method, foo, @681,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} +MostSpecific09.java:28:9: compiler.err.cant.apply.symbols: kindname.method, foo, @682,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} MostSpecific09.java:28:43: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:29:9: compiler.err.ref.ambiguous: foo, kindname.method, foo(MostSpecific09.I), MostSpecific09, kindname.method, foo(MostSpecific09.J), MostSpecific09 MostSpecific09.java:29:28: compiler.note.verbose.resolve.multi: , java.lang.RuntimeException, 0, BASIC, compiler.misc.no.args, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, java.lang.RuntimeException(), null)} @@ -11,7 +11,7 @@ MostSpecific09.java:30:9: compiler.err.ref.ambiguous: foo, kindname.method, foo( MostSpecific09.java:32:9: compiler.err.ref.ambiguous: foo, kindname.method, foo(MostSpecific09.I), MostSpecific09, kindname.method, foo(MostSpecific09.J), MostSpecific09 MostSpecific09.java:33:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.I), null)} MostSpecific09.java:42:13: compiler.err.lambda.body.neither.value.nor.void.compatible -MostSpecific09.java:42:9: compiler.err.cant.apply.symbols: kindname.method, foo, @1130,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} +MostSpecific09.java:42:9: compiler.err.cant.apply.symbols: kindname.method, foo, @1131,{(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.I), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.ret.type.in.lambda: (compiler.misc.missing.ret.val: java.lang.String)))),(compiler.misc.inapplicable.method: kindname.method, MostSpecific09, foo(MostSpecific09.J), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.unexpected.ret.val)))} MostSpecific09.java:46:23: compiler.note.verbose.resolve.multi: println, java.io.PrintStream, 1, BASIC, java.lang.String, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, println(java.lang.Object), null),(compiler.misc.applicable.method.found: 1, println(java.lang.String), null)} MostSpecific09.java:49:9: compiler.note.verbose.resolve.multi: foo, MostSpecific09, 0, BASIC, compiler.misc.type.none, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, foo(MostSpecific09.J), null)} MostSpecific09.java:56:25: compiler.note.verbose.resolve.multi: , Bar, 0, BASIC, compiler.misc.no.args, compiler.misc.no.args,{(compiler.misc.applicable.method.found: 0, Bar(), null)} diff --git a/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java b/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java index b7d2e0f9f6d..6546f3ddf26 100644 --- a/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java +++ b/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java @@ -122,7 +122,7 @@ public class TestLambdaToMethodStats extends ComboInstance sources = new ArrayList<>(); sources.add(src); diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java index 0963135bf37..5910eaa73c4 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess2.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java + * @compile/fail/ref=ProtectedMemberAccess2.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java */ // 71 errors expected. diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java index eacc53e8280..82b8d1b51a1 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess3.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java + * @compile/fail/ref=ProtectedMemberAccess3.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java */ // 46 errors expected. diff --git a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java index 695ccf46b29..d8a55813524 100644 --- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java +++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java @@ -4,7 +4,7 @@ * @summary Verify correct implementation of JLS2e 6.6.2.1 * @author maddox * - * @compile/fail/ref=ProtectedMemberAccess4.out -diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java + * @compile/fail/ref=ProtectedMemberAccess4.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java */ // 33 errors expected. diff --git a/langtools/test/tools/javac/resolve/ResolveHarness.java b/langtools/test/tools/javac/resolve/ResolveHarness.java index 099fa4989ef..8de0a6b2432 100644 --- a/langtools/test/tools/javac/resolve/ResolveHarness.java +++ b/langtools/test/tools/javac/resolve/ResolveHarness.java @@ -132,8 +132,8 @@ public class ResolveHarness implements javax.tools.DiagnosticListener 0 && methodType.parameterType(parameterCount - 1).isArray(); + + if (parameterCount < 2) { + return methodHandle; // method does not have enough parameters + } + final boolean isVarArg = methodType.parameterType(parameterCount - 1).isArray(); if (isVarArg) { return MH.filterArguments(methodHandle, 1, MH.insertArguments(ADD_ZEROTH_ELEMENT, 1, bindName)); diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java index 059cf1d80e1..df348e148b5 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java @@ -2172,6 +2172,21 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { return switchPoints.toArray(new SwitchPoint[0]); } + // Similar to getProtoSwitchPoints method above, but used for additional prototype switchpoints of + // properties that are known not to exist, e.g. the original property name in a __noSuchProperty__ invocation. + private SwitchPoint getProtoSwitchPoint(final String name) { + if (getProto() == null) { + return null; + } + + for (ScriptObject obj = this; obj.getProto() != null; obj = obj.getProto()) { + final ScriptObject parent = obj.getProto(); + parent.getMap().addListener(name, obj.getMap()); + } + + return getMap().getSwitchPoint(name); + } + private void checkSharedProtoMap() { // Check if our map has an expected shared prototype property map. If it has, make sure that // the prototype map has not been invalidated, and that it does match the actual map of the prototype. @@ -2343,7 +2358,9 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { final boolean scopeCall = isScope() && NashornCallSiteDescriptor.isScope(desc); if (find == null) { - return noSuchProperty(desc, request); + return noSuchProperty(desc, request) + // Add proto switchpoint to switch from no-such-property to no-such-method if it is ever defined. + .addSwitchPoint(getProtoSwitchPoint(NO_SUCH_METHOD_NAME)); } final boolean explicitInstanceOfCheck = explicitInstanceOfCheck(desc, request); @@ -2366,7 +2383,9 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { Object.class), NashornGuards.combineGuards( NashornGuards.getIdentityGuard(this), - NashornGuards.getMapGuard(getMap(), true))); + NashornGuards.getMapGuard(getMap(), true))) + // Add a protoype switchpoint for the original name so this gets invalidated if it is ever defined. + .addSwitchPoint(getProtoSwitchPoint(name)); } /** @@ -2412,7 +2431,9 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { func), getProtoSwitchPoints(NO_SUCH_PROPERTY_NAME, find.getOwner()), //TODO this doesn't need a ClassCastException as guard always checks script object - null); + null) + // Add a protoype switchpoint for the original name so this gets invalidated if it is ever defined. + .addSwitchPoint(getProtoSwitchPoint(name)); } } diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SharedPropertyMap.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SharedPropertyMap.java index 215d0c85ad8..5277c4faad4 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SharedPropertyMap.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SharedPropertyMap.java @@ -29,7 +29,7 @@ import java.lang.invoke.SwitchPoint; /** * This class represents a property map that can be shared among multiple prototype objects, allowing all inheriting - * top-level objects to also share one property map. This is class is only used for prototype objects, the + * top-level objects to also share one property map. This class is only used for prototype objects, the * top-level objects use ordinary {@link PropertyMap}s with the {@link PropertyMap#sharedProtoMap} field * set to the expected shared prototype map. * diff --git a/nashorn/test/script/basic/JDK-8077149.js b/nashorn/test/script/basic/JDK-8077149.js new file mode 100644 index 00000000000..b980ff81027 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8077149.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2016, 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. + */ + +/** + * JDK-8077149: __noSuchProperty__ and __noSuchMethod__ invocations are not properly guarded + * + * @test + * @run + */ + +var o = {}; + +function invoke() { + return o._(); +} + +Object.prototype.__noSuchProperty__ = function() { + return function() { return "no such property" }; +}; + +Assert.assertEquals(invoke(), "no such property"); + +Object.prototype.__noSuchMethod__ = function() { + return "no such method"; +}; + +Assert.assertEquals(invoke(), "no such method"); + +Object.prototype._ = function() { + return "underscore method"; +}; + +Assert.assertEquals(invoke(), "underscore method");