Merge
authoramurillo
Fri, 08 Aug 2014 11:36:48 -0700
changeset 25938 d1161ea75e14
parent 25851 cd6f4557e7fe (diff)
parent 25937 aab180dc9283 (current diff)
child 25939 41d12a329ec7
child 25944 c8aa7a0bf7d0
child 25945 cb5dcc388aff
child 26165 1b175b39dfc1
child 26166 4b49fd58bbd9
Merge
--- a/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 28dd0c7beb3cad9cf95f17b4b5ad87eb447a4084 jdk9-b21
 9678e0db8ff6ed845d4c2ee4a3baf7f386a777e5 jdk9-b22
 39cfdc2dcaf3f195c55398e4e677ab053b07e3d2 jdk9-b23
+d9ce05f36ffec3e5e8af62a92455c1c66a63c320 jdk9-b24
+13a5c76976fe48e55c9727c25fae2d2ce7c05da0 jdk9-b25
--- a/.hgtags-top-repo	Fri Aug 08 10:35:05 2014 -0700
+++ b/.hgtags-top-repo	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 9052803f4d01feda28b3d65f2b64dd457d21c7b6 jdk9-b21
 8e4bdab4c362aadde2d321f968cd503a2f779e2f jdk9-b22
 88567461a2cd9b7fb431fee6440005a694df1f47 jdk9-b23
+1d4a293fbec19dc2d5790bbb2c7dd0ed8f265484 jdk9-b24
+aefd8899a8d6615fb34ba99b2e38996a7145baa8 jdk9-b25
--- a/common/autoconf/generated-configure.sh	Fri Aug 08 10:35:05 2014 -0700
+++ b/common/autoconf/generated-configure.sh	Fri Aug 08 11:36:48 2014 -0700
@@ -4311,7 +4311,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1404942241
+DATE_WHEN_GENERATED=1405336663
 
 ###############################################################################
 #
@@ -14548,7 +14548,7 @@
   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
   fi
-  if test "x$VAR_CPU" = xppc64 ; then
+  if test "x$OPENJDK_TARGET_OS" = xaix ; then
     INCLUDE_SA=false
   fi
 
--- a/common/autoconf/jdk-options.m4	Fri Aug 08 10:35:05 2014 -0700
+++ b/common/autoconf/jdk-options.m4	Fri Aug 08 11:36:48 2014 -0700
@@ -158,7 +158,7 @@
   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
   fi
-  if test "x$VAR_CPU" = xppc64 ; then
+  if test "x$OPENJDK_TARGET_OS" = xaix ; then
     INCLUDE_SA=false
   fi
   AC_SUBST(INCLUDE_SA)
--- a/corba/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/corba/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 3615a4e7f0542ca7552ad6454b742c73ee211d8e jdk9-b21
 ddc07abf4307855c0dc904cc5c96cc764023a930 jdk9-b22
 57735d66face054440a63ce99789eac5a5ee1dfd jdk9-b23
+8a44142bb7fc8118f70f91a1b97c12dfc50563ee jdk9-b24
+da08cca6b97f41b7081a3e176dcb400af6e4bb26 jdk9-b25
--- a/hotspot/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/hotspot/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -426,3 +426,5 @@
 17b4a5e831b398738feedb0afe75245744510153 jdk9-b21
 518d1fcc0799494f013e00e0a94a91b6f212d54f jdk9-b22
 dd472cdacc32e3afc7c5bfa7ef16ea0e0befb7fa jdk9-b23
+dde2d03b0ea46a27650839e3a1d212c7c1f7b4c8 jdk9-b24
+6de94e8693240cec8aae11f6b42f43433456a733 jdk9-b25
--- a/jaxp/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 7eb0ab676ea75cb1dd31c613e77008a7d8cb0af7 jdk9-b21
 82b94ff002c6e007a03bf0f364ca94b381e09135 jdk9-b22
 2e5b63006187bfc64d8eace374dbc2806267a160 jdk9-b23
+345af113f57206711f75089c3ebf84a36a789122 jdk9-b24
+73757f4b8aa353ca8937abc07e79e7ece4c011a1 jdk9-b25
--- a/jaxp/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2005 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
  *
@@ -385,8 +386,18 @@
          * reference to the default error handler.
          */
         public LSSerializer createLSSerializer() {
-        return new DOMSerializerImpl();
-    }
+            try {
+                Class serializerClass = ObjectFactory.findProviderClass(
+                    "com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl",
+                    ObjectFactory.findClassLoader(), true);
+                return (LSSerializer) serializerClass.newInstance();
+            }
+            catch (Exception e) {}
+            // Fall back to Xerces' deprecated serializer if
+            // the Xalan based serializer is unavailable.
+            return new DOMSerializerImpl();
+        }
+
         /**
          * DOM Level 3 LS CR - Experimental.
          * Create a new empty input source.
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,6 +54,7 @@
 import com.sun.org.apache.xerces.internal.util.SymbolTable;
 import com.sun.org.apache.xerces.internal.util.XMLSymbols;
 import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
 import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
 import com.sun.org.apache.xerces.internal.xni.XNIException;
 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
@@ -982,6 +983,18 @@
      */
     public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
 
+        XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
+        if (spm == null) {
+            spm = new XMLSecurityPropertyManager();
+            setProperty(XML_SECURITY_PROPERTY_MANAGER, spm);
+        }
+
+        XMLSecurityManager sm = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
+        if (sm == null)
+            setProperty(SECURITY_MANAGER,new XMLSecurityManager(true));
+
+        faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA);
+
         fGrammarBucket.reset();
 
         fSubGroupHandler.reset();
@@ -1065,9 +1078,6 @@
         // get generate-synthetic-annotations feature
         fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false));
         fSchemaHandler.reset(componentManager);
-
-        XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
-        faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA);
     }
 
     private void initGrammarBucket(){
--- a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3145,7 +3145,11 @@
                                   m_data.elementAt(-dataIndex+1));
       }
     }
-    else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type
+    else if (DTM.ELEMENT_NODE == type)
+    {
+      return getStringValueX(nodeHandle);
+    }
+    else if (DTM.DOCUMENT_FRAGMENT_NODE == type
              || DTM.DOCUMENT_NODE == type)
     {
       return null;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -123,6 +123,11 @@
  * @author Sunitha Reddy, Sun Microsystems
  * @see Serializer
  * @see org.w3c.dom.ls.LSSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public abstract class BaseMarkupSerializer
     implements ContentHandler, DocumentHandler, LexicalHandler,
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -35,6 +36,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public interface DOMSerializer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -72,6 +72,9 @@
  * @author Gopal Sharma, Sun Microsystems
  * @author Arun Yadav, Sun Microsystems
  * @author Sunitha Reddy, Sun Microsystems
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, replaced by
+ * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}
  */
 public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/ElementState.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/ElementState.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -28,9 +29,13 @@
 /**
  * Holds the state of the currently serialized element.
  *
- *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see BaseMarkupSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class ElementState
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2000-2002,2004,2005 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
  *
@@ -29,6 +30,10 @@
 /**
  * This class represents an encoding.
  *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class EncodingInfo {
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Encodings.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Encodings.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -36,6 +37,11 @@
  * for each encoding.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class Encodings
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -45,8 +46,12 @@
  * from value to name. A small entities resource is loaded into memory the
  * first time any of these methods is called for fast and efficient access.
  *
+ * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  *
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class HTMLdtd
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -32,6 +33,11 @@
  * wrapping.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class IndentPrinter
     extends Printer
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -25,6 +26,11 @@
 /**
  * @author <a href="mailto:arkin@intalio..com">Assaf Arkin</a>
  * @see OutputFormat
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class LineSeparator
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Method.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Method.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -25,6 +26,11 @@
 /**
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see OutputFormat
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class Method
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -59,6 +60,11 @@
  * @see Serializer
  * @see Method
  * @see LineSeparator
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class OutputFormat
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Printer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Printer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -40,6 +41,11 @@
  * extending this class.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class Printer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Serializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Serializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -60,6 +61,11 @@
  * @see ContentHandler
  * @see OutputFormat
  * @see DOMSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public interface Serializer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -34,6 +35,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public abstract class SerializerFactory
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -34,6 +35,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 final class SerializerFactoryImpl
     extends SerializerFactory
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,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
  *
@@ -58,6 +59,11 @@
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class TextSerializer
     extends BaseMarkupSerializer
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -73,10 +73,16 @@
  * boundaries, indent lines, and serialize elements on separate
  * lines. Line terminators will be regarded as spaces, and
  * spaces at beginning of line will be stripped.
+ *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
  * @author Elena Litani IBM
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class XML11Serializer
 extends XMLSerializer {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -84,10 +84,16 @@
  * boundaries, indent lines, and serialize elements on separate
  * lines. Line terminators will be regarded as spaces, and
  * spaces at beginning of line will be stripped.
+ *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
  * @author Elena Litani IBM
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class XMLSerializer
 extends BaseMarkupSerializer {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/DOM3Serializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,117 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer;
+
+import java.io.IOException;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+/**
+ * Interface for a DOM serializer capable of serializing DOMs as specified in
+ * the DOM Level 3 Save Recommendation.
+ * <p>
+ * The DOM3Serializer is a facet of a serializer and is obtained from the
+ * asDOM3Serializer() method of the org.apache.xml.serializer.Serializer interface.
+ * A serializer may or may not support a level 3 DOM serializer, if it does not then the
+ * return value from asDOM3Serializer() is null.
+ * <p>
+ * Example:
+ * <pre>
+ * Document     doc;
+ * Serializer   ser;
+ * OutputStream os;
+ * DOMErrorHandler handler;
+ *
+ * ser = ...;
+ * os = ...;
+ * handler = ...;
+ *
+ * ser.setOutputStream( os );
+ * DOM3Serialzier dser = (DOM3Serialzier)ser.asDOM3Serializer();
+ * dser.setErrorHandler(handler);
+ * dser.serialize(doc);
+ * </pre>
+ *
+ * @see org.apache.xml.serializer.Serializer
+ *
+ * @xsl.usage general
+ *
+ */
+public interface DOM3Serializer {
+    /**
+     * Serializes the Level 3 DOM node. Throws an exception only if an I/O
+     * exception occured while serializing.
+     *
+     * This interface is a public API.
+     *
+     * @param node the Level 3 DOM node to serialize
+     * @throws IOException if an I/O exception occured while serializing
+     */
+    public void serializeDOM3(Node node) throws IOException;
+
+    /**
+     * Sets a DOMErrorHandler on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler the Level 3 DOMErrorHandler
+     */
+    public void setErrorHandler(DOMErrorHandler handler);
+
+    /**
+     * Returns a DOMErrorHandler set on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @return A Level 3 DOMErrorHandler
+     */
+    public DOMErrorHandler getErrorHandler();
+
+    /**
+     * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @param filter the Level 3 LSSerializerFilter
+     */
+    public void setNodeFilter(LSSerializerFilter filter);
+
+    /**
+     * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @return The Level 3 LSSerializerFilter
+     */
+    public LSSerializerFilter getNodeFilter();
+
+    /**
+     * Sets the new line character to be used during serialization
+     * @param newLine a String that is the end-of-line character sequence to be
+     * used in serialization.
+     */
+    public void setNewLine(String newLine);
+}
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -786,4 +786,13 @@
         aMethodIsCalled();
 
     }
+
+    /**
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        couldThrowIOException();
+        return null;
+    }
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/Encodings.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/Encodings.java	Fri Aug 08 11:36:48 2014 -0700
@@ -153,6 +153,24 @@
     }
 
     /**
+     * Determines if the encoding specified was recognized by the
+     * serializer or not.
+     *
+     * @param encoding The encoding
+     * @return boolean - true if the encoding was recognized else false
+     */
+    public static boolean isRecognizedEncoding(String encoding)
+    {
+        EncodingInfo ei;
+
+        String normalizedEncoding = toUpperCaseFast(encoding);
+        ei = _encodingInfos.findEncoding(normalizedEncoding);
+        if (ei != null)
+            return true;
+        return false;
+    }
+
+    /**
      * A fast and cheap way to uppercase a String that is
      * only made of printable ASCII characters.
      * <p>
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializationHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializationHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -110,9 +112,29 @@
     public void setNamespaceMappings(NamespaceMappings mappings);
 
     /**
-     * Flush any pending events currently queued up in the serializer. This will
-     * flush any input that the serializer has which it has not yet sent as
-     * output.
+     * A SerializationHandler accepts SAX-like events, so
+     * it can accumulate attributes or namespace nodes after
+     * a startElement().
+     * <p>
+     * If the SerializationHandler has a Writer or OutputStream,
+     * a call to this method will flush such accumulated
+     * events as a closed start tag for an element.
+     * <p>
+     * If the SerializationHandler wraps a ContentHandler,
+     * a call to this method will flush such accumulated
+     * events as a SAX (not SAX-like) calls to
+     * startPrefixMapping() and startElement().
+     * <p>
+     * If one calls endDocument() then one need not call
+     * this method since a call to endDocument() will
+     * do what this method does. However, in some
+     * circumstances, such as with document fragments,
+     * endDocument() is not called and it may be
+     * necessary to call this method to flush
+     * any pending events.
+     * <p>
+     * For performance reasons this method should not be called
+     * very often.
      */
     public void flushPending() throws SAXException;
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/Serializer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/Serializer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -220,4 +222,20 @@
      * @return True if serializer has been reset and can be reused
      */
     public boolean reset();
+
+    /**
+     * Return an Object into this serializer to be cast to a DOM3Serializer.
+     * Through the returned object the document to be serialized,
+     * a DOM (Level 3), can be provided to the serializer.
+     * If the serializer does not support casting to a {@link DOM3Serializer}
+     * interface, it should return null.
+     * <p>
+     * In principle only one of asDOM3Serializer() or asContentHander()
+     * should be called.
+     *
+     * @return An Object to be cast to a DOM3Serializer interface into this serializer,
+     *  or null if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     */
+    public Object asDOM3Serializer() throws IOException;
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1559,6 +1559,21 @@
     }
 
     /**
+     * Return a {@link DOM3Serializer} interface into this serializer. If the
+     * serializer does not support the {@link DOM3Serializer} interface, it should
+     * return null.
+     *
+     * @return A {@link DOM3Serializer} interface into this serializer,  or null
+     * if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        return new com.sun.org.apache.xml.internal.serializer.dom3.DOM3SerializerImpl(this);
+    }
+
+    /**
      * Get the default value of an xsl:output property,
      * which would be null only if no default value exists
      * for the property.
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -136,7 +136,7 @@
         if (obj instanceof SerializationHandler)
         {
               // this is one of the supplied serializers
-            ser = (Serializer) cls.newInstance();
+            ser = (Serializer) obj;
             ser.setOutputFormat(format);
         }
         else
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java	Fri Aug 08 11:36:48 2014 -0700
@@ -537,7 +537,7 @@
                 if (OutputPropertiesFactory.S_KEY_INDENT_AMOUNT.equals(name)) {
                     setIndentAmount(Integer.parseInt(val));
                 } else if (OutputKeys.INDENT.equals(name)) {
-                    boolean b = "yes".equals(val) ? true : false;
+                    boolean b = val.endsWith("yes") ? true : false;
                     m_doIndent = b;
                 }
 
@@ -556,7 +556,7 @@
                 break;
             case 'o':
                 if (OutputKeys.OMIT_XML_DECLARATION.equals(name)) {
-                    boolean b = "yes".equals(val) ? true : false;
+                    boolean b = val.endsWith("yes") ? true : false;
                     this.m_shouldNotWriteXMLHeader = b;
                 }
                 break;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1335,4 +1335,12 @@
                 ch.length);
         }
     }
+
+    /**
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        return m_handler.asDOM3Serializer();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,150 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.IOException;
+
+import com.sun.org.apache.xml.internal.serializer.DOM3Serializer;
+import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
+import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.Node;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+/**
+ * This class implements the DOM3Serializer interface.
+ *
+ * @xsl.usage internal
+ */
+public final class DOM3SerializerImpl implements DOM3Serializer {
+
+    /**
+     * Private class members
+     */
+    // The DOMErrorHandler
+    private DOMErrorHandler fErrorHandler;
+
+    // A LSSerializerFilter
+    private LSSerializerFilter fSerializerFilter;
+
+    // The end-of-line character sequence
+    private String fNewLine;
+
+    // A SerializationHandler ex. an instance of ToXMLStream
+    private SerializationHandler fSerializationHandler;
+
+    /**
+     * Constructor
+     *
+     * @param handler An instance of the SerializationHandler interface.
+     */
+    public DOM3SerializerImpl(SerializationHandler handler) {
+        fSerializationHandler = handler;
+    }
+
+    // Public memebers
+
+    /**
+     * Returns a DOMErrorHandler set on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @return A Level 3 DOMErrorHandler
+     */
+    public DOMErrorHandler getErrorHandler() {
+        return fErrorHandler;
+    }
+
+    /**
+     * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @return The Level 3 LSSerializerFilter
+     */
+    public LSSerializerFilter getNodeFilter() {
+        return fSerializerFilter;
+    }
+
+
+    /**
+     * Serializes the Level 3 DOM node by creating an instance of DOM3TreeWalker
+     * which traverses the DOM tree and invokes handler events to serialize
+     * the DOM NOde. Throws an exception only if an I/O exception occured
+     * while serializing.
+     * This interface is a public API.
+     *
+     * @param node the Level 3 DOM node to serialize
+     * @throws IOException if an I/O exception occured while serializing
+     */
+    public void serializeDOM3(Node node) throws IOException {
+        try {
+            DOM3TreeWalker walker = new DOM3TreeWalker(fSerializationHandler,
+                    fErrorHandler, fSerializerFilter, fNewLine);
+
+            walker.traverse(node);
+        } catch (org.xml.sax.SAXException se) {
+            throw new WrappedRuntimeException(se);
+        }
+    }
+
+    /**
+     * Sets a DOMErrorHandler on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler the Level 3 DOMErrorHandler
+     */
+    public void setErrorHandler(DOMErrorHandler handler) {
+        fErrorHandler = handler;
+    }
+
+    /**
+     * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @param filter the Level 3 LSSerializerFilter
+     */
+    public void setNodeFilter(LSSerializerFilter filter) {
+        fSerializerFilter = filter;
+    }
+
+    /**
+     * Sets a SerializationHandler on the DOM Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler An instance of SerializationHandler
+     */
+    public void setSerializationHandler(SerializationHandler handler) {
+        fSerializationHandler = handler;
+    }
+
+    /**
+     * Sets the new line character to be used during serialization
+     * @param newLine a String that is the end-of-line character sequence to be
+     * used in serialization.
+     */
+    public void setNewLine(String newLine) {
+        fNewLine = newLine;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2145 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory;
+import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
+import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xerces.internal.util.XML11Char;
+import com.sun.org.apache.xerces.internal.util.XMLChar;
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Entity;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+import org.w3c.dom.ls.LSSerializerFilter;
+import org.w3c.dom.traversal.NodeFilter;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.LocatorImpl;
+
+/**
+ * Built on org.apache.xml.serializer.TreeWalker and adds functionality to
+ * traverse and serialize a DOM Node (Level 2 or Level 3) as specified in
+ * the DOM Level 3 LS Recommedation by evaluating and applying DOMConfiguration
+ * parameters and filters if any during serialization.
+ *
+ * @xsl.usage internal
+ */
+final class DOM3TreeWalker {
+
+    /**
+     * The SerializationHandler, it extends ContentHandler and when
+     * this class is instantiated via the constructor provided, a
+     * SerializationHandler object is passed to it.
+     */
+    private SerializationHandler fSerializer = null;
+
+    /** We do not need DOM2Helper since DOM Level 3 LS applies to DOM Level 2 or newer */
+
+    /** Locator object for this TreeWalker          */
+    private LocatorImpl fLocator = new LocatorImpl();
+
+    /** ErrorHandler */
+    private DOMErrorHandler fErrorHandler = null;
+
+    /** LSSerializerFilter */
+    private LSSerializerFilter fFilter = null;
+
+    /** If the serializer is an instance of a LexicalHandler */
+    private LexicalHandler fLexicalHandler = null;
+
+    private int fWhatToShowFilter;
+
+    /** New Line character to use in serialization */
+    private String fNewLine = null;
+
+    /** DOMConfiguration Properties */
+    private Properties fDOMConfigProperties = null;
+
+    /** Keeps track if we are in an entity reference when entities=true */
+    private boolean fInEntityRef = false;
+
+    /** Stores the version of the XML document to be serialize */
+    private String fXMLVersion = null;
+
+    /** XML Version, default 1.0 */
+    private boolean fIsXMLVersion11 = false;
+
+    /** Is the Node a Level 3 DOM node */
+    private boolean fIsLevel3DOM = false;
+
+    /** DOM Configuration Parameters */
+    private int fFeatures = 0;
+
+    /** Flag indicating whether following text to be processed is raw text          */
+    boolean fNextIsRaw = false;
+
+    //
+    private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    //
+    private static final String XMLNS_PREFIX = "xmlns";
+
+    //
+    private static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
+
+    //
+    private static final String XML_PREFIX = "xml";
+
+    /** stores namespaces in scope */
+    protected NamespaceSupport fNSBinder;
+
+    /** stores all namespace bindings on the current element */
+    protected NamespaceSupport fLocalNSBinder;
+
+    /** stores the current element depth */
+    private int fElementDepth = 0;
+
+    // ***********************************************************************
+    // DOMConfiguration paramter settings
+    // ***********************************************************************
+    // Parameter canonical-form, true [optional] - NOT SUPPORTED
+    private final static int CANONICAL = 0x1 << 0;
+
+    // Parameter cdata-sections, true [required] (default)
+    private final static int CDATA = 0x1 << 1;
+
+    // Parameter check-character-normalization, true [optional] - NOT SUPPORTED
+    private final static int CHARNORMALIZE = 0x1 << 2;
+
+    // Parameter comments, true [required] (default)
+    private final static int COMMENTS = 0x1 << 3;
+
+    // Parameter datatype-normalization, true [optional] - NOT SUPPORTED
+    private final static int DTNORMALIZE = 0x1 << 4;
+
+    // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED
+    private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5;
+
+    // Parameter entities, true [required] (default)
+    private final static int ENTITIES = 0x1 << 6;
+
+    // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer
+    private final static int INFOSET = 0x1 << 7;
+
+    // Parameter namespaces, true [required] (default)
+    private final static int NAMESPACES = 0x1 << 8;
+
+    // Parameter namespace-declarations, true [required] (default)
+    private final static int NAMESPACEDECLS = 0x1 << 9;
+
+    // Parameter normalize-characters, true [optional] - NOT SUPPORTED
+    private final static int NORMALIZECHARS = 0x1 << 10;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int SPLITCDATA = 0x1 << 11;
+
+    // Parameter validate, true [optional] - NOT SUPPORTED
+    private final static int VALIDATE = 0x1 << 12;
+
+    // Parameter validate-if-schema, true [optional] - NOT SUPPORTED
+    private final static int SCHEMAVALIDATE = 0x1 << 13;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int WELLFORMED = 0x1 << 14;
+
+    // Parameter discard-default-content, true [required] (default)
+    // Not sure how this will be used in level 2 Documents
+    private final static int DISCARDDEFAULT = 0x1 << 15;
+
+    // Parameter format-pretty-print, true [optional]
+    private final static int PRETTY_PRINT = 0x1 << 16;
+
+    // Parameter ignore-unknown-character-denormalizations, true [required] (default)
+    // We currently do not support XML 1.1 character normalization
+    private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17;
+
+    // Parameter discard-default-content, true [required] (default)
+    private final static int XMLDECL = 0x1 << 18;
+
+    /**
+     * Constructor.
+     * @param   contentHandler serialHandler The implemention of the SerializationHandler interface
+     */
+    DOM3TreeWalker(
+        SerializationHandler serialHandler,
+        DOMErrorHandler errHandler,
+        LSSerializerFilter filter,
+        String newLine) {
+        fSerializer = serialHandler;
+        //fErrorHandler = errHandler == null ? new DOMErrorHandlerImpl() : errHandler; // Should we be using the default?
+        fErrorHandler = errHandler;
+        fFilter = filter;
+        fLexicalHandler = null;
+        fNewLine = newLine;
+
+        fNSBinder = new NamespaceSupport();
+        fLocalNSBinder = new NamespaceSupport();
+
+        fDOMConfigProperties = fSerializer.getOutputFormat();
+        fSerializer.setDocumentLocator(fLocator);
+        initProperties(fDOMConfigProperties);
+
+        try {
+            // Bug see Bugzilla  26741
+            fLocator.setSystemId(
+                System.getProperty("user.dir") + File.separator + "dummy.xsl");
+        } catch (SecurityException se) { // user.dir not accessible from applet
+
+        }
+    }
+
+    /**
+     * Perform a pre-order traversal non-recursive style.
+     *
+     * Note that TreeWalker assumes that the subtree is intended to represent
+     * a complete (though not necessarily well-formed) document and, during a
+     * traversal, startDocument and endDocument will always be issued to the
+     * SAX listener.
+     *
+     * @param pos Node in the tree where to start traversal
+     *
+     * @throws TransformerException
+     */
+    public void traverse(Node pos) throws org.xml.sax.SAXException {
+        this.fSerializer.startDocument();
+
+        // Determine if the Node is a DOM Level 3 Core Node.
+        if (pos.getNodeType() != Node.DOCUMENT_NODE) {
+            Document ownerDoc = pos.getOwnerDocument();
+            if (ownerDoc != null
+                && ownerDoc.getImplementation().hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        } else {
+            if (((Document) pos)
+                .getImplementation()
+                .hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        }
+
+        if (fSerializer instanceof LexicalHandler) {
+            fLexicalHandler = ((LexicalHandler) this.fSerializer);
+        }
+
+        if (fFilter != null)
+            fWhatToShowFilter = fFilter.getWhatToShow();
+
+        Node top = pos;
+
+        while (null != pos) {
+            startNode(pos);
+
+            Node nextNode = null;
+
+            nextNode = pos.getFirstChild();
+
+            while (null == nextNode) {
+                endNode(pos);
+
+                if (top.equals(pos))
+                    break;
+
+                nextNode = pos.getNextSibling();
+
+                if (null == nextNode) {
+                    pos = pos.getParentNode();
+
+                    if ((null == pos) || (top.equals(pos))) {
+                        if (null != pos)
+                            endNode(pos);
+
+                        nextNode = null;
+
+                        break;
+                    }
+                }
+            }
+
+            pos = nextNode;
+        }
+        this.fSerializer.endDocument();
+    }
+
+    /**
+     * Perform a pre-order traversal non-recursive style.
+
+     * Note that TreeWalker assumes that the subtree is intended to represent
+     * a complete (though not necessarily well-formed) document and, during a
+     * traversal, startDocument and endDocument will always be issued to the
+     * SAX listener.
+     *
+     * @param pos Node in the tree where to start traversal
+     * @param top Node in the tree where to end traversal
+     *
+     * @throws TransformerException
+     */
+    public void traverse(Node pos, Node top) throws org.xml.sax.SAXException {
+
+        this.fSerializer.startDocument();
+
+        // Determine if the Node is a DOM Level 3 Core Node.
+        if (pos.getNodeType() != Node.DOCUMENT_NODE) {
+            Document ownerDoc = pos.getOwnerDocument();
+            if (ownerDoc != null
+                && ownerDoc.getImplementation().hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        } else {
+            if (((Document) pos)
+                .getImplementation()
+                .hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        }
+
+        if (fSerializer instanceof LexicalHandler) {
+            fLexicalHandler = ((LexicalHandler) this.fSerializer);
+        }
+
+        if (fFilter != null)
+            fWhatToShowFilter = fFilter.getWhatToShow();
+
+        while (null != pos) {
+            startNode(pos);
+
+            Node nextNode = null;
+
+            nextNode = pos.getFirstChild();
+
+            while (null == nextNode) {
+                endNode(pos);
+
+                if ((null != top) && top.equals(pos))
+                    break;
+
+                nextNode = pos.getNextSibling();
+
+                if (null == nextNode) {
+                    pos = pos.getParentNode();
+
+                    if ((null == pos) || ((null != top) && top.equals(pos))) {
+                        nextNode = null;
+
+                        break;
+                    }
+                }
+            }
+
+            pos = nextNode;
+        }
+        this.fSerializer.endDocument();
+    }
+
+    /**
+     * Optimized dispatch of characters.
+     */
+    private final void dispatachChars(Node node)
+        throws org.xml.sax.SAXException {
+        if (fSerializer != null) {
+            this.fSerializer.characters(node);
+        } else {
+            String data = ((Text) node).getData();
+            this.fSerializer.characters(data.toCharArray(), 0, data.length());
+        }
+    }
+
+    /**
+     * Start processing given node
+     *
+     * @param node Node to process
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void startNode(Node node) throws org.xml.sax.SAXException {
+        if (node instanceof Locator) {
+            Locator loc = (Locator) node;
+            fLocator.setColumnNumber(loc.getColumnNumber());
+            fLocator.setLineNumber(loc.getLineNumber());
+            fLocator.setPublicId(loc.getPublicId());
+            fLocator.setSystemId(loc.getSystemId());
+        } else {
+            fLocator.setColumnNumber(0);
+            fLocator.setLineNumber(0);
+        }
+
+        switch (node.getNodeType()) {
+            case Node.DOCUMENT_TYPE_NODE :
+                serializeDocType((DocumentType) node, true);
+                break;
+            case Node.COMMENT_NODE :
+                serializeComment((Comment) node);
+                break;
+            case Node.DOCUMENT_FRAGMENT_NODE :
+                // Children are traversed
+                break;
+            case Node.DOCUMENT_NODE :
+                break;
+            case Node.ELEMENT_NODE :
+                serializeElement((Element) node, true);
+                break;
+            case Node.PROCESSING_INSTRUCTION_NODE :
+                serializePI((ProcessingInstruction) node);
+                break;
+            case Node.CDATA_SECTION_NODE :
+                serializeCDATASection((CDATASection) node);
+                break;
+            case Node.TEXT_NODE :
+                serializeText((Text) node);
+                break;
+            case Node.ENTITY_REFERENCE_NODE :
+                serializeEntityReference((EntityReference) node, true);
+                break;
+            default :
+                }
+    }
+
+    /**
+     * End processing of given node
+     *
+     *
+     * @param node Node we just finished processing
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void endNode(Node node) throws org.xml.sax.SAXException {
+
+        switch (node.getNodeType()) {
+            case Node.DOCUMENT_NODE :
+                break;
+            case Node.DOCUMENT_TYPE_NODE :
+                serializeDocType((DocumentType) node, false);
+                break;
+            case Node.ELEMENT_NODE :
+                serializeElement((Element) node, false);
+                break;
+            case Node.CDATA_SECTION_NODE :
+                break;
+            case Node.ENTITY_REFERENCE_NODE :
+                serializeEntityReference((EntityReference) node, false);
+                break;
+            default :
+                }
+    }
+
+    // ***********************************************************************
+    // Node serialization methods
+    // ***********************************************************************
+    /**
+     * Applies a filter on the node to serialize
+     *
+     * @param node The Node to serialize
+     * @return True if the node is to be serialized else false if the node
+     *         is to be rejected or skipped.
+     */
+    protected boolean applyFilter(Node node, int nodeType) {
+        if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) {
+
+            short code = fFilter.acceptNode(node);
+            switch (code) {
+                case NodeFilter.FILTER_REJECT :
+                case NodeFilter.FILTER_SKIP :
+                    return false; // skip the node
+                default : // fall through..
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Serializes a Document Type Node.
+     *
+     * @param node The Docuemnt Type Node to serialize
+     * @param bStart Invoked at the start or end of node.  Default true.
+     */
+    protected void serializeDocType(DocumentType node, boolean bStart)
+        throws SAXException {
+        // The DocType and internalSubset can not be modified in DOM and is
+        // considered to be well-formed as the outcome of successful parsing.
+        String docTypeName = node.getNodeName();
+        String publicId = node.getPublicId();
+        String systemId = node.getSystemId();
+        String internalSubset = node.getInternalSubset();
+
+        //DocumentType nodes are never passed to the filter
+
+        if (internalSubset != null && !"".equals(internalSubset)) {
+
+            if (bStart) {
+                try {
+                    // The Serializer does not provide a way to write out the
+                    // DOCTYPE internal subset via an event call, so we write it
+                    // out here.
+                    Writer writer = fSerializer.getWriter();
+                    StringBuffer dtd = new StringBuffer();
+
+                    dtd.append("<!DOCTYPE ");
+                    dtd.append(docTypeName);
+                    if (null != publicId) {
+                        dtd.append(" PUBLIC \"");
+                        dtd.append(publicId);
+                        dtd.append('\"');
+                    }
+
+                    if (null != systemId) {
+                        if (null == publicId) {
+                            dtd.append(" SYSTEM \"");
+                        } else {
+                            dtd.append(" \"");
+                        }
+                        dtd.append(systemId);
+                        dtd.append('\"');
+                    }
+
+                    dtd.append(" [ ");
+
+                    dtd.append(fNewLine);
+                    dtd.append(internalSubset);
+                    dtd.append("]>");
+                    dtd.append(fNewLine);
+
+                    writer.write(dtd.toString());
+                    writer.flush();
+
+                } catch (IOException e) {
+                    throw new SAXException(Utils.messages.createMessage(
+                            MsgKey.ER_WRITING_INTERNAL_SUBSET, null), e);
+                }
+            } // else if !bStart do nothing
+
+        } else {
+
+            if (bStart) {
+                if (fLexicalHandler != null) {
+                    fLexicalHandler.startDTD(docTypeName, publicId, systemId);
+                }
+            } else {
+                if (fLexicalHandler != null) {
+                    fLexicalHandler.endDTD();
+                }
+            }
+        }
+    }
+
+    /**
+     * Serializes a Comment Node.
+     *
+     * @param node The Comment Node to serialize
+     */
+    protected void serializeComment(Comment node) throws SAXException {
+        // comments=true
+        if ((fFeatures & COMMENTS) != 0) {
+            String data = node.getData();
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isCommentWellFormed(data);
+            }
+
+            if (fLexicalHandler != null) {
+                // apply the LSSerializer filter after the operations requested by the
+                // DOMConfiguration parameters have been applied
+                if (!applyFilter(node, NodeFilter.SHOW_COMMENT)) {
+                    return;
+                }
+
+                fLexicalHandler.comment(data.toCharArray(), 0, data.length());
+            }
+        }
+    }
+
+    /**
+     * Serializes an Element Node.
+     *
+     * @param node The Element Node to serialize
+     * @param bStart Invoked at the start or end of node.
+     */
+    protected void serializeElement(Element node, boolean bStart)
+        throws SAXException {
+        if (bStart) {
+            fElementDepth++;
+
+            // We use the Xalan specific startElement and starPrefixMapping calls
+            // (and addAttribute and namespaceAfterStartElement) as opposed to
+            // SAX specific, for performance reasons as they reduce the overhead
+            // of creating an AttList object upfront.
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isElementWellFormed(node);
+            }
+
+            // REVISIT: We apply the LSSerializer filter for elements before
+            // namesapce fixup
+            if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) {
+                return;
+            }
+
+            // namespaces=true, record and fixup namspaced element
+            if ((fFeatures & NAMESPACES) != 0) {
+                fNSBinder.pushContext();
+                fLocalNSBinder.reset();
+
+                recordLocalNSDecl(node);
+                fixupElementNS(node);
+            }
+
+            // Namespace normalization
+            fSerializer.startElement(
+                        node.getNamespaceURI(),
+                    node.getLocalName(),
+                    node.getNodeName());
+
+            serializeAttList(node);
+
+        } else {
+                fElementDepth--;
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) {
+                return;
+            }
+
+            this.fSerializer.endElement(
+                node.getNamespaceURI(),
+                node.getLocalName(),
+                node.getNodeName());
+            // since endPrefixMapping was not used by SerializationHandler it was removed
+            // for performance reasons.
+
+            if ((fFeatures & NAMESPACES) != 0 ) {
+                    fNSBinder.popContext();
+            }
+
+        }
+    }
+
+    /**
+     * Serializes the Attr Nodes of an Element.
+     *
+     * @param node The OwnerElement whose Attr Nodes are to be serialized.
+     */
+    protected void serializeAttList(Element node) throws SAXException {
+        NamedNodeMap atts = node.getAttributes();
+        int nAttrs = atts.getLength();
+
+        for (int i = 0; i < nAttrs; i++) {
+            Node attr = atts.item(i);
+
+            String localName = attr.getLocalName();
+            String attrName = attr.getNodeName();
+            String attrPrefix = attr.getPrefix() == null ? "" : attr.getPrefix();
+            String attrValue = attr.getNodeValue();
+
+            // Determine the Attr's type.
+            String type = null;
+            if (fIsLevel3DOM) {
+                type = ((Attr) attr).getSchemaTypeInfo().getTypeName();
+            }
+            type = type == null ? "CDATA" : type;
+
+            String attrNS = attr.getNamespaceURI();
+            if (attrNS !=null && attrNS.length() == 0) {
+                attrNS=null;
+                // we must remove prefix for this attribute
+                attrName=attr.getLocalName();
+            }
+
+            boolean isSpecified = ((Attr) attr).getSpecified();
+            boolean addAttr = true;
+            boolean applyFilter = false;
+            boolean xmlnsAttr =
+                attrName.equals("xmlns") || attrName.startsWith("xmlns:");
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isAttributeWellFormed(attr);
+            }
+
+            //-----------------------------------------------------------------
+            // start Attribute namespace fixup
+            //-----------------------------------------------------------------
+            // namespaces=true, normalize all non-namespace attributes
+            // Step 3. Attribute
+            if ((fFeatures & NAMESPACES) != 0 && !xmlnsAttr) {
+
+                        // If the Attr has a namespace URI
+                        if (attrNS != null) {
+                                attrPrefix = attrPrefix == null ? "" : attrPrefix;
+
+                                String declAttrPrefix = fNSBinder.getPrefix(attrNS);
+                                String declAttrNS = fNSBinder.getURI(attrPrefix);
+
+                                // attribute has no prefix (default namespace decl does not apply to
+                                // attributes)
+                                // OR
+                                // attribute prefix is not declared
+                                // OR
+                                // conflict: attribute has a prefix that conflicts with a binding
+                                if ("".equals(attrPrefix) || "".equals(declAttrPrefix)
+                                                || !attrPrefix.equals(declAttrPrefix)) {
+
+                                        // namespaceURI matches an in scope declaration of one or
+                                        // more prefixes
+                                        if (declAttrPrefix != null && !"".equals(declAttrPrefix)) {
+                                                // pick the prefix that was found and change attribute's
+                                                // prefix and nodeName.
+                                                attrPrefix = declAttrPrefix;
+
+                                                if (declAttrPrefix.length() > 0 ) {
+                                                        attrName = declAttrPrefix + ":" + localName;
+                                                } else {
+                                                        attrName = localName;
+                                                }
+                                        } else {
+                                                // The current prefix is not null and it has no in scope
+                                                // declaration
+                                                if (attrPrefix != null && !"".equals(attrPrefix)
+                                                                && declAttrNS == null) {
+                                                        // declare this prefix
+                                                        if ((fFeatures & NAMESPACEDECLS) != 0) {
+                                                                fSerializer.addAttribute(XMLNS_URI, attrPrefix,
+                                                                                XMLNS_PREFIX + ":" + attrPrefix, "CDATA",
+                                                                                attrNS);
+                                                                fNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                                fLocalNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        }
+                                                } else {
+                                                        // find a prefix following the pattern "NS" +index
+                                                        // (starting at 1)
+                                                        // make sure this prefix is not declared in the current
+                                                        // scope.
+                                                        int counter = 1;
+                                                        attrPrefix = "NS" + counter++;
+
+                                                        while (fLocalNSBinder.getURI(attrPrefix) != null) {
+                                                                attrPrefix = "NS" + counter++;
+                                                        }
+                                                        // change attribute's prefix and Name
+                                                        attrName = attrPrefix + ":" + localName;
+
+                                                        // create a local namespace declaration attribute
+                                                        // Add the xmlns declaration attribute
+                                                        if ((fFeatures & NAMESPACEDECLS) != 0) {
+
+                                                                fSerializer.addAttribute(XMLNS_URI, attrPrefix,
+                                                                                XMLNS_PREFIX + ":" + attrPrefix, "CDATA",
+                                                                                attrNS);
+                                                        fNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        fLocalNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        }
+                                                }
+                                        }
+                                }
+
+                        } else { // if the Attr has no namespace URI
+                                // Attr has no localName
+                                if (localName == null) {
+                                        // DOM Level 1 node!
+                                        String msg = Utils.messages.createMessage(
+                                                        MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                                                        new Object[] { attrName });
+
+                                        if (fErrorHandler != null) {
+                                                fErrorHandler
+                                                                .handleError(new DOMErrorImpl(
+                                                                                DOMError.SEVERITY_ERROR, msg,
+                                                                                MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, null,
+                                                                                null, null));
+                                        }
+
+                                } else { // uri=null and no colon
+                                        // attr has no namespace URI and no prefix
+                                        // no action is required, since attrs don't use default
+                                }
+                        }
+
+            }
+
+
+            // discard-default-content=true
+            // Default attr's are not passed to the filter and this contraint
+            // is applied only when discard-default-content=true
+            // What about default xmlns attributes???? check for xmlnsAttr
+            if ((((fFeatures & DISCARDDEFAULT) != 0) && isSpecified)
+                || ((fFeatures & DISCARDDEFAULT) == 0)) {
+                applyFilter = true;
+            } else {
+                addAttr = false;
+            }
+
+            if (applyFilter) {
+                // apply the filter for Attributes that are not default attributes
+                // or namespace decl attributes
+                if (fFilter != null
+                    && (fFilter.getWhatToShow() & NodeFilter.SHOW_ATTRIBUTE)
+                        != 0) {
+
+                    if (!xmlnsAttr) {
+                        short code = fFilter.acceptNode(attr);
+                        switch (code) {
+                            case NodeFilter.FILTER_REJECT :
+                            case NodeFilter.FILTER_SKIP :
+                                addAttr = false;
+                                break;
+                            default : //fall through..
+                        }
+                    }
+                }
+            }
+
+            // if the node is a namespace node
+            if (addAttr && xmlnsAttr) {
+                // If namespace-declarations=true, add the node , else don't add it
+                if ((fFeatures & NAMESPACEDECLS) != 0) {
+                        // The namespace may have been fixed up, in that case don't add it.
+                        if (localName != null && !"".equals(localName)) {
+                                fSerializer.addAttribute(attrNS, localName, attrName, type, attrValue);
+                        }
+                }
+            } else if (
+                addAttr && !xmlnsAttr) { // if the node is not a namespace node
+                // If namespace-declarations=true, add the node with the Attr nodes namespaceURI
+                // else add the node setting it's namespace to null or else the serializer will later
+                // attempt to add a xmlns attr for the prefixed attribute
+                if (((fFeatures & NAMESPACEDECLS) != 0) && (attrNS != null)) {
+                    fSerializer.addAttribute(
+                        attrNS,
+                        localName,
+                        attrName,
+                        type,
+                        attrValue);
+                } else {
+                    fSerializer.addAttribute(
+                        "",
+                        localName,
+                        attrName,
+                        type,
+                        attrValue);
+                }
+            }
+
+            //
+            if (xmlnsAttr && ((fFeatures & NAMESPACEDECLS) != 0)) {
+                int index;
+                // Use "" instead of null, as Xerces likes "" for the
+                // name of the default namespace.  Fix attributed
+                // to "Steven Murray" <smurray@ebt.com>.
+                String prefix =
+                    (index = attrName.indexOf(":")) < 0
+                        ? ""
+                        : attrName.substring(index + 1);
+
+                if (!"".equals(prefix)) {
+                    fSerializer.namespaceAfterStartElement(prefix, attrValue);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Serializes an ProcessingInstruction Node.
+     *
+     * @param node The ProcessingInstruction Node to serialize
+     */
+    protected void serializePI(ProcessingInstruction node)
+        throws SAXException {
+        ProcessingInstruction pi = node;
+        String name = pi.getNodeName();
+
+        // well-formed=true
+        if ((fFeatures & WELLFORMED) != 0) {
+            isPIWellFormed(node);
+        }
+
+        // apply the LSSerializer filter
+        if (!applyFilter(node, NodeFilter.SHOW_PROCESSING_INSTRUCTION)) {
+            return;
+        }
+
+        // String data = pi.getData();
+        if (name.equals("xslt-next-is-raw")) {
+            fNextIsRaw = true;
+        } else {
+            this.fSerializer.processingInstruction(name, pi.getData());
+        }
+    }
+
+    /**
+     * Serializes an CDATASection Node.
+     *
+     * @param node The CDATASection Node to serialize
+     */
+    protected void serializeCDATASection(CDATASection node)
+        throws SAXException {
+        // well-formed=true
+        if ((fFeatures & WELLFORMED) != 0) {
+            isCDATASectionWellFormed(node);
+        }
+
+        // cdata-sections = true
+        if ((fFeatures & CDATA) != 0) {
+
+            // split-cdata-sections = true
+            // Assumption: This parameter has an effect only when
+                        // cdata-sections=true
+            // ToStream, by default splits cdata-sections. Hence the check
+                        // below.
+            String nodeValue = node.getNodeValue();
+            int endIndex = nodeValue.indexOf("]]>");
+            if ((fFeatures & SPLITCDATA) != 0) {
+                if (endIndex >= 0) {
+                    // The first node split will contain the ]] markers
+                    String relatedData = nodeValue.substring(0, endIndex + 2);
+
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_WARNING,
+                                msg,
+                                MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                                null,
+                                relatedData,
+                                null));
+                    }
+                }
+            } else {
+                if (endIndex >= 0) {
+                    // The first node split will contain the ]] markers
+                    String relatedData = nodeValue.substring(0, endIndex + 2);
+
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_ERROR,
+                                msg,
+                                MsgKey.ER_CDATA_SECTIONS_SPLIT));
+                    }
+                    // Report an error and return.  What error???
+                    return;
+                }
+            }
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_CDATA_SECTION)) {
+                return;
+            }
+
+            // splits the cdata-section
+            if (fLexicalHandler != null) {
+                fLexicalHandler.startCDATA();
+            }
+            dispatachChars(node);
+            if (fLexicalHandler != null) {
+                fLexicalHandler.endCDATA();
+            }
+        } else {
+            dispatachChars(node);
+        }
+    }
+
+    /**
+     * Serializes an Text Node.
+     *
+     * @param node The Text Node to serialize
+     */
+    protected void serializeText(Text node) throws SAXException {
+        if (fNextIsRaw) {
+            fNextIsRaw = false;
+            fSerializer.processingInstruction(
+                javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING,
+                "");
+            dispatachChars(node);
+            fSerializer.processingInstruction(
+                javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING,
+                "");
+        } else {
+            // keep track of dispatch or not to avoid duplicaiton of filter code
+            boolean bDispatch = false;
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isTextWellFormed(node);
+            }
+
+            // if the node is whitespace
+            // Determine the Attr's type.
+            boolean isElementContentWhitespace = false;
+            if (fIsLevel3DOM) {
+                isElementContentWhitespace =
+                       node.isElementContentWhitespace();
+            }
+
+            if (isElementContentWhitespace) {
+                // element-content-whitespace=true
+                if ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) {
+                    bDispatch = true;
+                }
+            } else {
+                bDispatch = true;
+            }
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_TEXT)) {
+                return;
+            }
+
+            if (bDispatch) {
+                dispatachChars(node);
+            }
+        }
+    }
+
+    /**
+     * Serializes an EntityReference Node.
+     *
+     * @param node The EntityReference Node to serialize
+     * @param bStart Inicates if called from start or endNode
+     */
+    protected void serializeEntityReference(
+        EntityReference node,
+        boolean bStart)
+        throws SAXException {
+        if (bStart) {
+            EntityReference eref = node;
+            // entities=true
+            if ((fFeatures & ENTITIES) != 0) {
+
+                // perform well-formedness and other checking only if
+                // entities = true
+
+                // well-formed=true
+                if ((fFeatures & WELLFORMED) != 0) {
+                    isEntityReferneceWellFormed(node);
+                }
+
+                // check "unbound-prefix-in-entity-reference" [fatal]
+                // Raised if the configuration parameter "namespaces" is set to true
+                if ((fFeatures & NAMESPACES) != 0) {
+                    checkUnboundPrefixInEntRef(node);
+                }
+
+                // The filter should not apply in this case, since the
+                // EntityReference is not being expanded.
+                // should we pass entity reference nodes to the filter???
+            }
+
+            if (fLexicalHandler != null) {
+
+                // startEntity outputs only Text but not Element, Attr, Comment
+                // and PI child nodes.  It does so by setting the m_inEntityRef
+                // in ToStream and using this to decide if a node is to be
+                // serialized or not.
+                fLexicalHandler.startEntity(eref.getNodeName());
+            }
+
+        } else {
+            EntityReference eref = node;
+            // entities=true or false,
+            if (fLexicalHandler != null) {
+                fLexicalHandler.endEntity(eref.getNodeName());
+            }
+        }
+    }
+
+
+    // ***********************************************************************
+    // Methods to check well-formedness
+    // ***********************************************************************
+    /**
+     * Taken from org.apache.xerces.dom.CoreDocumentImpl
+     *
+     * Check the string against XML's definition of acceptable names for
+     * elements and attributes and so on using the XMLCharacterProperties
+     * utility class
+     */
+    protected boolean isXMLName(String s, boolean xml11Version) {
+
+        if (s == null) {
+            return false;
+        }
+        if (!xml11Version)
+            return XMLChar.isValidName(s);
+        else
+            return XML11Char.isXML11ValidName(s);
+    }
+
+    /**
+     * Taken from org.apache.xerces.dom.CoreDocumentImpl
+     *
+     * Checks if the given qualified name is legal with respect
+     * to the version of XML to which this document must conform.
+     *
+     * @param prefix prefix of qualified name
+     * @param local local part of qualified name
+     */
+    protected boolean isValidQName(
+        String prefix,
+        String local,
+        boolean xml11Version) {
+
+        // check that both prefix and local part match NCName
+        if (local == null)
+            return false;
+        boolean validNCName = false;
+
+        if (!xml11Version) {
+            validNCName =
+                (prefix == null || XMLChar.isValidNCName(prefix))
+                    && XMLChar.isValidNCName(local);
+        } else {
+            validNCName =
+                (prefix == null || XML11Char.isXML11ValidNCName(prefix))
+                    && XML11Char.isXML11ValidNCName(local);
+        }
+
+        return validNCName;
+    }
+
+    /**
+     * Checks if a XML character is well-formed
+     *
+     * @param characters A String of characters to be checked for Well-Formedness
+     * @param refInvalidChar A reference to the character to be returned that was determined invalid.
+     */
+    protected boolean isWFXMLChar(String chardata, Character refInvalidChar) {
+        if (chardata == null || (chardata.length() == 0)) {
+            return true;
+        }
+
+        char[] dataarray = chardata.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            //we need to check all characters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                if (XML11Char.isXML11Invalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return false;
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all characters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                if (XMLChar.isInvalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return false;
+                }
+            }
+        } // end-else fDocument.isXMLVersion()
+
+        return true;
+    } // isXMLCharWF
+
+    /**
+     * Checks if a XML character is well-formed.  If there is a problem with
+     * the character a non-null Character is returned else null is returned.
+     *
+     * @param characters A String of characters to be checked for Well-Formedness
+     * @return Character A reference to the character to be returned that was determined invalid.
+     */
+    protected Character isWFXMLChar(String chardata) {
+        Character refInvalidChar;
+        if (chardata == null || (chardata.length() == 0)) {
+            return null;
+        }
+
+        char[] dataarray = chardata.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            //we need to check all characters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                if (XML11Char.isXML11Invalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return refInvalidChar;
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all characters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                if (XMLChar.isInvalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return refInvalidChar;
+                }
+            }
+        } // end-else fDocument.isXMLVersion()
+
+        return null;
+    } // isXMLCharWF
+
+    /**
+     * Checks if a comment node is well-formed
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isCommentWellFormed(String data) {
+        if (data == null || (data.length() == 0)) {
+            return;
+        }
+
+        char[] dataarray = data.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            // we need to check all chracters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                char c = dataarray[i++];
+                if (XML11Char.isXML11Invalid(c)) {
+                    // check if this is a supplemental character
+                    if (XMLChar.isHighSurrogate(c) && i < datalength) {
+                        char c2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(c2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(c, c2))) {
+                            continue;
+                        }
+                    }
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                            new Object[] { new Character(c)});
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                } else if (c == '-' && i < datalength && dataarray[i] == '-') {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_DASH_IN_COMMENT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all chracters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                char c = dataarray[i++];
+                if (XMLChar.isInvalid(c)) {
+                    // check if this is a supplemental character
+                    if (XMLChar.isHighSurrogate(c) && i < datalength) {
+                        char c2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(c2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(c, c2))) {
+                            continue;
+                        }
+                    }
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                            new Object[] { new Character(c)});
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                } else if (c == '-' && i < datalength && dataarray[i] == '-') {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_DASH_IN_COMMENT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+            }
+        }
+        return;
+    }
+
+    /**
+     * Checks if an element node is well-formed, by checking its Name for well-formedness.
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isElementWellFormed(Node node) {
+        boolean isNameWF = false;
+        if ((fFeatures & NAMESPACES) != 0) {
+            isNameWF =
+                isValidQName(
+                    node.getPrefix(),
+                    node.getLocalName(),
+                    fIsXMLVersion11);
+        } else {
+            isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11);
+        }
+
+        if (!isNameWF) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "Element", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an attr node is well-formed, by checking it's Name and value
+     * for well-formedness.
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isAttributeWellFormed(Node node) {
+        boolean isNameWF = false;
+        if ((fFeatures & NAMESPACES) != 0) {
+            isNameWF =
+                isValidQName(
+                    node.getPrefix(),
+                    node.getLocalName(),
+                    fIsXMLVersion11);
+        } else {
+            isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11);
+        }
+
+        if (!isNameWF) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "Attr", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // Check the Attr's node value
+        // WFC: No < in Attribute Values
+        String value = node.getNodeValue();
+        if (value.indexOf('<') >= 0) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_LT_IN_ATTVAL,
+                    new Object[] {
+                        ((Attr) node).getOwnerElement().getNodeName(),
+                        node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_LT_IN_ATTVAL,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // we need to loop through the children of attr nodes and check their values for
+        // well-formedness
+        NodeList children = node.getChildNodes();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node child = children.item(i);
+            // An attribute node with no text or entity ref child for example
+            // doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:ns");
+            // followes by
+            // element.setAttributeNodeNS(attribute);
+            // can potentially lead to this situation.  If the attribute
+            // was a prefix Namespace attribute declaration then then DOM Core
+            // should have some exception defined for this.
+            if (child == null) {
+                // we should probably report an error
+                continue;
+            }
+            switch (child.getNodeType()) {
+                case Node.TEXT_NODE :
+                    isTextWellFormed((Text) child);
+                    break;
+                case Node.ENTITY_REFERENCE_NODE :
+                    isEntityReferneceWellFormed((EntityReference) child);
+                    break;
+                default :
+            }
+        }
+
+        // TODO:
+        // WFC: Check if the attribute prefix is bound to
+        // http://www.w3.org/2000/xmlns/
+
+        // WFC: Unique Att Spec
+        // Perhaps pass a seen boolean value to this method.  serializeAttList will determine
+        // if the attr was seen before.
+    }
+
+    /**
+     * Checks if a PI node is well-formed, by checking it's Name and data
+     * for well-formedness.
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isPIWellFormed(ProcessingInstruction node) {
+        // Is the PI Target a valid XML name
+        if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "ProcessingInstruction", node.getTarget()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // Does the PI Data carry valid XML characters
+
+        // REVISIT: Should we check if the PI DATA contains a ?> ???
+        Character invalidChar = isWFXMLChar(node.getData());
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an CDATASection node is well-formed, by checking it's data
+     * for well-formedness.  Note that the presence of a CDATA termination mark
+     * in the contents of a CDATASection is handled by the parameter
+     * spli-cdata-sections
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isCDATASectionWellFormed(CDATASection node) {
+        // Does the data valid XML character data
+        Character invalidChar = isWFXMLChar(node.getData());
+        //if (!isWFXMLChar(node.getData(), invalidChar)) {
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an Text node is well-formed, by checking if it contains invalid
+     * XML characters.
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isTextWellFormed(Text node) {
+        // Does the data valid XML character data
+        Character invalidChar = isWFXMLChar(node.getData());
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an EntityRefernece node is well-formed, by checking it's node name.  Then depending
+     * on whether it is referenced in Element content or in an Attr Node, checks if the EntityReference
+     * references an unparsed entity or a external entity and if so throws raises the
+     * appropriate well-formedness error.
+     *
+     * @param data The contents of the comment node
+     * @parent The parent of the EntityReference Node
+     */
+    protected void isEntityReferneceWellFormed(EntityReference node) {
+        // Is the EntityReference name a valid XML name
+        if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "EntityReference", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // determine the parent node
+        Node parent = node.getParentNode();
+
+        // Traverse the declared entities and check if the nodeName and namespaceURI
+        // of the EntityReference matches an Entity.  If so, check the if the notationName
+        // is not null, if so, report an error.
+        DocumentType docType = node.getOwnerDocument().getDoctype();
+        if (docType != null) {
+            NamedNodeMap entities = docType.getEntities();
+            for (int i = 0; i < entities.getLength(); i++) {
+                Entity ent = (Entity) entities.item(i);
+
+                String nodeName =
+                    node.getNodeName() == null ? "" : node.getNodeName();
+                String nodeNamespaceURI =
+                    node.getNamespaceURI() == null
+                        ? ""
+                        : node.getNamespaceURI();
+                String entName =
+                    ent.getNodeName() == null ? "" : ent.getNodeName();
+                String entNamespaceURI =
+                    ent.getNamespaceURI() == null ? "" : ent.getNamespaceURI();
+                // If referenced in Element content
+                // WFC: Parsed Entity
+                if (parent.getNodeType() == Node.ELEMENT_NODE) {
+                    if (entNamespaceURI.equals(nodeNamespaceURI)
+                        && entName.equals(nodeName)) {
+
+                        if (ent.getNotationName() != null) {
+                            String msg =
+                                Utils.messages.createMessage(
+                                    MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                                    new Object[] { node.getNodeName()});
+
+                            if (fErrorHandler != null) {
+                                fErrorHandler.handleError(
+                                    new DOMErrorImpl(
+                                        DOMError.SEVERITY_FATAL_ERROR,
+                                        msg,
+                                        MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                                        null,
+                                        null,
+                                        null));
+                            }
+                        }
+                    }
+                } // end if WFC: Parsed Entity
+
+                // If referenced in an Attr value
+                // WFC: No External Entity References
+                if (parent.getNodeType() == Node.ATTRIBUTE_NODE) {
+                    if (entNamespaceURI.equals(nodeNamespaceURI)
+                        && entName.equals(nodeName)) {
+
+                        if (ent.getPublicId() != null
+                            || ent.getSystemId() != null
+                            || ent.getNotationName() != null) {
+                            String msg =
+                                Utils.messages.createMessage(
+                                    MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                                    new Object[] { node.getNodeName()});
+
+                            if (fErrorHandler != null) {
+                                fErrorHandler.handleError(
+                                    new DOMErrorImpl(
+                                        DOMError.SEVERITY_FATAL_ERROR,
+                                        msg,
+                                        MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                                        null,
+                                        null,
+                                        null));
+                            }
+                        }
+                    }
+                } //end if WFC: No External Entity References
+            }
+        }
+    } // isEntityReferneceWellFormed
+
+    /**
+     * If the configuration parameter "namespaces" is set to true, this methods
+     * checks if an entity whose replacement text contains unbound namespace
+     * prefixes is referenced in a location where there are no bindings for
+     * the namespace prefixes and if so raises a LSException with the error-type
+     * "unbound-prefix-in-entity-reference"
+     *
+     * @param Node, The EntityReference nodes whose children are to be checked
+     */
+    protected void checkUnboundPrefixInEntRef(Node node) {
+        Node child, next;
+        for (child = node.getFirstChild(); child != null; child = next) {
+            next = child.getNextSibling();
+
+            if (child.getNodeType() == Node.ELEMENT_NODE) {
+
+                //If a NamespaceURI is not declared for the current
+                //node's prefix, raise a fatal error.
+                String prefix = child.getPrefix();
+                if (prefix != null
+                                && fNSBinder.getURI(prefix) == null) {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                            new Object[] {
+                                node.getNodeName(),
+                                child.getNodeName(),
+                                prefix });
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+
+                NamedNodeMap attrs = child.getAttributes();
+
+                for (int i = 0; i < attrs.getLength(); i++) {
+                    String attrPrefix = attrs.item(i).getPrefix();
+                    if (attrPrefix != null
+                                && fNSBinder.getURI(attrPrefix) == null) {
+                        String msg =
+                            Utils.messages.createMessage(
+                                MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                                new Object[] {
+                                    node.getNodeName(),
+                                    child.getNodeName(),
+                                    attrs.item(i)});
+
+                        if (fErrorHandler != null) {
+                            fErrorHandler.handleError(
+                                new DOMErrorImpl(
+                                    DOMError.SEVERITY_FATAL_ERROR,
+                                    msg,
+                                    MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                                    null,
+                                    null,
+                                    null));
+                        }
+                    }
+                }
+            }
+
+            if (child.hasChildNodes()) {
+                checkUnboundPrefixInEntRef(child);
+            }
+        }
+    }
+
+    // ***********************************************************************
+    // Namespace normalization
+    // ***********************************************************************
+    /**
+     * Records local namespace declarations, to be used for normalization later
+     *
+     * @param Node, The element node, whose namespace declarations are to be recorded
+     */
+    protected void recordLocalNSDecl(Node node) {
+        NamedNodeMap atts = ((Element) node).getAttributes();
+        int length = atts.getLength();
+
+        for (int i = 0; i < length; i++) {
+            Node attr = atts.item(i);
+
+            String localName = attr.getLocalName();
+            String attrPrefix = attr.getPrefix();
+            String attrValue = attr.getNodeValue();
+            String attrNS = attr.getNamespaceURI();
+
+            localName =
+                localName == null
+                    || XMLNS_PREFIX.equals(localName) ? "" : localName;
+            attrPrefix = attrPrefix == null ? "" : attrPrefix;
+            attrValue = attrValue == null ? "" : attrValue;
+            attrNS = attrNS == null ? "" : attrNS;
+
+            // check if attribute is a namespace decl
+            if (XMLNS_URI.equals(attrNS)) {
+
+                // No prefix may be bound to http://www.w3.org/2000/xmlns/.
+                if (XMLNS_URI.equals(attrValue)) {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                            new Object[] { attrPrefix, XMLNS_URI });
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_ERROR,
+                                msg,
+                                MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                                null,
+                                null,
+                                null));
+                    }
+                } else {
+                    // store the namespace-declaration
+                        if (XMLNS_PREFIX.equals(attrPrefix) ) {
+                        // record valid decl
+                        if (attrValue.length() != 0) {
+                            fNSBinder.declarePrefix(localName, attrValue);
+                        } else {
+                            // Error; xmlns:prefix=""
+                        }
+                    } else { // xmlns
+                        // empty prefix is always bound ("" or some string)
+                        fNSBinder.declarePrefix("", attrValue);
+                    }
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Fixes an element's namespace
+     *
+     * @param Node, The element node, whose namespace is to be fixed
+     */
+    protected void fixupElementNS(Node node) throws SAXException {
+        String namespaceURI = ((Element) node).getNamespaceURI();
+        String prefix = ((Element) node).getPrefix();
+        String localName = ((Element) node).getLocalName();
+
+        if (namespaceURI != null) {
+            //if ( Element's prefix/namespace pair (or default namespace,
+            // if no prefix) are within the scope of a binding )
+            prefix = prefix == null ? "" : prefix;
+            String inScopeNamespaceURI = fNSBinder.getURI(prefix);
+
+            if ((inScopeNamespaceURI != null
+                && inScopeNamespaceURI.equals(namespaceURI))) {
+                // do nothing, declaration in scope is inherited
+
+            } else {
+                // Create a local namespace declaration attr for this namespace,
+                // with Element's current prefix (or a default namespace, if
+                // no prefix). If there's a conflicting local declaration
+                // already present, change its value to use this namespace.
+
+                // Add the xmlns declaration attribute
+                //fNSBinder.pushNamespace(prefix, namespaceURI, fElementDepth);
+                if ((fFeatures & NAMESPACEDECLS) != 0) {
+                    if ("".equals(prefix) || "".equals(namespaceURI)) {
+                        ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, namespaceURI);
+                    } else {
+                        ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX + ":" + prefix, namespaceURI);
+                    }
+                }
+                fLocalNSBinder.declarePrefix(prefix, namespaceURI);
+                fNSBinder.declarePrefix(prefix, namespaceURI);
+
+            }
+        } else {
+            // Element has no namespace
+            // DOM Level 1
+            if (localName == null || "".equals(localName)) {
+                //  DOM Level 1 node!
+                String msg =
+                    Utils.messages.createMessage(
+                        MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                        new Object[] { node.getNodeName()});
+
+                if (fErrorHandler != null) {
+                    fErrorHandler.handleError(
+                        new DOMErrorImpl(
+                            DOMError.SEVERITY_ERROR,
+                            msg,
+                            MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                            null,
+                            null,
+                            null));
+                }
+            } else {
+                namespaceURI = fNSBinder.getURI("");
+                if (namespaceURI !=null && namespaceURI.length() > 0) {
+                    ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, "");
+                        fLocalNSBinder.declarePrefix("", "");
+                    fNSBinder.declarePrefix("", "");
+                }
+            }
+        }
+    }
+    /**
+     * This table is a quick lookup of a property key (String) to the integer that
+     * is the bit to flip in the fFeatures field, so the integers should have
+     * values 1,2,4,8,16...
+     *
+     */
+    private static final Hashtable s_propKeys = new Hashtable();
+    static {
+
+        // Initialize the mappings of property keys to bit values (Integer objects)
+        // or mappings to a String object "", which indicates we are interested
+        // in the property, but it does not have a simple bit value to flip
+
+        // cdata-sections
+        int i = CDATA;
+        Integer val = new Integer(i);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_CDATA_SECTIONS,
+            val);
+
+        // comments
+        int i1 = COMMENTS;
+        val = new Integer(i1);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_COMMENTS,
+            val);
+
+        // element-content-whitespace
+        int i2 = ELEM_CONTENT_WHITESPACE;
+        val = new Integer(i2);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+            val);
+        int i3 = ENTITIES;
+
+        // entities
+        val = new Integer(i3);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_ENTITIES,
+            val);
+
+        // namespaces
+        int i4 = NAMESPACES;
+        val = new Integer(i4);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_NAMESPACES,
+            val);
+
+        // namespace-declarations
+        int i5 = NAMESPACEDECLS;
+        val = new Integer(i5);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+            val);
+
+        // split-cdata-sections
+        int i6 = SPLITCDATA;
+        val = new Integer(i6);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_SPLIT_CDATA,
+            val);
+
+        // discard-default-content
+        int i7 = WELLFORMED;
+        val = new Integer(i7);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_WELLFORMED,
+            val);
+
+        // discard-default-content
+        int i8 = DISCARDDEFAULT;
+        val = new Integer(i8);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+            val);
+
+        // We are interested in these properties, but they don't have a simple
+        // bit value to deal with.
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_FORMAT_PRETTY_PRINT,
+            "");
+        s_propKeys.put(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "");
+        s_propKeys.put(
+            DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION,
+            "");
+        s_propKeys.put(DOMConstants.S_XSL_OUTPUT_ENCODING, "");
+        s_propKeys.put(OutputPropertiesFactory.S_KEY_ENTITIES, "");
+    }
+
+    /**
+     * Initializes fFeatures based on the DOMConfiguration Parameters set.
+     *
+     * @param properties DOMConfiguraiton properties that were set and which are
+     * to be used while serializing the DOM.
+     */
+    protected void initProperties(Properties properties) {
+
+        for (Enumeration keys = properties.keys(); keys.hasMoreElements();) {
+
+            final String key = (String) keys.nextElement();
+
+            // caonical-form
+            // Other features will be enabled or disabled when this is set to true or false.
+
+            // error-handler; set via the constructor
+
+            // infoset
+            // Other features will be enabled or disabled when this is set to true
+
+            // A quick lookup for the given set of properties (cdata-sections ...)
+            final Object iobj = s_propKeys.get(key);
+            if (iobj != null) {
+                if (iobj instanceof Integer) {
+                    // Dealing with a property that has a simple bit value that
+                    // we need to set
+
+                    // cdata-sections
+                    // comments
+                    // element-content-whitespace
+                    // entities
+                    // namespaces
+                    // namespace-declarations
+                    // split-cdata-sections
+                    // well-formed
+                    // discard-default-content
+                    final int BITFLAG = ((Integer) iobj).intValue();
+                    if ((properties.getProperty(key).endsWith("yes"))) {
+                        fFeatures = fFeatures | BITFLAG;
+                    } else {
+                        fFeatures = fFeatures & ~BITFLAG;
+                    }
+                } else {
+                    // We are interested in the property, but it is not
+                    // a simple bit that we need to set.
+
+                    if ((DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_FORMAT_PRETTY_PRINT)
+                        .equals(key)) {
+                        // format-pretty-print; set internally on the serializers via xsl:output properties in LSSerializer
+                        if ((properties.getProperty(key).endsWith("yes"))) {
+                            fSerializer.setIndent(true);
+                            fSerializer.setIndentAmount(4);
+                        } else {
+                            fSerializer.setIndent(false);
+                        }
+                    } else if (
+                        (DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL).equals(
+                            key)) {
+                        // omit-xml-declaration; set internally on the serializers via xsl:output properties in LSSerializer
+                        if ((properties.getProperty(key).endsWith("yes"))) {
+                            fSerializer.setOmitXMLDeclaration(true);
+                        } else {
+                            fSerializer.setOmitXMLDeclaration(false);
+                        }
+                    } else if (
+                        (
+                            DOMConstants.S_XERCES_PROPERTIES_NS
+                                + DOMConstants.S_XML_VERSION).equals(
+                            key)) {
+                        // Retreive the value of the XML Version attribute via the xml-version
+                        String version = properties.getProperty(key);
+                        if ("1.1".equals(version)) {
+                            fIsXMLVersion11 = true;
+                            fSerializer.setVersion(version);
+                        } else {
+                            fSerializer.setVersion("1.0");
+                        }
+                    } else if (
+                        (DOMConstants.S_XSL_OUTPUT_ENCODING).equals(key)) {
+                        // Retreive the value of the XML Encoding attribute
+                        String encoding = properties.getProperty(key);
+                        if (encoding != null) {
+                            fSerializer.setEncoding(encoding);
+                        }
+                    } else if ((OutputPropertiesFactory.S_KEY_ENTITIES).equals(key)) {
+                        // Retreive the value of the XML Encoding attribute
+                        String entities = properties.getProperty(key);
+                        if (DOMConstants.S_XSL_VALUE_ENTITIES.equals(entities)) {
+                            fSerializer.setDTDEntityExpansion(false);
+                        }
+                    } else {
+                        // We shouldn't get here, ever, now what?
+                    }
+                }
+            }
+        }
+        // Set the newLine character to use
+        if (fNewLine != null) {
+            fSerializer.setOutputProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR, fNewLine);
+        }
+    }
+
+} //TreeWalker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,134 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+/**
+ * DOM Constants used by the DOM Level 3 LSSerializer implementation.
+ *
+ * @xsl.usage internal
+ */
+final class DOMConstants {
+    //
+    // Constants: DOM Level 3 feature ids
+    //
+    public static final String DOM3_REC_URL = "http://www.w3.org/TR/DOM-Level-3-LS";
+
+    public static final String XERCES_URL = "http://xml.apache.org/xerces-2j";
+
+    // The namespace used to qualified DOM Level 3 DOMConfiguration parameters
+    public static final String S_DOM3_PROPERTIES_NS = "{"
+            + DOMConstants.DOM3_REC_URL + "}";
+
+    public static final String S_XERCES_PROPERTIES_NS = "{"
+            + DOMConstants.XERCES_URL + "}";
+
+    // xmlns namespaces
+    private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    // namespace prefix
+    private static final String XMLNS_PREFIX = "xmlns";
+
+    // ************************************************************************
+    // DOM Level 3 DOM Configuration parameter names
+    // ************************************************************************
+    // DOM Level 3 parameters defined in Core
+    public static final String DOM_CANONICAL_FORM = "canonical-form"; // Unsupported, we only appear to support this
+
+    public static final String DOM_CDATA_SECTIONS = "cdata-sections";
+
+    public static final String DOM_CHECK_CHAR_NORMALIZATION = "check-character-normalization"; // Unsupported
+
+    public static final String DOM_COMMENTS = "comments";
+
+    public static final String DOM_DATATYPE_NORMALIZATION = "datatype-normalization"; // Unsupported
+
+    public static final String DOM_ELEMENT_CONTENT_WHITESPACE = "element-content-whitespace";
+
+    public static final String DOM_ENTITIES = "entities";
+
+    public static final String DOM_INFOSET = "infoset";
+
+    public static final String DOM_NAMESPACES = "namespaces";
+
+    public static final String DOM_NAMESPACE_DECLARATIONS = "namespace-declarations";
+
+    public static final String DOM_NORMALIZE_CHARACTERS = "normalize-characters"; // Unsupported
+
+    public static final String DOM_SPLIT_CDATA = "split-cdata-sections";
+
+    public static final String DOM_VALIDATE_IF_SCHEMA = "validate-if-schema"; // Unsopported
+
+    public static final String DOM_VALIDATE = "validate"; // Unsopported
+
+    public static final String DOM_WELLFORMED = "well-formed";
+
+    // DOM Level 3 Save
+    public static final String DOM_DISCARD_DEFAULT_CONTENT = "discard-default-content";
+
+    public static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
+
+    public static final String DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS = "ignore-unknown-character-denormalizations"; // Unsupported
+
+    public static final String DOM_XMLDECL = "xml-declaration";
+
+    // DOM Properties
+    public static final String DOM_ERROR_HANDLER = "error-handler";
+
+    public static final String DOM_SCHEMA_TYPE = "schema-type"; // Unsupported
+
+    public static final String DOM_SCHEMA_LOCATION = "schema-location"; // Unsupported
+
+    // ************************************************************************
+
+    // XSL Output properties
+    // The xsl:output 'indent' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_INDENT = "indent";
+
+    // The xsl:output 'indent' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_ENCODING = "encoding";
+
+    // The xsl:output 'omit-xml-declaration' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_OMIT_XML_DECL = "omit-xml-declaration";
+
+    // The xerces serializer specific 'omit-xml-declaration' property used in LSSerializer
+    public static final String S_XML_VERSION = "xml-version";
+
+    //
+    public static final String S_XSL_VALUE_ENTITIES = "com/sun/org/apache/xml/internal/serializer/XMLEntities";
+
+    // Parameter values
+    public static final String DOM3_EXPLICIT_TRUE = "explicit:yes";
+
+    public static final String DOM3_DEFAULT_TRUE = "default:yes";
+
+    public static final String DOM3_EXPLICIT_FALSE = "explicit:no";
+
+    public static final String DOM3_DEFAULT_FALSE = "default:no";
+
+    // DOM Exceptions
+    public static final String DOM_EXCEPTION_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND";
+
+    public static final String DOM_EXCEPTION_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED";
+
+    public static final String DOM_LSEXCEPTION_SERIALIZER_ERR = "SERIALIZER_ERROR";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+
+/**
+ * This is the default implementation of the ErrorHandler interface and is
+ * used if one is not provided.  The default implementation simply reports
+ * DOMErrors to System.err.
+ *
+ * @xsl.usage internal
+ */
+final class DOMErrorHandlerImpl implements DOMErrorHandler {
+
+    /**
+     * Default Constructor
+     */
+    DOMErrorHandlerImpl() {
+    }
+
+    /**
+     * Implementation of DOMErrorHandler.handleError that
+     * adds copy of error to list for later retrieval.
+     *
+     */
+    public boolean handleError(DOMError error) {
+        boolean fail = true;
+        String severity = null;
+        if (error.getSeverity() == DOMError.SEVERITY_WARNING) {
+            fail = false;
+            severity = "[Warning]";
+        } else if (error.getSeverity() == DOMError.SEVERITY_ERROR) {
+            severity = "[Error]";
+        } else if (error.getSeverity() == DOMError.SEVERITY_FATAL_ERROR) {
+            severity = "[Fatal Error]";
+        }
+
+        System.err.println(severity + ": " + error.getMessage() + "\t");
+        System.err.println("Type : " + error.getType() + "\t" + "Related Data: "
+                + error.getRelatedData() + "\t" + "Related Exception: "
+                + error.getRelatedException() );
+
+        return fail;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,176 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMLocator;
+
+/**
+ * Implementation of the DOM Level 3 DOMError interface.
+ *
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ERROR-Interfaces-DOMError'>DOMError Interface definition from Document Object Model (DOM) Level 3 Core Specification</a>.
+ *
+ * @xsl.usage internal
+ */
+
+final class DOMErrorImpl implements DOMError {
+
+    /** private data members */
+
+    // The DOMError Severity
+    private short fSeverity = DOMError.SEVERITY_WARNING;
+
+    // The Error message
+    private String fMessage = null;
+
+    //  A String indicating which related data is expected in relatedData.
+    private String fType;
+
+    // The platform related exception
+    private Exception fException = null;
+
+    //
+    private Object fRelatedData;
+
+    // The location of the exception
+    private DOMLocatorImpl fLocation = new DOMLocatorImpl();
+
+
+    //
+    // Constructors
+    //
+
+    /**
+     * Default constructor.
+     */
+    DOMErrorImpl () {
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     */
+    DOMErrorImpl(short severity, String message, String type) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     * @param exception
+     */
+    DOMErrorImpl(short severity, String message, String type,
+            Exception exception) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+        fException = exception;
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     * @param exception
+     * @param relatedData
+     * @param location
+     */
+    DOMErrorImpl(short severity, String message, String type,
+            Exception exception, Object relatedData, DOMLocatorImpl location) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+        fException = exception;
+        fRelatedData = relatedData;
+        fLocation = location;
+    }
+
+
+    /**
+     * The severity of the error, either <code>SEVERITY_WARNING</code>,
+     * <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
+     *
+     * @return A short containing the DOMError severity
+     */
+    public short getSeverity() {
+        return fSeverity;
+    }
+
+    /**
+     * The DOMError message string.
+     *
+     * @return String
+     */
+    public String getMessage() {
+        return fMessage;
+    }
+
+    /**
+     * The location of the DOMError.
+     *
+     * @return A DOMLocator object containing the DOMError location.
+     */
+    public DOMLocator getLocation() {
+        return fLocation;
+    }
+
+    /**
+     * The related platform dependent exception if any.
+     *
+     * @return A java.lang.Exception
+     */
+    public Object getRelatedException(){
+        return fException;
+    }
+
+    /**
+     * Returns a String indicating which related data is expected in relatedData.
+     *
+     * @return A String
+     */
+    public String getType(){
+        return fType;
+    }
+
+    /**
+     * The related DOMError.type dependent data if any.
+     *
+     * @return java.lang.Object
+     */
+    public Object getRelatedData(){
+        return fRelatedData;
+    }
+
+    public void reset(){
+        fSeverity = DOMError.SEVERITY_WARNING;
+        fException = null;
+        fMessage = null;
+        fType = null;
+        fRelatedData = null;
+        fLocation = null;
+    }
+
+}// class DOMErrorImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,180 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMLocator;
+import org.w3c.dom.Node;
+
+
+/**
+ * <code>DOMLocatorImpl</code> is an implementaion that describes a location (e.g.
+ * where an error occured).
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * This class is a copy of the Xerces-2J class org.apache.xerces.dom.DOMLocatorImpl.java v 1.10
+ *
+ * @author Gopal Sharma, SUN Microsystems Inc.
+ * @version $Id:
+ *
+ * @xsl.usage internal
+ */
+final class DOMLocatorImpl implements DOMLocator {
+
+    //
+    // Data
+    //
+
+    /**
+     * The column number where the error occured,
+     * or -1 if there is no column number available.
+     */
+    private final int fColumnNumber;
+
+    /**
+     * The line number where the error occured,
+     * or -1 if there is no line number available.
+     */
+    private final int fLineNumber;
+
+    /** related data node*/
+    private final Node fRelatedNode;
+
+    /**
+     * The URI where the error occured,
+     * or null if there is no URI available.
+     */
+    private final String fUri;
+
+    /**
+     * The byte offset into the input source this locator is pointing to or -1
+     * if there is no byte offset available
+     */
+    private final int fByteOffset;
+
+    /**
+     * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
+     * offset into the input source this locator is pointing to or -1 if there
+     * is no UTF-16 offset available.
+     */
+    private final int fUtf16Offset;
+
+    //
+    // Constructors
+    //
+
+    DOMLocatorImpl(){
+        fColumnNumber = -1;
+        fLineNumber = -1;
+        fRelatedNode = null;
+        fUri = null;
+        fByteOffset = -1;
+        fUtf16Offset = -1;
+    }
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fUri = uri;
+
+        fRelatedNode = null;
+        fByteOffset = -1;
+        fUtf16Offset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fUri = uri;
+        fUtf16Offset = utf16Offset;
+
+
+        fRelatedNode = null;
+        fByteOffset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fByteOffset = byteoffset ;
+        fRelatedNode = relatedData ;
+        fUri = uri;
+
+        fUtf16Offset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri, int utf16Offset ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fByteOffset = byteoffset ;
+        fRelatedNode = relatedData ;
+        fUri = uri;
+        fUtf16Offset = utf16Offset;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
+
+
+    /**
+     * The line number where the error occured, or -1 if there is no line
+     * number available.
+     */
+    public int getLineNumber(){
+        return fLineNumber;
+    }
+
+    /**
+     * The column number where the error occured, or -1 if there is no column
+     * number available.
+     */
+    public int getColumnNumber(){
+        return fColumnNumber;
+    }
+
+
+    /**
+     * The URI where the error occured, or null if there is no URI available.
+     */
+    public String getUri(){
+        return fUri;
+    }
+
+
+    public Node getRelatedNode(){
+        return fRelatedNode;
+    }
+
+
+    /**
+     * The byte offset into the input source this locator is pointing to or -1
+     * if there is no byte offset available
+     */
+    public int getByteOffset(){
+        return fByteOffset;
+    }
+
+    /**
+     * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
+     * offset into the input source this locator is pointing to or -1 if there
+     * is no UTF-16 offset available.
+     */
+    public int getUtf16Offset(){
+        return fUtf16Offset;
+    }
+
+}// class DOMLocatorImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,177 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.ls.LSOutput;
+
+import java.io.Writer;
+import java.io.OutputStream;
+
+/**
+ * This is a copy of the Xerces-2J class org.apache.xerces.dom.DOMOutputImpl.java
+ *
+ * This class represents an output destination for data.
+ * This interface allows an application to encapsulate information about an
+ * output destination in a single object, which may include a URI, a byte stream
+ * (possibly with a specifiedencoding), a base URI, and/or a character stream.
+ * The exact definitions of a byte stream and a character stream are binding
+ * dependent.
+ * The application is expected to provide objects that implement this interface
+ * whenever such objects are needed. The application can either provide its
+ * own objects that implement this interface, or it can use the generic factory
+ * method DOMImplementationLS.createLSOutput() to create objects that
+ * implement this interface.
+ * The DOMSerializer will use the LSOutput object to determine where to
+ * serialize the output to. The DOMSerializer will look at the different
+ * outputs specified in the LSOutput in the following order to know which one
+ * to output to, the first one that data can be output to will be used:
+ * 1.LSOutput.characterStream
+ * 2.LSOutput.byteStream
+ * 3.LSOutput.systemId
+ * LSOutput objects belong to the application. The DOM implementation will
+ * never modify them (though it may make copies and modify the copies,
+ * if necessary).
+ *
+ *
+ * @author Arun Yadav, Sun Microsytems
+ * @author Gopal Sharma, Sun Microsystems
+ * @version $Id :
+ * @xsl.usage internal
+ */
+
+final class DOMOutputImpl implements LSOutput {
+
+    private Writer fCharStream = null;
+    private OutputStream fByteStream = null;
+    private String fSystemId = null;
+    private String fEncoding = null;
+
+    /**
+     * Default Constructor
+     */
+    DOMOutputImpl() {}
+
+    /**
+     * An attribute of a language and binding dependent type that represents a
+     * writable stream of bytes. If the application knows the character encoding
+     * of the byte stream, it should set the encoding attribute. Setting the
+     * encoding in this way will override any encoding specified in an XML
+     * declaration in the data.
+     */
+
+    public Writer getCharacterStream(){
+        return fCharStream;
+    };
+
+    /**
+     * An attribute of a language and binding dependent type that represents a
+     * writable stream of bytes. If the application knows the character encoding
+     * of the byte stream, it should set the encoding attribute. Setting the
+     * encoding in this way will override any encoding specified in an XML
+     * declaration in the data.
+     */
+
+    public void setCharacterStream(Writer characterStream){
+        fCharStream = characterStream;
+    };
+
+    /**
+     * Depending on the language binding in use, this attribute may not be
+     * available. An attribute of a language and binding dependent type that
+     * represents a writable stream to which 16-bit units can be output. The
+     * application must encode the stream using UTF-16 (defined in [Unicode] and
+     *  Amendment 1 of [ISO/IEC 10646]).
+     */
+
+    public OutputStream getByteStream(){
+        return fByteStream;
+    };
+
+    /**
+     * Depending on the language binding in use, this attribute may not be
+     * available. An attribute of a language and binding dependent type that
+     * represents a writable stream to which 16-bit units can be output. The
+     * application must encode the stream using UTF-16 (defined in [Unicode] and
+     *  Amendment 1 of [ISO/IEC 10646]).
+     */
+
+    public void setByteStream(OutputStream byteStream){
+        fByteStream = byteStream;
+    };
+
+    /**
+     * The system identifier, a URI reference [IETF RFC 2396], for this output
+     *  destination. If the application knows the character encoding of the
+     *  object pointed to by the system identifier, it can set the encoding
+     *  using the encoding attribute. If the system ID is a relative URI
+     *  reference (see section 5 in [IETF RFC 2396]), the behavior is
+     *  implementation dependent.
+     */
+
+    public String getSystemId(){
+        return fSystemId;
+    };
+
+    /**
+     * The system identifier, a URI reference [IETF RFC 2396], for this output
+     *  destination. If the application knows the character encoding of the
+     *  object pointed to by the system identifier, it can set the encoding
+     *  using the encoding attribute. If the system ID is a relative URI
+     *  reference (see section 5 in [IETF RFC 2396]), the behavior is
+     *  implementation dependent.
+     */
+
+    public void setSystemId(String systemId){
+        fSystemId = systemId;
+    };
+
+    /**
+     * The character encoding, if known. The encoding must be a string
+     * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3
+     * "Character Encoding in Entities"). This attribute has no effect when the
+     * application provides a character stream or string data. For other sources
+     * of input, an encoding specified by means of this attribute will override
+     * any encoding specified in the XML declaration or the Text declaration, or
+     * an encoding obtained from a higher level protocol, such as HTTP
+     * [IETF RFC 2616].
+     */
+
+    public String getEncoding(){
+        return fEncoding;
+    };
+
+    /**
+     * The character encoding, if known. The encoding must be a string
+     * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3
+     * "Character Encoding in Entities"). This attribute has no effect when the
+     * application provides a character stream or string data. For other sources
+     * of input, an encoding specified by means of this attribute will override
+     * any encoding specified in the XML declaration or the Text declaration, or
+     * an encoding obtained from a higher level protocol, such as HTTP
+     * [IETF RFC 2616].
+     */
+
+    public void setEncoding(String encoding){
+        fEncoding = encoding;
+    };
+
+}//DOMOutputImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,99 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.util.Vector;
+
+//import org.apache.xerces.dom3.DOMStringList;
+import org.w3c.dom.DOMStringList;
+
+/**
+ * This class implemets the DOM Level 3 Core interface DOMStringList.
+ *
+ * @xsl.usage internal
+ */
+final class DOMStringListImpl implements DOMStringList {
+
+    //A collection of DOMString values
+    private Vector fStrings;
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl() {
+        fStrings = new Vector();
+    }
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl(Vector params) {
+        fStrings = params;
+    }
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl(String[] params ) {
+        fStrings = new Vector();
+        if (params != null) {
+            for (int i=0; i < params.length; i++) {
+                fStrings.add(params[i]);
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#item(int)
+     */
+    public String item(int index) {
+        try {
+            return (String) fStrings.elementAt(index);
+        } catch (ArrayIndexOutOfBoundsException e) {
+            return null;
+        }
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#getLength()
+     */
+    public int getLength() {
+        return fStrings.size();
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#contains(String)
+     */
+    public boolean contains(String param) {
+        return fStrings.contains(param) ;
+    }
+
+    /**
+     * DOM Internal:
+     * Add a <code>DOMString</code> to the list.
+     *
+     * @param domString A string to add to the list
+     */
+    public void add(String param) {
+        fStrings.add(param);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,1405 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Properties;
+
+import com.sun.org.apache.xml.internal.serializer.DOM3Serializer;
+import com.sun.org.apache.xml.internal.serializer.Encodings;
+import com.sun.org.apache.xml.internal.serializer.Serializer;
+import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory;
+import com.sun.org.apache.xml.internal.serializer.SerializerFactory;
+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
+import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMStringList;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.ls.LSException;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+
+/**
+ * Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer and
+ * org.w3c.dom.ls.DOMConfiguration.  Serialization is achieved by delegating
+ * serialization calls to <CODE>org.apache.xml.serializer.ToStream</CODE> or
+ * one of its derived classes depending on the serialization method, while walking
+ * the DOM in DOM3TreeWalker.
+ * @see <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSSerializer">org.w3c.dom.ls.LSSerializer</a>
+ * @see <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#DOMConfiguration">org.w3c.dom.DOMConfiguration</a>
+ *
+ * @version $Id:
+ *
+ * @xsl.usage internal
+ */
+final public class LSSerializerImpl implements DOMConfiguration, LSSerializer {
+
+    /** private data members */
+    private Serializer fXMLSerializer = null;
+
+    // Tracks DOMConfiguration features.
+    protected int fFeatures = 0;
+
+    // Common DOM serializer
+    private  DOM3Serializer fDOMSerializer = null;
+
+    // A filter set on the LSSerializer
+    private LSSerializerFilter fSerializerFilter = null;
+
+    // Stores the nodeArg parameter to speed up multiple writes of the same node.
+    private Node fVisitedNode = null;
+
+    // The end-of-line character sequence used in serialization.  "\n" is whats used on the web.
+    private String fEndOfLine = "\n";
+
+    // The DOMErrorhandler.
+    private DOMErrorHandler fDOMErrorHandler = null;
+
+    // The Configuration parameter to pass to the Underlying serilaizer.
+    private Properties fDOMConfigProperties = null;
+
+    // The encoding to use during serialization.
+    private String fEncoding;
+
+    // ************************************************************************
+    // DOM Level 3 DOM Configuration parameter names
+    // ************************************************************************
+    // Parameter canonical-form, true [optional] - NOT SUPPORTED
+    private final static int CANONICAL = 0x1 << 0;
+
+    // Parameter cdata-sections, true [required] (default)
+    private final static int CDATA = 0x1 << 1;
+
+    // Parameter check-character-normalization, true [optional] - NOT SUPPORTED
+    private final static int CHARNORMALIZE = 0x1 << 2;
+
+    // Parameter comments, true [required] (default)
+    private final static int COMMENTS = 0x1 << 3;
+
+    // Parameter datatype-normalization, true [optional] - NOT SUPPORTED
+    private final static int DTNORMALIZE = 0x1 << 4;
+
+    // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED
+    private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5;
+
+    // Parameter entities, true [required] (default)
+    private final static int ENTITIES = 0x1 << 6;
+
+    // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer
+    private final static int INFOSET = 0x1 << 7;
+
+    // Parameter namespaces, true [required] (default)
+    private final static int NAMESPACES = 0x1 << 8;
+
+    // Parameter namespace-declarations, true [required] (default)
+    private final static int NAMESPACEDECLS = 0x1 << 9;
+
+    // Parameter normalize-characters, true [optional] - NOT SUPPORTED
+    private final static int NORMALIZECHARS = 0x1 << 10;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int SPLITCDATA = 0x1 << 11;
+
+    // Parameter validate, true [optional] - NOT SUPPORTED
+    private final static int VALIDATE = 0x1 << 12;
+
+    // Parameter validate-if-schema, true [optional] - NOT SUPPORTED
+    private final static int SCHEMAVALIDATE = 0x1 << 13;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int WELLFORMED = 0x1 << 14;
+
+    // Parameter discard-default-content, true [required] (default)
+    // Not sure how this will be used in level 2 Documents
+    private final static int DISCARDDEFAULT = 0x1 << 15;
+
+    // Parameter format-pretty-print, true [optional]
+    private final static int PRETTY_PRINT = 0x1 << 16;
+
+    // Parameter ignore-unknown-character-denormalizations, true [required] (default)
+    // We currently do not support XML 1.1 character normalization
+    private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17;
+
+    // Parameter discard-default-content, true [required] (default)
+    private final static int XMLDECL = 0x1 << 18;
+    // ************************************************************************
+
+    // Recognized parameters for which atleast one value can be set
+    private String fRecognizedParameters [] = {
+            DOMConstants.DOM_CANONICAL_FORM,
+            DOMConstants.DOM_CDATA_SECTIONS,
+            DOMConstants.DOM_CHECK_CHAR_NORMALIZATION,
+            DOMConstants.DOM_COMMENTS,
+            DOMConstants.DOM_DATATYPE_NORMALIZATION,
+            DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+            DOMConstants.DOM_ENTITIES,
+            DOMConstants.DOM_INFOSET,
+            DOMConstants.DOM_NAMESPACES,
+            DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+            //DOMConstants.DOM_NORMALIZE_CHARACTERS,
+            DOMConstants.DOM_SPLIT_CDATA,
+            DOMConstants.DOM_VALIDATE,
+            DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+            DOMConstants.DOM_WELLFORMED,
+            DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+            DOMConstants.DOM_FORMAT_PRETTY_PRINT,
+            DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS,
+            DOMConstants.DOM_XMLDECL,
+            DOMConstants.DOM_ERROR_HANDLER
+    };
+
+
+    /**
+     * Constructor:  Creates a LSSerializerImpl object.  The underlying
+     * XML 1.0 or XML 1.1 org.apache.xml.serializer.Serializer object is
+     * created and initialized the first time any of the write methods are
+     * invoked to serialize the Node.  Subsequent write methods on the same
+     * LSSerializerImpl object will use the previously created Serializer object.
+     */
+    public LSSerializerImpl () {
+        // set default parameters
+        fFeatures |= CDATA;
+        fFeatures |= COMMENTS;
+        fFeatures |= ELEM_CONTENT_WHITESPACE;
+        fFeatures |= ENTITIES;
+        fFeatures |= NAMESPACES;
+        fFeatures |= NAMESPACEDECLS;
+        fFeatures |= SPLITCDATA;
+        fFeatures |= WELLFORMED;
+        fFeatures |= DISCARDDEFAULT;
+        fFeatures |= XMLDECL;
+
+        // New OutputFormat properties
+        fDOMConfigProperties = new Properties();
+
+        // Initialize properties to be passed on the underlying serializer
+        initializeSerializerProps();
+
+        // Read output_xml.properties and System Properties to initialize properties
+        Properties  configProps = OutputPropertiesFactory.getDefaultMethodProperties("xml");
+
+        // change xml version from 1.0 to 1.1
+        //configProps.setProperty("version", "1.1");
+
+        // Get a serializer that seriailizes according to the properties,
+        // which in this case is to xml
+        fXMLSerializer = SerializerFactory.getSerializer(configProps);
+
+        // Initialize Serializer
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+    }
+
+    /**
+     * Initializes the underlying serializer's configuration depending on the
+     * default DOMConfiguration parameters. This method must be called before a
+     * node is to be serialized.
+     *
+     * @xsl.usage internal
+     */
+    public void initializeSerializerProps () {
+        // canonical-form
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // cdata-sections
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // "check-character-normalization"
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // comments
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // datatype-normalization
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DATATYPE_NORMALIZATION,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // element-content-whitespace
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // entities
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_TRUE);
+        // preserve entities
+        fDOMConfigProperties.setProperty(
+                OutputPropertiesFactory.S_KEY_ENTITIES, DOMConstants.S_XSL_VALUE_ENTITIES);
+
+        // error-handler
+        // Should we set our default ErrorHandler
+        /*
+         * if (fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER) != null) {
+         * fDOMErrorHandler =
+         * (DOMErrorHandler)fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER); }
+         */
+
+        // infoset
+        if ((fFeatures & INFOSET) != 0) {
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+                    DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+                    DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_FALSE);
+            // preserve entities
+            fDOMConfigProperties.setProperty(
+                    OutputPropertiesFactory.S_KEY_ENTITIES, "");
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_CDATA_SECTIONS,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_DATATYPE_NORMALIZATION,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+        }
+
+        // namespaces
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // namespace-declarations
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // normalize-characters
+        /*
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NORMALIZE_CHARACTERS,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+        */
+
+        // split-cdata-sections
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // validate
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // validate-if-schema
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // well-formed
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // pretty-print
+        fDOMConfigProperties.setProperty(
+                DOMConstants.S_XSL_OUTPUT_INDENT,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+        fDOMConfigProperties.setProperty(
+                OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, Integer.toString(4));
+
+        //
+
+        // discard-default-content
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // xml-declaration
+        fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no");
+
+    }
+
+    // ************************************************************************
+    // DOMConfiguraiton implementation
+    // ************************************************************************
+
+    /**
+     * Checks if setting a parameter to a specific value is supported.
+     *
+     * @see org.w3c.dom.DOMConfiguration#canSetParameter(java.lang.String, java.lang.Object)
+     * @since DOM Level 3
+     * @param name A String containing the DOMConfiguration parameter name.
+     * @param value An Object specifying the value of the corresponding parameter.
+     */
+    public boolean canSetParameter(String name, Object value) {
+        if (value instanceof Boolean){
+            if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)){
+                // both values supported
+                return true;
+            }
+            else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                    // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                    ) {
+                // true is not supported
+                return !((Boolean)value).booleanValue();
+            }
+            else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+                // false is not supported
+                return ((Boolean)value).booleanValue();
+            }
+        }
+        else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER) &&
+                value == null || value instanceof DOMErrorHandler){
+            return true;
+        }
+        return false;
+    }
+    /**
+     * This method returns the value of a parameter if known.
+     *
+     * @see org.w3c.dom.DOMConfiguration#getParameter(java.lang.String)
+     *
+     * @param name A String containing the DOMConfiguration parameter name
+     *             whose value is to be returned.
+     * @return Object The value of the parameter if known.
+     */
+    public Object getParameter(String name) throws DOMException {
+
+        if(name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)){
+                      return null;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) {
+            return ((fFeatures & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) {
+            return ((fFeatures & CDATA) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) {
+            return ((fFeatures & ENTITIES) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) {
+            return ((fFeatures & NAMESPACES) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) {
+            return ((fFeatures & NAMESPACEDECLS) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) {
+            return ((fFeatures & SPLITCDATA) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) {
+            return ((fFeatures & WELLFORMED) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        }  else if (name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) {
+            return ((fFeatures & DISCARDDEFAULT) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) {
+            return ((fFeatures & PRETTY_PRINT) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) {
+            return ((fFeatures & XMLDECL) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
+            return ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+            return Boolean.TRUE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+            return Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)){
+            if ((fFeatures & ENTITIES) == 0 &&
+                    (fFeatures & CDATA) == 0 &&
+                    (fFeatures & ELEM_CONTENT_WHITESPACE) != 0 &&
+                    (fFeatures & NAMESPACES) != 0 &&
+                    (fFeatures & NAMESPACEDECLS) != 0 &&
+                    (fFeatures & WELLFORMED) != 0 &&
+                    (fFeatures & COMMENTS) != 0) {
+                return Boolean.TRUE;
+            }
+            return Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) {
+            return fDOMErrorHandler;
+        } else if (
+                name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)) {
+            return null;
+        } else {
+            // Here we have to add the Xalan specific DOM Message Formatter
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_FOUND,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+        }
+    }
+
+    /**
+     * This method returns a of the parameters supported by this DOMConfiguration object
+     * and for which at least one value can be set by the application
+     *
+     * @see org.w3c.dom.DOMConfiguration#getParameterNames()
+     *
+     * @return DOMStringList A list of DOMConfiguration parameters recognized
+     *                       by the serializer
+     */
+    public DOMStringList getParameterNames() {
+        return new DOMStringListImpl(fRecognizedParameters);
+    }
+
+    /**
+     * This method sets the value of the named parameter.
+     *
+     * @see org.w3c.dom.DOMConfiguration#setParameter(java.lang.String, java.lang.Object)
+     *
+     * @param name A String containing the DOMConfiguration parameter name.
+     * @param value An Object contaiing the parameters value to set.
+     */
+    public void setParameter(String name, Object value) throws DOMException {
+        // If the value is a boolean
+        if (value instanceof Boolean) {
+            boolean state = ((Boolean) value).booleanValue();
+
+            if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) {
+                fFeatures = state ? fFeatures | COMMENTS : fFeatures
+                        & ~COMMENTS;
+                // comments
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) {
+                fFeatures =  state ? fFeatures | CDATA : fFeatures
+                        & ~CDATA;
+                // cdata-sections
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) {
+                fFeatures = state ? fFeatures | ENTITIES : fFeatures
+                        & ~ENTITIES;
+                // entities
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                    fDOMConfigProperties.setProperty(
+                            OutputPropertiesFactory.S_KEY_ENTITIES, DOMConstants.S_XSL_VALUE_ENTITIES);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) {
+                fFeatures = state ? fFeatures | NAMESPACES : fFeatures
+                        & ~NAMESPACES;
+                // namespaces
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name
+                    .equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) {
+                fFeatures = state ? fFeatures | NAMESPACEDECLS
+                        : fFeatures & ~NAMESPACEDECLS;
+                // namespace-declarations
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) {
+                fFeatures = state ? fFeatures | SPLITCDATA : fFeatures
+                        & ~SPLITCDATA;
+                // split-cdata-sections
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) {
+                fFeatures = state ? fFeatures | WELLFORMED : fFeatures
+                        & ~WELLFORMED;
+                // well-formed
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name
+                    .equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) {
+                fFeatures = state ? fFeatures | DISCARDDEFAULT
+                        : fFeatures & ~DISCARDDEFAULT;
+                // discard-default-content
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) {
+                fFeatures = state ? fFeatures | PRETTY_PRINT : fFeatures
+                        & ~PRETTY_PRINT;
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_INDENT,DOMConstants.DOM3_EXPLICIT_TRUE);
+                    fDOMConfigProperties.setProperty(OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, Integer.toString(4));
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_INDENT,DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) {
+                fFeatures = state ? fFeatures | XMLDECL : fFeatures
+                        & ~XMLDECL;
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no");
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "yes");
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
+                fFeatures = state ? fFeatures | ELEM_CONTENT_WHITESPACE : fFeatures
+                        & ~ELEM_CONTENT_WHITESPACE;
+                // element-content-whitespace
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+                // false is not supported
+                if (!state) {
+                    // Here we have to add the Xalan specific DOM Message Formatter
+                    String msg = Utils.messages.createMessage(
+                            MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                            new Object[] { name });
+                    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                    // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                    ) {
+                // true is not supported
+                if (state) {
+                    String msg = Utils.messages.createMessage(
+                            MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                            new Object[] { name });
+                    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+                } else {
+                    if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION
+                                + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } /* else if (name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_NORMALIZE_CHARACTERS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } */
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)) {
+                if (state) {
+                    fFeatures &= ~ENTITIES;
+                    fFeatures &= ~CDATA;
+                    fFeatures &= ~SCHEMAVALIDATE;
+                    fFeatures &= ~DTNORMALIZE;
+                    fFeatures |= NAMESPACES;
+                    fFeatures |= NAMESPACEDECLS;
+                    fFeatures |= WELLFORMED;
+                    fFeatures |= ELEM_CONTENT_WHITESPACE;
+                    fFeatures |= COMMENTS;
+                }
+
+                // infoset
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE);
+
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(
+                        OutputPropertiesFactory.S_KEY_ENTITIES, "");
+
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)) {
+                String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                    new Object[] { name });
+                throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+            } else {
+                // Setting this to false has no effect
+            }
+        } // If the parameter value is not a boolean
+        else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) {
+            if (value == null || value instanceof DOMErrorHandler) {
+                fDOMErrorHandler = (DOMErrorHandler)value;
+            } else {
+                String msg = Utils.messages.createMessage(
+                        MsgKey.ER_TYPE_MISMATCH_ERR,
+                        new Object[] { name });
+                throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg);
+            }
+        } else if (
+                name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)
+                || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                && value != null) {
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+        } else {
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_FOUND,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+        }
+    }
+    // ************************************************************************
+
+
+    // ************************************************************************
+    // DOMConfiguraiton implementation
+    // ************************************************************************
+
+    /**
+     * Returns the DOMConfiguration of the LSSerializer.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getDomConfig()
+     * @since DOM Level 3
+     * @return A DOMConfiguration object.
+     */
+    public DOMConfiguration getDomConfig() {
+        return (DOMConfiguration)this;
+    }
+
+    /**
+     * Returns the DOMConfiguration of the LSSerializer.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getFilter()
+     * @since DOM Level 3
+     * @return A LSSerializerFilter object.
+     */
+    public LSSerializerFilter getFilter() {
+        return fSerializerFilter;
+    }
+
+    /**
+     * Returns the End-Of-Line sequence of characters to be used in the XML
+     * being serialized.  If none is set a default "\n" is returned.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getNewLine()
+     * @since DOM Level 3
+     * @return A String containing the end-of-line character sequence  used in
+     * serialization.
+     */
+    public String getNewLine() {
+        return fEndOfLine;
+    }
+
+    /**
+     * Set a LSSerilizerFilter on the LSSerializer.  When set, the filter is
+     * called before each node is serialized which depending on its implemention
+     * determines if the node is to be serialized or not.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#setFilter
+     * @since DOM Level 3
+     * @param filter A LSSerializerFilter to be applied to the stream to serialize.
+     */
+    public void setFilter(LSSerializerFilter filter) {
+        fSerializerFilter = filter;
+    }
+
+    /**
+     * Sets the End-Of-Line sequence of characters to be used in the XML
+     * being serialized.  Setting this attribute to null will reset its
+     * value to the default value i.e. "\n".
+     *
+     * @see org.w3c.dom.ls.LSSerializer#setNewLine
+     * @since DOM Level 3
+     * @param newLine a String that is the end-of-line character sequence to be used in
+     * serialization.
+     */
+    public void setNewLine(String newLine) {
+        fEndOfLine = newLine !=null? newLine: fEndOfLine;
+    }
+
+    /**
+     * Serializes the specified node to the specified LSOutput and returns true if the Node
+     * was successfully serialized.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public boolean write(Node nodeArg, LSOutput destination) throws LSException {
+        // If the destination is null
+        if (destination == null) {
+            String msg = Utils.messages
+            .createMessage(
+                    MsgKey.ER_NO_OUTPUT_SPECIFIED,
+                    null);
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, msg,
+                        MsgKey.ER_NO_OUTPUT_SPECIFIED));
+            }
+            throw new LSException(LSException.SERIALIZE_ERR, msg);
+        }
+
+        // If nodeArg is null, return false.  Should we throw and LSException instead?
+        if (nodeArg == null ) {
+            return false;
+        }
+
+        // Obtain a reference to the serializer to use
+        // Serializer serializer = getXMLSerializer(xmlVersion);
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        // If the node has not been seen
+        if ( nodeArg != fVisitedNode) {
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            // Determine the encoding: 1.LSOutput.encoding, 2.Document.inputEncoding, 3.Document.xmlEncoding.
+            fEncoding = destination.getEncoding();
+            if (fEncoding == null ) {
+                fEncoding = getInputEncoding(nodeArg);
+                fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg);
+            }
+
+            // If the encoding is not recognized throw an exception.
+            // Note: The serializer defaults to UTF-8 when created
+            if (!Encodings.isRecognizedEncoding(fEncoding)) {
+                String msg = Utils.messages
+                .createMessage(
+                        MsgKey.ER_UNSUPPORTED_ENCODING,
+                        null);
+                if (fDOMErrorHandler != null) {
+                    fDOMErrorHandler.handleError(new DOMErrorImpl(
+                            DOMError.SEVERITY_FATAL_ERROR, msg,
+                            MsgKey.ER_UNSUPPORTED_ENCODING));
+                }
+                throw new LSException(LSException.SERIALIZE_ERR, msg);
+            }
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding);
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0)) {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        //
+        try {
+
+            // The LSSerializer will use the LSOutput object to determine
+            // where to serialize the output to in the following order the
+            // first one that is not null and not an empty string will be
+            // used: 1.LSOutput.characterStream, 2.LSOutput.byteStream,
+            // 3. LSOutput.systemId
+            // 1.LSOutput.characterStream
+            Writer writer = destination.getCharacterStream();
+            if (writer == null ) {
+
+                // 2.LSOutput.byteStream
+                OutputStream outputStream = destination.getByteStream();
+                if ( outputStream == null) {
+
+                    // 3. LSOutput.systemId
+                    String uri = destination.getSystemId();
+                    if (uri == null) {
+                        String msg = Utils.messages
+                        .createMessage(
+                                MsgKey.ER_NO_OUTPUT_SPECIFIED,
+                                null);
+                        if (fDOMErrorHandler != null) {
+                            fDOMErrorHandler.handleError(new DOMErrorImpl(
+                                    DOMError.SEVERITY_FATAL_ERROR, msg,
+                                    MsgKey.ER_NO_OUTPUT_SPECIFIED));
+                        }
+                        throw new LSException(LSException.SERIALIZE_ERR, msg);
+
+                    } else {
+                        // Expand the System Id and obtain an absolute URI for it.
+                        String absoluteURI = SystemIDResolver.getAbsoluteURI(uri);
+
+                        URL url = new URL(absoluteURI);
+                        OutputStream urlOutStream = null;
+                        String protocol = url.getProtocol();
+                        String host = url.getHost();
+
+                        // For file protocols, there is no need to use a URL to get its
+                        // corresponding OutputStream
+
+                        // Scheme names consist of a sequence of characters. The lower case
+                        // letters "a"--"z", digits, and the characters plus ("+"), period
+                        // ("."), and hyphen ("-") are allowed. For resiliency, programs
+                        // interpreting URLs should treat upper case letters as equivalent to
+                        // lower case in scheme names (e.g., allow "HTTP" as well as "http").
+                        if (protocol.equalsIgnoreCase("file")
+                                && (host == null || host.length() == 0 || host.equals("localhost"))) {
+                            // do we also need to check for host.equals(hostname)
+                            urlOutStream = new FileOutputStream(new File(url.getPath()));
+
+                        } else {
+                            // This should support URL's whose schemes are mentioned in
+                            // RFC1738 other than file
+
+                            URLConnection urlCon = url.openConnection();
+                            urlCon.setDoInput(false);
+                            urlCon.setDoOutput(true);
+                            urlCon.setUseCaches(false);
+                            urlCon.setAllowUserInteraction(false);
+
+                            // When writing to a HTTP URI, a HTTP PUT is performed.
+                            if (urlCon instanceof HttpURLConnection) {
+                                HttpURLConnection httpCon = (HttpURLConnection) urlCon;
+                                httpCon.setRequestMethod("PUT");
+                            }
+                            urlOutStream = urlCon.getOutputStream();
+                        }
+                        // set the OutputStream to that obtained from the systemId
+                        serializer.setWriter(new OutputStreamWriter(urlOutStream));
+                    }
+                } else {
+                    // 2.LSOutput.byteStream
+                    serializer.setWriter(new OutputStreamWriter(outputStream, fEncoding));
+                }
+            } else {
+                // 1.LSOutput.characterStream
+                serializer.setWriter(writer);
+            }
+
+            // The associated media type by default is set to text/xml on
+            // org.apache.xml.serializer.SerializerBase.
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+               fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            // Assuming that Xalan's serializer can serialize any type of DOM node
+            fDOMSerializer.serializeDOM3(nodeArg);
+
+        } catch( UnsupportedEncodingException ue) {
+
+            String msg = Utils.messages
+            .createMessage(
+                    MsgKey.ER_UNSUPPORTED_ENCODING,
+                    null);
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, msg,
+                        MsgKey.ER_UNSUPPORTED_ENCODING, ue));
+            }
+            throw new LSException(LSException.SERIALIZE_ERR, ue.getMessage());
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e!=null?e.getMessage():"NULL Exception") ;
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+        return true;
+    }
+
+    /**
+     * Serializes the specified node and returns a String with the serialized
+     * data to the caller.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#writeToString(org.w3c.dom.Node)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public String writeToString(Node nodeArg) throws DOMException, LSException {
+        // return null is nodeArg is null.  Should an Exception be thrown instead?
+        if (nodeArg == null) {
+            return null;
+        }
+
+        // Should we reset the serializer configuration before each write operation?
+        // Obtain a reference to the serializer to use
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        if (nodeArg != fVisitedNode){
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, "UTF-16");
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if  ((nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0)) {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        // StringWriter to Output to
+        StringWriter output = new StringWriter();
+
+        //
+        try {
+
+            // Set the Serializer's Writer to a StringWriter
+            serializer.setWriter(output);
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+                fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            fDOMSerializer.serializeDOM3(nodeArg);
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+
+        // return the serialized string
+        return output.toString();
+    }
+
+    /**
+     * Serializes the specified node to the specified URI and returns true if the Node
+     * was successfully serialized.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#writeToURI(org.w3c.dom.Node, String)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public boolean writeToURI(Node nodeArg, String uri) throws LSException {
+        // If nodeArg is null, return false.  Should we throw and LSException instead?
+        if (nodeArg == null ) {
+            return false;
+        }
+
+        // Obtain a reference to the serializer to use
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        if (nodeArg != fVisitedNode) {
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            // Determine the encoding: 1.LSOutput.encoding,
+            // 2.Document.inputEncoding, 3.Document.xmlEncoding.
+            fEncoding = getInputEncoding(nodeArg);
+            if (fEncoding == null ) {
+                fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg);
+            }
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding);
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0))  {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        //
+        try {
+            // If the specified encoding is not supported an
+            // "unsupported-encoding" fatal error is raised. ??
+            if (uri == null) {
+                String msg = Utils.messages.createMessage(
+                        MsgKey.ER_NO_OUTPUT_SPECIFIED, null);
+                if (fDOMErrorHandler != null) {
+                    fDOMErrorHandler.handleError(new DOMErrorImpl(
+                            DOMError.SEVERITY_FATAL_ERROR, msg,
+                            MsgKey.ER_NO_OUTPUT_SPECIFIED));
+                }
+                throw new LSException(LSException.SERIALIZE_ERR, msg);
+
+            } else {
+                // REVISIT: Can this be used to get an absolute expanded URI
+                String absoluteURI = SystemIDResolver.getAbsoluteURI(uri);
+
+                URL url = new URL(absoluteURI);
+                OutputStream urlOutStream = null;
+                String protocol = url.getProtocol();
+                String host = url.getHost();
+
+                // For file protocols, there is no need to use a URL to get its
+                // corresponding OutputStream
+
+                // Scheme names consist of a sequence of characters. The lower
+                // case letters "a"--"z", digits, and the characters plus ("+"),
+                // period ("."), and hyphen ("-") are allowed. For resiliency,
+                // programs interpreting URLs should treat upper case letters as
+                // equivalent to lower case in scheme names
+                // (e.g., allow "HTTP" as well as "http").
+                if (protocol.equalsIgnoreCase("file")
+                        && (host == null || host.length() == 0 || host
+                                .equals("localhost"))) {
+                    // do we also need to check for host.equals(hostname)
+                    urlOutStream = new FileOutputStream(new File(url.getPath()));
+
+                } else {
+                    // This should support URL's whose schemes are mentioned in
+                    // RFC1738 other than file
+
+                    URLConnection urlCon = url.openConnection();
+                    urlCon.setDoInput(false);
+                    urlCon.setDoOutput(true);
+                    urlCon.setUseCaches(false);
+                    urlCon.setAllowUserInteraction(false);
+
+                    // When writing to a HTTP URI, a HTTP PUT is performed.
+                    if (urlCon instanceof HttpURLConnection) {
+                        HttpURLConnection httpCon = (HttpURLConnection) urlCon;
+                        httpCon.setRequestMethod("PUT");
+                    }
+                    urlOutStream = urlCon.getOutputStream();
+                }
+                // set the OutputStream to that obtained from the systemId
+                serializer.setWriter(new OutputStreamWriter(urlOutStream, fEncoding));
+            }
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+                fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            // Assuming that Xalan's serializer can serialize any type of DOM
+            // node
+            fDOMSerializer.serializeDOM3(nodeArg);
+
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+
+        return true;
+    }
+    // ************************************************************************
+
+
+    // ************************************************************************
+    // Implementaion methods
+    // ************************************************************************
+
+    /**
+     * Determines the XML Version of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then the default version returned is 1.0.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the version pseudo-attribute of the XMLDecl.
+     * @throws Throwable if the DOM implementation does not implement Document.getXmlVersion()
+     */
+    //protected String getXMLVersion(Node nodeArg) throws Throwable {
+    protected String getXMLVersion(Node nodeArg) {
+        Document doc = null;
+
+        // Determine the XML Version of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the DOM Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                try {
+                    return doc.getXmlVersion();
+                } catch (AbstractMethodError e) {
+                    //ignore, impl does not support the method
+                }
+            }
+        }
+        // The version will be treated as "1.0" which may result in
+        // an ill-formed document being serialized.
+        // If nodeArg does not have an ownerDocument, treat this as XML 1.0
+        return "1.0";
+    }
+
+    /**
+     * Determines the XML Encoding of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then the default encoding "UTF-8" is returned.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the encoding pseudo-attribute of the XMLDecl.
+     * @throws Throwable if the DOM implementation does not implement Document.getXmlEncoding()
+     */
+    protected String getXMLEncoding(Node nodeArg) {
+        Document doc = null;
+
+        // Determine the XML Encoding of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the XML Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                return doc.getXmlEncoding();
+            }
+        }
+        // The default encoding is UTF-8 except for the writeToString method
+        return "UTF-8";
+    }
+
+    /**
+     * Determines the Input Encoding of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then null is returned.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the input encoding.
+     */
+    protected String getInputEncoding(Node nodeArg)  {
+        Document doc = null;
+
+        // Determine the Input Encoding of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the DOM Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                return doc.getInputEncoding();
+            }
+        }
+        // The default encoding returned is null
+        return null;
+    }
+
+    /**
+     * This method returns the LSSerializer's error handler.
+     *
+     * @return Returns the fDOMErrorHandler.
+     */
+    public DOMErrorHandler getErrorHandler() {
+        return fDOMErrorHandler;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,315 @@
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+/**
+ * Namespace support for XML document handlers. This class doesn't
+ * perform any error checking and assumes that all strings passed
+ * as arguments to methods are unique symbols. The SymbolTable class
+ * can be used for this purpose.
+ *
+ * Derived from org.apache.xerces.util.NamespaceSupport
+ *
+ * @author Andy Clark, IBM
+ *
+ * @version $Id: Exp $
+ */
+public class NamespaceSupport {
+
+        static final String PREFIX_XML = "xml".intern();
+
+        static final String PREFIX_XMLNS = "xmlns".intern();
+
+    /**
+     * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is
+     * the Namespace URI that is automatically mapped to the "xml" prefix.
+     */
+    public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern();
+
+    /**
+     * XML Information Set REC
+     * all namespace attributes (including those named xmlns,
+     * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
+     */
+    public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
+
+        //
+    // Data
+    //
+
+    /**
+     * Namespace binding information. This array is composed of a
+     * series of tuples containing the namespace binding information:
+     * &lt;prefix, uri&gt;. The default size can be set to anything
+     * as long as it is a power of 2 greater than 1.
+     *
+     * @see #fNamespaceSize
+     * @see #fContext
+     */
+    protected String[] fNamespace = new String[16 * 2];
+
+    /** The top of the namespace information array. */
+    protected int fNamespaceSize;
+
+    // NOTE: The constructor depends on the initial context size
+    //       being at least 1. -Ac
+
+    /**
+     * Context indexes. This array contains indexes into the namespace
+     * information array. The index at the current context is the start
+     * index of declared namespace bindings and runs to the size of the
+     * namespace information array.
+     *
+     * @see #fNamespaceSize
+     */
+    protected int[] fContext = new int[8];
+
+    /** The current context. */
+    protected int fCurrentContext;
+
+    protected String[] fPrefixes = new String[16];
+
+    //
+    // Constructors
+    //
+
+    /** Default constructor. */
+    public NamespaceSupport() {
+    } // <init>()
+
+    //
+    // Public methods
+    //
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#reset()
+         */
+    public void reset() {
+
+        // reset namespace and context info
+        fNamespaceSize = 0;
+        fCurrentContext = 0;
+        fContext[fCurrentContext] = fNamespaceSize;
+
+        // bind "xml" prefix to the XML uri
+        fNamespace[fNamespaceSize++] = PREFIX_XML;
+        fNamespace[fNamespaceSize++] = XML_URI;
+        // bind "xmlns" prefix to the XMLNS uri
+        fNamespace[fNamespaceSize++] = PREFIX_XMLNS;
+        fNamespace[fNamespaceSize++] = XMLNS_URI;
+        ++fCurrentContext;
+
+    } // reset(SymbolTable)
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#pushContext()
+         */
+    public void pushContext() {
+
+        // extend the array, if necessary
+        if (fCurrentContext + 1 == fContext.length) {
+            int[] contextarray = new int[fContext.length * 2];
+            System.arraycopy(fContext, 0, contextarray, 0, fContext.length);
+            fContext = contextarray;
+        }
+
+        // push context
+        fContext[++fCurrentContext] = fNamespaceSize;
+
+    } // pushContext()
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#popContext()
+         */
+    public void popContext() {
+        fNamespaceSize = fContext[fCurrentContext--];
+    } // popContext()
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#declarePrefix(String, String)
+         */
+    public boolean declarePrefix(String prefix, String uri) {
+        // ignore "xml" and "xmlns" prefixes
+        if (prefix == PREFIX_XML || prefix == PREFIX_XMLNS) {
+            return false;
+        }
+
+        // see if prefix already exists in current context
+        for (int i = fNamespaceSize; i > fContext[fCurrentContext]; i -= 2) {
+            //if (fNamespace[i - 2] == prefix) {
+                if (fNamespace[i - 2].equals(prefix) )  {
+                // REVISIT: [Q] Should the new binding override the
+                //          previously declared binding or should it
+                //          it be ignored? -Ac
+                // NOTE:    The SAX2 "NamespaceSupport" helper allows
+                //          re-bindings with the new binding overwriting
+                //          the previous binding. -Ac
+                fNamespace[i - 1] = uri;
+                return true;
+            }
+        }
+
+        // resize array, if needed
+        if (fNamespaceSize == fNamespace.length) {
+            String[] namespacearray = new String[fNamespaceSize * 2];
+            System.arraycopy(fNamespace, 0, namespacearray, 0, fNamespaceSize);
+            fNamespace = namespacearray;
+        }
+
+        // bind prefix to uri in current context
+        fNamespace[fNamespaceSize++] = prefix;
+        fNamespace[fNamespaceSize++] = uri;
+
+        return true;
+
+    } // declarePrefix(String,String):boolean
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getURI(String)
+         */
+    public String getURI(String prefix) {
+
+        // find prefix in current context
+        for (int i = fNamespaceSize; i > 0; i -= 2) {
+            //if (fNamespace[i - 2] == prefix) {
+                if (fNamespace[i - 2].equals(prefix) ) {
+                return fNamespace[i - 1];
+            }
+        }
+
+        // prefix not found
+        return null;
+
+    } // getURI(String):String
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getPrefix(String)
+         */
+    public String getPrefix(String uri) {
+
+        // find uri in current context
+        for (int i = fNamespaceSize; i > 0; i -= 2) {
+            //if (fNamespace[i - 1] == uri) {
+                if (fNamespace[i - 1].equals(uri) ) {
+                //if (getURI(fNamespace[i - 2]) == uri)
+                        if (getURI(fNamespace[i - 2]).equals(uri) )
+                    return fNamespace[i - 2];
+            }
+        }
+
+        // uri not found
+        return null;
+
+    } // getPrefix(String):String
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount()
+         */
+    public int getDeclaredPrefixCount() {
+        return (fNamespaceSize - fContext[fCurrentContext]) / 2;
+    } // getDeclaredPrefixCount():int
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int)
+         */
+    public String getDeclaredPrefixAt(int index) {
+        return fNamespace[fContext[fCurrentContext] + index * 2];
+    } // getDeclaredPrefixAt(int):String
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getAllPrefixes()
+         */
+        public Enumeration getAllPrefixes() {
+        int count = 0;
+        if (fPrefixes.length < (fNamespace.length/2)) {
+            // resize prefix array
+            String[] prefixes = new String[fNamespaceSize];
+            fPrefixes = prefixes;
+        }
+        String prefix = null;
+        boolean unique = true;
+        for (int i = 2; i < (fNamespaceSize-2); i += 2) {
+            prefix = fNamespace[i + 2];
+            for (int k=0;k<count;k++){
+                if (fPrefixes[k]==prefix){
+                    unique = false;
+                    break;
+                }
+            }
+            if (unique){
+                fPrefixes[count++] = prefix;
+            }
+            unique = true;
+        }
+                return new Prefixes(fPrefixes, count);
+        }
+
+    protected final class Prefixes implements Enumeration {
+        private String[] prefixes;
+        private int counter = 0;
+        private int size = 0;
+
+                /**
+                 * Constructor for Prefixes.
+                 */
+                public Prefixes(String [] prefixes, int size) {
+                        this.prefixes = prefixes;
+            this.size = size;
+                }
+
+       /**
+                 * @see java.util.Enumeration#hasMoreElements()
+                 */
+                public boolean hasMoreElements() {
+                        return (counter< size);
+                }
+
+                /**
+                 * @see java.util.Enumeration#nextElement()
+                 */
+                public Object nextElement() {
+            if (counter< size){
+                return fPrefixes[counter++];
+            }
+                        throw new NoSuchElementException("Illegal access to Namespace prefixes enumeration.");
+                }
+
+        public String toString(){
+            StringBuffer buf = new StringBuffer();
+            for (int i=0;i<size;i++){
+                buf.append(prefixes[i]);
+                buf.append(" ");
+            }
+
+            return buf.toString();
+        }
+
+}
+
+} // class NamespaceSupport
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/MsgKey.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/MsgKey.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -99,4 +101,36 @@
     public static final String ER_FACTORY_PROPERTY_MISSING = "ER_FACTORY_PROPERTY_MISSING";
     public static final String ER_ENCODING_NOT_SUPPORTED = "ER_ENCODING_NOT_SUPPORTED";
 
+    // DOM Exceptions
+    public static final String ER_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND";
+    public static final String ER_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED";
+    public static final String ER_STRING_TOO_LONG = "DOMSTRING_SIZE_ERR";
+    public static final String ER_TYPE_MISMATCH_ERR = "TYPE_MISMATCH_ERR";
+
+    // DOM Level 3 load and save messages
+    public static final String ER_NO_OUTPUT_SPECIFIED = "no-output-specified";
+    public static final String ER_UNSUPPORTED_ENCODING = "unsupported-encoding";
+    public static final String ER_ELEM_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference";
+    public static final String ER_ATTR_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference";
+    public static final String ER_CDATA_SECTIONS_SPLIT = "cdata-sections-splitted";
+    public static final String ER_WF_INVALID_CHARACTER = "wf-invalid-character";
+    public static final String ER_WF_INVALID_CHARACTER_IN_NODE_NAME = "wf-invalid-character-in-node-name";
+
+    // DOM Level 3 Implementation specific Exceptions
+    public static final String ER_UNABLE_TO_SERIALIZE_NODE = "ER_UNABLE_TO_SERIALIZE_NODE";
+    public static final String ER_WARNING_WF_NOT_CHECKED = "ER_WARNING_WF_NOT_CHECKED";
+
+    public static final String ER_WF_INVALID_CHARACTER_IN_COMMENT = "ER_WF_INVALID_CHARACTER_IN_COMMENT";
+    public static final String ER_WF_INVALID_CHARACTER_IN_PI = "ER_WF_INVALID_CHARACTER_IN_PI";
+    public static final String ER_WF_INVALID_CHARACTER_IN_CDATA = "ER_WF_INVALID_CHARACTER_IN_CDATA";
+    public static final String ER_WF_INVALID_CHARACTER_IN_TEXT = "ER_WF_INVALID_CHARACTER_IN_TEXT";
+    public static final String ER_WF_DASH_IN_COMMENT = "ER_WF_DASH_IN_COMMENT";
+    public static final String ER_WF_LT_IN_ATTVAL = "ER_WF_LT_IN_ATTVAL";
+    public static final String ER_WF_REF_TO_UNPARSED_ENT = "ER_WF_REF_TO_UNPARSED_ENT";
+    public static final String ER_WF_REF_TO_EXTERNAL_ENT =  "ER_WF_REF_TO_EXTERNAL_ENT";
+    public static final String ER_NS_PREFIX_CANNOT_BE_BOUND =  "ER_NS_PREFIX_CANNOT_BE_BOUND";
+    public static final String ER_NULL_LOCAL_ELEMENT_NAME = "ER_NULL_LOCAL_ELEMENT_NAME";
+    public static final String ER_NULL_LOCAL_ATTR_NAME = "ER_NULL_LOCAL_ATTR_NAME";
+    public static final String ER_WRITING_INTERNAL_SUBSET = "ER_WRITING_INTERNAL_SUBSET";
+
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,97 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Warning:  The encoding ''{0}'' is not supported by the Java runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "The parameter ''{0}'' is not recognized."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "The parameter ''{0}'' is recognized but the requested value cannot be set."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "The resulting string is too long to fit in a DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "The value type for this parameter name is incompatible with the expected value type."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "The output destination for data to be written to was null."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "An unsupported encoding is encountered."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "The node could not be serialized."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "The CDATA Section contains one or more termination markers ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "An instance of the Well-Formedness checker could not be created.  The well-formed parameter was set to true but well-formedness checking can not be performed."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "The node ''{0}'' contains invalid XML characters."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the comment."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the processing instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the contents of the CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the node''s character data content."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "An invalid XML character(s) was found in the {0} node named ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "The string \"--\" is not permitted within comments."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "The value of attribute \"{1}\" associated with an element type \"{0}\" must not contain the ''<'' character."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "The unparsed entity reference \"&{0};\" is not permitted."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "The external entity reference \"&{0};\" is not permitted in an attribute value."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "The prefix \"{0}\" can not be bound to namespace \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "The local name of element \"{0}\" is null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "The local name of attr \"{0}\" is null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "The replacement text of the entity node \"{0}\" contains an element node \"{1}\" with an unbound prefix \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "The replacement text of the entity node \"{0}\" contains an attribute node \"{1}\" with an unbound prefix \"{2}\"."
+             },
+
+             { MsgKey.ER_WRITING_INTERNAL_SUBSET,
+                 "An error occured while writing the internal subset."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -122,7 +124,106 @@
         "Userinfo may not be specified if host is not specified"},
 
       { MsgKey.ER_SCHEME_REQUIRED,
-        "Scheme is required!"}
+        "Scheme is required!"},
+
+      /*
+       * Note to translators:  The words 'Properties' and
+       * 'SerializerFactory' in this message are Java class names
+       * and should not be translated.
+       */
+      {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+          "L''objecte de propietats passat a SerializerFactory no t\u00e9 cap propietat ''{0}''." },
+
+      {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+          "Av\u00eds: el temps d''execuci\u00f3 de Java no d\u00f3na suport a la codificaci\u00f3 ''{0}''." },
+
+       {MsgKey.ER_FEATURE_NOT_FOUND,
+       "El par\u00e0metre ''{0}'' no es reconeix."},
+
+       {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+       "El par\u00e0metre ''{0}'' es reconeix per\u00f2 el valor sol\u00b7licitat no es pot establir."},
+
+       {MsgKey.ER_STRING_TOO_LONG,
+       "La cadena resultant \u00e9s massa llarga per cabre en una DOMString: ''{0}''."},
+
+       {MsgKey.ER_TYPE_MISMATCH_ERR,
+       "El tipus de valor per a aquest nom de par\u00e0metre \u00e9s incompatible amb el tipus de valor esperat."},
+
+       {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+       "La destinaci\u00f3 de sortida per a les dades que s'ha d'escriure era nul\u00b7la."},
+
+       {MsgKey.ER_UNSUPPORTED_ENCODING,
+       "S'ha trobat una codificaci\u00f3 no suportada."},
+
+       {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+       "El node no s'ha pogut serialitzat."},
+
+       {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+       "La secci\u00f3 CDATA cont\u00e9 un o m\u00e9s marcadors d'acabament ']]>'."},
+
+       {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+           "No s'ha pogut crear cap inst\u00e0ncia per comprovar si t\u00e9 un format correcte o no. El par\u00e0metre del tipus ben format es va establir en cert, per\u00f2 la comprovaci\u00f3 de format no s'ha pogut realitzar."
+       },
+
+       {MsgKey.ER_WF_INVALID_CHARACTER,
+           "El node ''{0}'' cont\u00e9 car\u00e0cters XML no v\u00e0lids."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en el comentari."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en les dades d''instrucci\u00f3 de proc\u00e9s."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en els continguts de la CDATASection."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en el contingut de dades de car\u00e0cter del node."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+           "S''han trobat car\u00e0cters XML no v\u00e0lids al node {0} anomenat ''{1}''."
+       },
+
+       { MsgKey.ER_WF_DASH_IN_COMMENT,
+           "La cadena \"--\" no est\u00e0 permesa dins dels comentaris."
+       },
+
+       {MsgKey.ER_WF_LT_IN_ATTVAL,
+           "El valor d''atribut \"{1}\" associat amb un tipus d''element \"{0}\" no pot contenir el car\u00e0cter ''<''."
+       },
+
+       {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+           "La refer\u00e8ncia de l''entitat no analitzada \"&{0};\" no est\u00e0 permesa."
+       },
+
+       {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+           "La refer\u00e8ncia externa de l''entitat \"&{0};\" no est\u00e0 permesa en un valor d''atribut."
+       },
+
+       {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+           "El prefix \"{0}\" no es pot vincular a l''espai de noms \"{1}\"."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+           "El nom local de l''element \"{0}\" \u00e9s nul."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+           "El nom local d''atr \"{0}\" \u00e9s nul."
+       },
+
+       { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+           "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''element \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"."
+       },
+
+       { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+           "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''atribut \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"."
+       },
 
     };
     return contents;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -114,7 +116,106 @@
         "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli."},
 
       { MsgKey.ER_SCHEME_REQUIRED,
-        "Je vy\u017eadov\u00e1no sch\u00e9ma!"}
+        "Je vy\u017eadov\u00e1no sch\u00e9ma!"},
+
+      /*
+       * Note to translators:  The words 'Properties' and
+       * 'SerializerFactory' in this message are Java class names
+       * and should not be translated.
+       */
+      {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+          "Objekt vlastnost\u00ed p\u0159edan\u00fd faktorii SerializerFactory neobsahuje vlastnost ''{0}''. " },
+
+      {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+          "Varov\u00e1n\u00ed: K\u00f3dov\u00e1n\u00ed ''{0}'' nen\u00ed v b\u011bhov\u00e9m prost\u0159ed\u00ed Java podporov\u00e1no." },
+
+       {MsgKey.ER_FEATURE_NOT_FOUND,
+       "Parametr ''{0}'' nebyl rozpozn\u00e1n."},
+
+       {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+       "Parametr ''{0}'' byl rozpozn\u00e1n, ale nelze nastavit po\u017eadovanou hodnotu."},
+
+       {MsgKey.ER_STRING_TOO_LONG,
+       "V\u00fdsledn\u00fd \u0159et\u011bzec je p\u0159\u00edli\u0161 dlouh\u00fd pro \u0159et\u011bzec DOMString: ''{0}''."},
+
+       {MsgKey.ER_TYPE_MISMATCH_ERR,
+       "Typ hodnoty pro tento n\u00e1zev parametru nen\u00ed kompatibiln\u00ed s o\u010dek\u00e1van\u00fdm typem hodnoty."},
+
+       {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+       "C\u00edlov\u00e9 um\u00edst\u011bn\u00ed v\u00fdstupu pro data ur\u010den\u00e1 k z\u00e1pisu je rovno hodnot\u011b Null. "},
+
+       {MsgKey.ER_UNSUPPORTED_ENCODING,
+       "Bylo nalezeno nepodporovan\u00e9 k\u00f3dov\u00e1n\u00ed."},
+
+       {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+       "Nelze prov\u00e9st serializaci uzlu. "},
+
+       {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+       "Sekce CDATA obsahuje jednu nebo v\u00edce ukon\u010dovac\u00edch zna\u010dek ']]>'."},
+
+       {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+           "Nelze vytvo\u0159it instanci modulu pro kontrolu spr\u00e1vn\u00e9ho utvo\u0159en\u00ed. Parametr spr\u00e1vn\u00e9ho utvo\u0159en\u00ed byl nastaven na hodnotu true, nepoda\u0159ilo se v\u0161ak zkontrolovat spr\u00e1vnost utvo\u0159en\u00ed. "
+       },
+
+       {MsgKey.ER_WF_INVALID_CHARACTER,
+           "Uzel ''{0}'' obsahuje neplatn\u00e9 znaky XML. "
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+           "V pozn\u00e1mce byl zji\u0161t\u011bn neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+           "V datech instrukce zpracov\u00e1n\u00ed byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+           "V odd\u00edlu CDATASection byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+           "V obsahu znakov\u00fdch dat uzlu byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+           "V objektu {0} s n\u00e1zvem ''{1}'' byl nalezen neplatn\u00fd znak XML. "
+       },
+
+       { MsgKey.ER_WF_DASH_IN_COMMENT,
+           "V pozn\u00e1mk\u00e1ch nen\u00ed povolen \u0159et\u011bzec \"--\"."
+       },
+
+       {MsgKey.ER_WF_LT_IN_ATTVAL,
+           "Hodnota atributu \"{1}\" souvisej\u00edc\u00edho s typem prvku \"{0}\" nesm\u00ed obsahovat znak ''<''."
+       },
+
+       {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+           "Odkaz na neanalyzovanou entitu \"&{0};\" nen\u00ed povolen."
+       },
+
+       {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+           "Extern\u00ed odkaz na entitu \"&{0};\" nen\u00ed v hodnot\u011b atributu povolen."
+       },
+
+       {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+           "P\u0159edpona \"{0}\" nesm\u00ed b\u00fdt v\u00e1zan\u00e1 k oboru n\u00e1zv\u016f \"{1}\"."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+           "Lok\u00e1ln\u00ed n\u00e1zev prvku \"{0}\" m\u00e1 hodnotu Null. "
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+           "Lok\u00e1ln\u00ed n\u00e1zev atributu \"{0}\" m\u00e1 hodnotu Null. "
+       },
+
+       { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+           "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel prvku \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\"."
+       },
+
+       { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+           "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel atributu \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\". "
+       },
 
     };
     return contents;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Warnung: Die Codierung \"{0}\" wird nicht von der Java-Laufzeit unterst\u00FCtzt." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Der Parameter ''{0}'' wird nicht erkannt."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Der Parameter ''{0}'' wird erkannt, der angeforderte Wert kann jedoch nicht festgelegt werden."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "Die Ergebniszeichenfolge ist zu lang f\u00fcr eine DOM-Zeichenfolge: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Der Werttyp f\u00fcr diesen Parameternamen ist nicht kompatibel mit dem erwarteten Werttyp."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "Das Ausgabeziel f\u00fcr die zu schreibenden Daten war leer."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Eine nicht unterst\u00fctzte Codierung wurde festgestellt."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Der Knoten konnte nicht serialisiert werden."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "Der Abschnitt CDATA enth\u00e4lt mindestens eine Beendigungsmarkierung ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Eine Instanz des Pr\u00fcfprogramms f\u00fcr korrekte Formatierung konnte nicht erstellt werden.  F\u00fcr den korrekt formatierten Parameter wurde der Wert 'True' festgelegt, die Pr\u00fcfung auf korrekte Formatierung kann jedoch nicht durchgef\u00fchrt werden."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Der Knoten ''{0}'' enth\u00e4lt ung\u00fcltige XML-Zeichen."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Im Kommentar wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "In der Verarbeitungsanweisung wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Im Inhalt von CDATASection wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Ein ung\u00fcltiges XML-Zeichen  (Unicode: 0x{0}) wurde im Inhalt der Zeichendaten des Knotens gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Ung\u00fcltige XML-Zeichen wurden gefunden in {0} im Knoten ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "Die Zeichenfolge \"--\" ist innerhalb von Kommentaren nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "Der Wert des Attributs \"{1}\" mit einem Elementtyp \"{0}\" darf nicht das Zeichen ''<'' enthalten."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "Der syntaktisch nicht analysierte Entit\u00e4tenverweis \"&{0};\" ist nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "Der externe Entit\u00e4tenverweis \"&{0};\" ist in einem Attributwert nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Das Pr\u00e4fix \"{0}\" kann nicht an den Namensbereich \"{1}\" gebunden werden."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Der lokale Name von Element \"{0}\" ist nicht angegeben."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Der lokale Name des Attributs \"{0}\" ist nicht angegeben."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Elementknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Attributknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -198,8 +200,95 @@
                 "El objeto de propiedades transferido a SerializerFactory no tiene una propiedad ''{0}''." },
 
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
-                "Advertencia: el tiempo de ejecuci\u00F3n de Java no soporta la codificaci\u00F3n ''{0}''." },
+                "Aviso: La codificaci\u00f3n ''{0}'' no est\u00e1 soportada por Java Runtime." },
+
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "El par\u00e1metro ''{0}'' no se reconoce."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Se reconoce el par\u00e1metro ''{0}'' pero no puede establecerse el valor solicitado."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La serie producida es demasiado larga para ajustarse a DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "El tipo de valor para este nombre de par\u00e1metro es incompatible con el tipo de valor esperado."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "El destino de salida de escritura de los datos es nulo."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Se ha encontrado una codificaci\u00f3n no soportada."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "No se ha podido serializar el nodo."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La secci\u00f3n CDATA contiene uno o m\u00e1s marcadores ']]>' de terminaci\u00f3n."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "No se ha podido crear una instancia del comprobador de gram\u00e1tica correcta.  El par\u00e1metro well-formed se ha establecido en true pero no se puede realizar la comprobaci\u00f3n de gram\u00e1tica correcta."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "El nodo ''{0}'' contiene caracteres XML no v\u00e1lidos."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el comentario."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en los datos de la instrucci\u00f3n de proceso."
+             },
 
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de datos de caracteres del nodo."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Se ha encontrado un car\u00e1cter o caracteres XML no v\u00e1lidos en el nodo {0} denominado ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "No se permite la serie \"--\" dentro de los comentarios."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00e1cter ''''<''''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "No se permite la referencia de entidad no analizada \"&{0};\"."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "La referencia de entidad externa \"&{0};\" no est\u00e1 permitida en un valor de atributo."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "No se puede encontrar el prefijo \"{0}\" en el espacio de nombres \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "El nombre local del elemento \"{0}\" es null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "El nombre local del atributo \"{0}\" es null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de elemento \"{1}\" con un prefijo no enlazado \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de atributo \"{1}\" con un prefijo no enlazado \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Avertissement : l''encodage ''{0}'' n''est pas pris en charge par l''ex\u00E9cution Java." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Le param\u00e8tre ''{0}'' n''est pas reconnu."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Le param\u00e8tre ''{0}'' est reconnu mas la valeur demand\u00e9e ne peut pas \u00eatre d\u00e9finie."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La cha\u00eene obtenue est trop longue pour un DOMString : ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Le type de valeur de ce param\u00e8tre est incompatible avec le type de valeur attendu."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "La sortie de destination des donn\u00e9es \u00e0 \u00e9crire \u00e9tait vide."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Codage non pris en charge."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Le noeud ne peut pas \u00eatre s\u00e9rialis\u00e9."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La section CDATA contient un ou plusieurs marqueurs de fin ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Aucune instance du programme de v\u00e9rification de la formation n'a pu \u00eatre cr\u00e9\u00e9e.  La valeur true a \u00e9t\u00e9 attribu\u00e9e au param\u00e8tre well-formed mais la v\u00e9rification de la formation n'a pas pu \u00eatre effectu\u00e9e."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Le noeud ''{0}'' contient des caract\u00e8res XML non valides."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le commentaire."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans les donn\u00e9es de l''instruction de traitement."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Un caract\u00e8re XML non valide (Unicode: 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu de la CDATASection"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu des donn\u00e9es de type caract\u00e8res du noeud."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Un ou plusieurs caract\u00e8res non valides ont \u00e9t\u00e9 trouv\u00e9s dans le noeud {0} nomm\u00e9 ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "La cha\u00eene \"--\" est interdite dans des commentaires."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "La valeur de l''attribut \"{1}\" associ\u00e9 \u00e0 un type d''\u00e9l\u00e9ment \"{0}\" ne doit pas contenir le caract\u00e8re ''<''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "La r\u00e9f\u00e9rence d''entit\u00e9 non analys\u00e9e \"&{0};\" n''est pas admise."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "La r\u00e9f\u00e9rence d''entit\u00e9 externe \"&{0};\" n''est pas admise dans une valeur d''attribut."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Le pr\u00e9fixe \"{0}\" ne peut pas \u00eatre li\u00e9 \u00e0 l''espace de noms \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Le nom local de l''\u00e9l\u00e9ment \"{0}\" a une valeur null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Le nom local de l''attribut \"{0}\" a une valeur null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contaient un noeud d''\u00e9l\u00e9ment \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contient un noeud d''attribut \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Avvertenza: la codifica ''{0}'' non \u00E8 supportata da Java Runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Il parametro ''{0}'' non \u00e8 riconosciuto."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Il parametro ''{0}'' \u00e8 riconosciuto ma non \u00e8 possibile impostare il valore richiesto."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La stringa risultante \u00e8 troppo lunga per essere inserita in DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Il tipo di valore per questo nome di parametro non \u00e8 compatibile con il tipo di valore previsto."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "La destinazione di output in cui scrivere i dati era nulla."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u00c8 stata rilevata una codifica non supportata."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Impossibile serializzare il nodo."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La Sezione CDATA contiene uno o pi\u00f9 markers di termine ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Impossibile creare un'istanza del controllore Well-Formedness.  Il parametro well-formed \u00e8 stato impostato su true ma non \u00e8 possibile eseguire i controlli well-formedness."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Il nodo ''{0}'' contiene caratteri XML non validi."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Trovato un carattere XML non valido (Unicode: 0x{0}) nel commento."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nell''elaborazione di instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto di CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto dati di caratteri del nodo. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Carattere XML non valido rilevato nel nodo {0} denominato ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "La stringa \"--\" non \u00e8 consentita nei commenti."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "Il valore dell''''attributo \"{1}\" associato con un tipo di elemento \"{0}\" non deve contenere il carattere ''<''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "Il riferimento entit\u00e0 non analizzata \"&{0};\" non \u00e8 permesso."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "Il riferimento all''''entit\u00e0 esterna \"&{0};\" non \u00e8 permesso in un valore attributo."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Il prefisso \"{0}\" non pu\u00f2 essere associato allo spazio nome \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Il nome locale dell''''elemento \"{0}\" \u00e8 null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Il nome locale dell''''attributo \"{0}\" \u00e8  null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di elemento \"{1}\" con un prefisso non associato \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di attributo \"{1}\" con un prefisso non associato \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\u8B66\u544A:  \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0''{0}''\u306F\u3001Java\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002" },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u3002"},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u3059\u304c\u3001\u8981\u6c42\u3055\u308c\u305f\u5024\u306f\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002"},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\u7d50\u679c\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u9577\u3059\u304e\u308b\u305f\u3081\u3001DOMString \u5185\u306b\u53ce\u307e\u308a\u307e\u305b\u3093: ''{0}''\u3002"},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u540d\u306e\u5024\u306e\u578b\u306f\u3001\u671f\u5f85\u3055\u308c\u308b\u5024\u306e\u578b\u3068\u4e0d\u9069\u5408\u3067\u3059\u3002"},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306e\u51fa\u529b\u5b9b\u5148\u304c\u30cc\u30eb\u3067\u3059\u3002"},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002"},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\u30ce\u30fc\u30c9\u3092\u76f4\u5217\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002"},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306b 1 \u3064\u4ee5\u4e0a\u306e\u7d42\u4e86\u30de\u30fc\u30ab\u30fc ']]>' \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "\u6574\u5f62\u5f0f\u6027\u30c1\u30a7\u30c3\u30ab\u30fc\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002  well-formed \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u306f true \u3067\u3057\u305f\u304c\u3001\u6574\u5f62\u5f0f\u6027\u306e\u691c\u67fb\u306f\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "\u30ce\u30fc\u30c9 ''{0}'' \u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u3042\u308a\u307e\u3059\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\u30b3\u30e1\u30f3\u30c8\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\u51e6\u7406\u547d\u4ee4\u30c7\u30fc\u30bf\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\u30ce\u30fc\u30c9\u306e\u6587\u5b57\u30c7\u30fc\u30bf\u306e\u5185\u5bb9\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e {0} \u30ce\u30fc\u30c9\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\u30b9\u30c8\u30ea\u30f3\u30b0 \"--\" \u306f\u30b3\u30e1\u30f3\u30c8\u5185\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\u8981\u7d20\u578b \"{0}\" \u306b\u95a2\u9023\u3057\u305f\u5c5e\u6027 \"{1}\" \u306e\u5024\u306b\u306f ''<'' \u6587\u5b57\u3092\u542b\u3081\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\u89e3\u6790\u5bfe\u8c61\u5916\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\u5c5e\u6027\u5024\u3067\u306e\u5916\u90e8\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\u63a5\u982d\u90e8 \"{0}\" \u306f\u540d\u524d\u7a7a\u9593 \"{1}\" \u306b\u7d50\u5408\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\u8981\u7d20 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\u5c5e\u6027 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002"
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u8981\u7d20\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u5c5e\u6027\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\uACBD\uACE0: \uC778\uCF54\uB529 ''{0}''\uC740(\uB294) Java \uB7F0\uD0C0\uC784\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub97c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub294 \uc778\uc2dd\ud560 \uc218 \uc788\uc73c\ub098 \uc694\uccad\ub41c \uac12\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\uacb0\uacfc \ubb38\uc790\uc5f4\uc774 \ub108\ubb34 \uae38\uc5b4 DOMString\uc5d0 \ub9de\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4: ''{0}'' "},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\uc774 \ub9e4\uac1c\ubcc0\uc218 \uc774\ub984\uc5d0 \ub300\ud55c \uac12 \uc720\ud615\uc774 \uc608\uc0c1 \uac12 \uc720\ud615\uacfc \ud638\ud658\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\ub370\uc774\ud130\ub97c \uae30\ub85d\ud560 \ucd9c\ub825 \ub300\uc0c1\uc774 \ub110(null)\uc785\ub2c8\ub2e4."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529\uc774 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\ub178\ub4dc\ub97c \uc9c1\ub82c\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \uc139\uc158\uc5d0 \uc885\ub8cc \ud45c\uc2dc \ubb38\uc790\uc778 ']]>'\uac00 \ud558\ub098 \uc774\uc0c1 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Well-Formedness \uac80\uc0ac\uae30\uc758 \uc778\uc2a4\ud134\uc2a4\ub97c \uc791\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. Well-Formed \ub9e4\uac1c\ubcc0\uc218\uac00 true\ub85c \uc124\uc815\ub418\uc5c8\uc9c0\ub9cc Well-Formedness \uac80\uc0ac\ub97c \uc218\ud589\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "''{0}'' \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\uc124\uba85\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\ucc98\ub9ac \uba85\ub839\uc5b4 \ub370\uc774\ud130\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4 "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "CDATASection\uc758 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\ub178\ub4dc\uc758 \ubb38\uc790 \ub370\uc774\ud130 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "\uc774\ub984\uc774 ''{1}''\uc778 {0} \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\uc124\uba85 \ub0b4\uc5d0\uc11c\ub294 \"--\" \ubb38\uc790\uc5f4\uc774 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\"{0}\" \uc694\uc18c \uc720\ud615\uacfc \uc5f0\uad00\ub41c \"{1}\" \uc18d\uc131\uac12\uc5d0 ''<'' \ubb38\uc790\uac00 \ud3ec\ud568\ub418\uba74 \uc548\ub429\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\"&{0};\"\uc758 \uad6c\ubd84 \ubd84\uc11d\ub418\uc9c0 \uc54a\uc740 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub294 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\uc18d\uc131\uac12\uc5d0\ub294 \"&{0};\" \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\uac00 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. "
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\"{0}\" \uc811\ub450\ubd80\ub97c \"{1}\" \uc774\ub984 \uacf5\uac04\uc5d0 \ubc14\uc778\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\"{0}\" \uc694\uc18c\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\"{0}\" \uc18d\uc131\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc694\uc18c \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc18d\uc131 \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Advert\u00EAncia: a codifica\u00E7\u00E3o ''{0}'' n\u00E3o \u00E9 suportada pelo Java runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "O par\u00e2metro ''{0}'' n\u00e3o \u00e9 reconhecido."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "O par\u00e2metro ''{0}'' \u00e9 reconhecido, mas o valor pedido n\u00e3o pode ser definido. "},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "A cadeia resultante \u00e9 muito longa para caber em uma DOMString: ''{0}''. "},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "O tipo de valor para este nome de par\u00e2metro \u00e9 incompat\u00edvel com o tipo de valor esperado. "},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "O destino de sa\u00edda para os dados a serem gravados era nulo. "},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Uma codifica\u00e7\u00e3o n\u00e3o suportada foi encontrada. "},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "O n\u00f3 n\u00e3o p\u00f4de ser serializado."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "A Se\u00e7\u00e3o CDATA cont\u00e9m um ou mais marcadores de t\u00e9rmino ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Uma inst\u00e2ncia do verificador Well-Formedness n\u00e3o p\u00f4de ser criada. O par\u00e2metro well-formed foi definido como true, mas a verifica\u00e7\u00e3o well-formedness n\u00e3o pode ser executada."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "O n\u00f3 ''{0}'' cont\u00e9m caracteres XML inv\u00e1lidos. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no coment\u00e1rio. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no processo instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado nos conte\u00fados do CDATASection. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no conte\u00fado dos dados de caractere dos n\u00f3s. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Um caractere inv\u00e1lido foi encontrado no {0} do n\u00f3 denominado ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "A cadeia \"--\" n\u00e3o \u00e9 permitida dentro dos coment\u00e1rios. "
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00e3o deve conter o caractere ''<''. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "A refer\u00eancia de entidade n\u00e3o analisada \"&{0};\" n\u00e3o \u00e9 permitida. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "A refer\u00eancia de entidade externa \"&{0};\" n\u00e3o \u00e9 permitida em um valor de atributo. "
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "O prefixo \"{0}\" n\u00e3o pode ser vinculado ao espa\u00e7o de nomes \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "O nome local do elemento \"{0}\" \u00e9 nulo."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "O nome local do atributo \"{0}\" \u00e9 nulo."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de elemento \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de atributo \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\u8B66\u544A:  Java Runtime \u4E0D\u652F\u63F4\u7DE8\u78BC ''{0}''\u3002" },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "\u7121\u6cd5\u8fa8\u8b58\u53c3\u6578 ''{0}''\u3002"},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "\u53ef\u8fa8\u8b58 ''{0}'' \u53c3\u6578\uff0c\u4f46\u6240\u8981\u6c42\u7684\u503c\u7121\u6cd5\u8a2d\u5b9a\u3002"},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\u7d50\u679c\u5b57\u4e32\u904e\u9577\uff0c\u7121\u6cd5\u7f6e\u5165 DOMString: ''{0}'' \u4e2d\u3002"},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\u9019\u500b\u53c3\u6578\u540d\u7a31\u7684\u503c\u985e\u578b\u8207\u671f\u671b\u503c\u985e\u578b\u4e0d\u76f8\u5bb9\u3002"},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\u8cc7\u6599\u8981\u5beb\u5165\u7684\u8f38\u51fa\u76ee\u7684\u5730\u70ba\u7a7a\u503c\u3002"},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u767c\u73fe\u4e0d\u652f\u63f4\u7684\u7de8\u78bc\u3002"},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\u7bc0\u9ede\u7121\u6cd5\u5e8f\u5217\u5316\u3002"},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \u5340\u6bb5\u5305\u542b\u4e00\u6216\u591a\u500b\u7d42\u6b62\u6a19\u8a18 ']]>'\u3002"},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "\u7121\u6cd5\u5efa\u7acb\u300c\u5f62\u5f0f\u5b8c\u6574\u300d\u6aa2\u67e5\u7a0b\u5f0f\u7684\u5be6\u4f8b\u3002Well-formed \u53c3\u6578\u96d6\u8a2d\u70ba true\uff0c\u4f46\u7121\u6cd5\u57f7\u884c\u5f62\u5f0f\u5b8c\u6574\u6aa2\u67e5\u3002"
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "\u7bc0\u9ede ''{0}'' \u5305\u542b\u7121\u6548\u7684 XML \u5b57\u5143\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\u5728\u8a3b\u89e3\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\u5728\u8655\u7406\u7a0b\u5e8f instructiondata \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "\u5728 CDATASection \u7684\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\u5728\u7bc0\u9ede\u7684\u5b57\u5143\u8cc7\u6599\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "\u5728\u540d\u70ba ''{1}'' \u7684 ''{0}'' \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143\u3002"
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\u8a3b\u89e3\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5b57\u4e32 \"--\"\u3002"
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\u8207\u5143\u7d20\u985e\u578b \"{0}\" \u76f8\u95dc\u806f\u7684\u5c6c\u6027 \"{1}\" \u503c\u4e0d\u53ef\u5305\u542b ''<'' \u5b57\u5143\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\u4e0d\u5141\u8a31\u4f7f\u7528\u672a\u5256\u6790\u7684\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\u5c6c\u6027\u503c\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5916\u90e8\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002"
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\u5b57\u9996 \"{0}\" \u7121\u6cd5\u9023\u7d50\u5230\u540d\u7a31\u7a7a\u9593 \"{1}\"\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\u5143\u7d20 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\u5c6c\u6027 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002"
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5143\u7d20\u7bc0\u9ede \"{1}\"\u3002"
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5c6c\u6027\u7bc0\u9ede \"{1}\"\u3002"
+             },
 
         };
 
--- a/jaxp/src/org/w3c/dom/ranges/DocumentRange.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/ranges/DocumentRange.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
 
 /**
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface DocumentRange {
     /**
--- a/jaxp/src/org/w3c/dom/ranges/Range.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/ranges/Range.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,7 +47,7 @@
 
 /**
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface Range {
     /**
--- a/jaxp/src/org/w3c/dom/ranges/RangeException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/ranges/RangeException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -45,7 +45,7 @@
  * Range operations may throw a <code>RangeException</code> as specified in
  * their method descriptions.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public class RangeException extends RuntimeException {
     public RangeException(short code, String message) {
--- a/jaxp/src/org/w3c/dom/traversal/DocumentTraversal.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/traversal/DocumentTraversal.java	Fri Aug 08 11:36:48 2014 -0700
@@ -53,7 +53,7 @@
  * Traversal feature, <code>DocumentTraversal</code> will be implemented by
  * the same objects that implement the Document interface.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface DocumentTraversal {
     /**
--- a/jaxp/src/org/w3c/dom/traversal/NodeFilter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/traversal/NodeFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,7 +59,7 @@
  * filter may be used with a number of different kinds of traversals,
  * encouraging code reuse.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface NodeFilter {
     // Constants returned by acceptNode
--- a/jaxp/src/org/w3c/dom/traversal/NodeIterator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/traversal/NodeIterator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,7 @@
  * <code>NodeIterators</code> are created by calling
  * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface NodeIterator {
     /**
--- a/jaxp/src/org/w3c/dom/traversal/TreeWalker.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxp/src/org/w3c/dom/traversal/TreeWalker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -60,7 +60,7 @@
  * nodes will be siblings and appear as direct children of the root node, no
  * matter how deeply nested the structure of the original document.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface TreeWalker {
     /**
--- a/jaxws/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -269,3 +269,5 @@
 4a099451fd7e17b6cc4772fe9547907576a45b6f jdk9-b21
 7f5e5902cde75fd9335c52f469491f061fe0239e jdk9-b22
 ce19e0403ec8a80223cc47320c905b2a4d45881d jdk9-b23
+0b35542d6bf32af23a9fc59a37c52aa091fee388 jdk9-b24
+ab8726a0fcde897e4cfd1ea581ed90b0d8a7cbb7 jdk9-b25
--- a/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -93,10 +93,11 @@
                 // otherwise, we also allow it if this code and the
                 // factory come from the same (non-system) class loader (e.g.,
                 // the JAF classes were loaded with the applet classes).
-                if (CommandMap.class.getClassLoader() == null ||
-                    CommandMap.class.getClassLoader() !=
-                            commandMap.getClass().getClassLoader())
+                ClassLoader cl = CommandMap.class.getClassLoader();
+                if (cl == null || cl.getParent() == null ||
+                    cl != commandMap.getClass().getClassLoader()) {
                     throw ex;
+                }
             }
         }
         // remove any per-thread-context-class-loader CommandMap
@@ -126,7 +127,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return the CommandInfo classes that represent the command Beans.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo[] getPreferredCommands(String mimeType, DataSource ds) {
         return getPreferredCommands(mimeType);
@@ -154,7 +155,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return the CommandInfo objects representing all the commands.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo[] getAllCommands(String mimeType, DataSource ds) {
         return getAllCommands(mimeType);
@@ -182,7 +183,7 @@
      * @param cmdName   the command name
      * @param ds        a DataSource for the data
      * @return the CommandInfo corresponding to the command.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo getCommand(String mimeType, String cmdName,
                                 DataSource ds) {
@@ -214,7 +215,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return          the DataContentHandler for the MIME type
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public DataContentHandler createDataContentHandler(String mimeType,
                                 DataSource ds) {
@@ -227,7 +228,7 @@
      * null is returned.
      *
      * @return          array of MIME types as strings, or null if not supported
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public String[] getMimeTypes() {
         return null;
--- a/jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -96,9 +96,9 @@
                 // otherwise, we also allow it if this code and the
                 // factory come from the same (non-system) class loader (e.g.,
                 // the JAF classes were loaded with the applet classes).
-                if (FileTypeMap.class.getClassLoader() == null ||
-                    FileTypeMap.class.getClassLoader() !=
-                        fileTypeMap.getClass().getClassLoader())
+                ClassLoader cl = FileTypeMap.class.getClassLoader();
+                if (cl == null || cl.getParent() == null ||
+                    cl != fileTypeMap.getClass().getClassLoader())
                     throw ex;
             }
         }
--- a/jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java	Fri Aug 08 11:36:48 2014 -0700
@@ -603,7 +603,7 @@
      * Get all the MIME types known to this command map.
      *
      * @return          array of MIME types as strings
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public synchronized String[] getMimeTypes() {
         List mtList = new ArrayList();
@@ -639,7 +639,7 @@
      * MIME type are returned.
      *
      * @return          array of native command entries
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public synchronized String[] getNativeCommands(String mimeType) {
         List cmdList = new ArrayList();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -58,7 +58,7 @@
  * This class is responsible for whitespace normalization.
  *
  * @author <ul><li>Ryan Shoemaker, Martin Grebac</li></ul>
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @deprecated in JAXB 2.2.4 - use javax.xml.bind.DatatypeConverterImpl instead
  * or let us know why you can't
  */
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB2.1.10
+ * @since JAXB 2.1.10
  */
 
 enum Messages {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class Messages
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -249,7 +249,7 @@
  *
  * @author David Megginson, david@megginson.com
  * @version 0.2
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @see org.xml.sax.XMLFilter
  * @see org.xml.sax.ContentHandler
  */
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,7 @@
  * classes like this.
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class DOMScanner implements LocatorEx,InfosetScanner/*<Node> --- but can't do this to protect 1.0 clients, or can I? */
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class Messages
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
  * AttributeList} interface, it also includes a much more efficient
  * implementation using a single array rather than a set of Vectors.</p>
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @since SAX 2.0
  * @author David Megginson
  * @version 2.0.1 (sax2r2)
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,6 +35,8 @@
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.lang.reflect.WildcardType;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
 
@@ -264,20 +266,38 @@
         return clazz.getSimpleName();
     }
 
-    public Collection<? extends Field> getDeclaredFields(Class clazz) {
-        return Arrays.asList(clazz.getDeclaredFields());
+    public Collection<? extends Field> getDeclaredFields(final Class clazz) {
+        Field[] fields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
+            @Override
+            public Field[] run() {
+                return clazz.getDeclaredFields();
+            }
+        });
+        return Arrays.asList(fields);
     }
 
-    public Field getDeclaredField(Class clazz, String fieldName) {
-        try {
-            return clazz.getDeclaredField(fieldName);
-        } catch (NoSuchFieldException e) {
-            return null;
-        }
+    public Field getDeclaredField(final Class clazz, final String fieldName) {
+        return AccessController.doPrivileged(new PrivilegedAction<Field>() {
+            @Override
+            public Field run() {
+                try {
+                    return clazz.getDeclaredField(fieldName);
+                } catch (NoSuchFieldException e) {
+                    return null;
+                }
+            }
+        });
     }
 
-    public Collection<? extends Method> getDeclaredMethods(Class clazz) {
-        return Arrays.asList(clazz.getDeclaredMethods());
+    public Collection<? extends Method> getDeclaredMethods(final Class clazz) {
+        Method[] methods =
+            AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+                @Override
+                public Method[] run() {
+                    return clazz.getDeclaredMethods();
+                }
+            });
+        return Arrays.asList(methods);
     }
 
     public Class getDeclaringClassForField(Field field) {
@@ -565,7 +585,7 @@
         return method.isBridge();
     }
 
-    public boolean isOverriding(Method method, Class base) {
+    public boolean isOverriding(Method method, final Class base) {
         // this isn't actually correct,
         // as the JLS considers
         // class Derived extends Base<Integer> {
@@ -576,22 +596,30 @@
         // }
         // to be overrided. Handling this correctly needs a careful implementation
 
-        String name = method.getName();
-        Class[] params = method.getParameterTypes();
+        final String name = method.getName();
+        final Class[] params = method.getParameterTypes();
+
+        return AccessController.doPrivileged(
+                new PrivilegedAction<Boolean>() {
 
-        while (base != null) {
-            try {
-                if (base.getDeclaredMethod(name, params) != null) {
-                    return true;
+                    @Override
+                    public Boolean run() {
+                        Class clazz = base;
+                        while (clazz != null) {
+                            try {
+                                Method m = clazz.getDeclaredMethod(name, params);
+                                if (m != null) {
+                                    return Boolean.TRUE;
+                                }
+                            } catch (NoSuchMethodException ignored) {
+                                // recursively go into the base class
+                            }
+                            clazz = clazz.getSuperclass();
+                        }
+                        return Boolean.FALSE;
+                    }
                 }
-            } catch (NoSuchMethodException e) {
-                // recursively go into the base class
-            }
-
-            base = base.getSuperclass();
-        }
-
-        return false;
+        );
     }
 
     public boolean isInterface(Class clazz) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,8 @@
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -415,6 +417,15 @@
     private static final Class[] unmarshalEventParams = { Unmarshaller.class, Object.class };
     private static Class[] marshalEventParams = { Marshaller.class };
 
+    private Method[] getDeclaredMethods(final Class<BeanT> c) {
+        return AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+            @Override
+            public Method[] run() {
+                return c.getDeclaredMethods();
+            }
+        });
+    }
+
     /**
      * use reflection to determine which of the 4 object lifecycle methods exist on
      * the JAXB bound type.
@@ -428,7 +439,7 @@
             }
 
             while (jt != null) {
-                for (Method m : jt.getDeclaredMethods()) {
+                for (Method m : getDeclaredMethods(jt)) {
                     String name = m.getName();
 
                     if (lcm.beforeUnmarshal == null) {
@@ -468,7 +479,7 @@
         } catch (SecurityException e) {
             // this happens when we don't have enough permission.
             logger.log(Level.WARNING, Messages.UNABLE_TO_DISCOVER_EVENTHANDLER.format(
-                    jaxbType.getName(), e));
+                    jaxbType.getName(), e), e);
         }
     }
 
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -229,8 +229,7 @@
             if (!Modifier.isPublic(mod) || Modifier.isFinal(mod) || !Modifier.isPublic(f.getDeclaringClass().getModifiers())) {
                 try {
                     // attempt to make it accessible, but do so in the security context of the calling application.
-                    // don't do this in the doPrivilege block, as that would create a security hole for anyone
-                    // to make any field accessible.
+                    // don't do this in the doPrivilege block
                     f.setAccessible(true);
                 } catch (SecurityException e) {
                     if ((!accessWarned) && (!supressAccessorWarnings)) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -146,26 +146,31 @@
     private static final Method findLoadedClass;
 
     static {
+        Method[] m = AccessController.doPrivileged(
+                new PrivilegedAction<Method[]>() {
+                    @Override
+                    public Method[] run() {
+                        return new Method[]{
+                                getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+                                getMethod(ClassLoader.class, "resolveClass", Class.class),
+                                getMethod(ClassLoader.class, "findLoadedClass", String.class)
+                        };
+                    }
+                }
+        );
+        defineClass = m[0];
+        resolveClass = m[1];
+        findLoadedClass = m[2];
+    }
+
+    private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
         try {
-            defineClass = ClassLoader.class.getDeclaredMethod("defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE);
-            resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass", Class.class);
-            findLoadedClass = ClassLoader.class.getDeclaredMethod("findLoadedClass", String.class);
+            Method m = c.getDeclaredMethod(methodname, params);
+            m.setAccessible(true);
+            return m;
         } catch (NoSuchMethodException e) {
-            // impossible
             throw new NoSuchMethodError(e.getMessage());
         }
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
-            @Override
-            public Void run() {
-                // TODO: check security implication
-                // do these setAccessible allow anyone to call these methods freely?s
-                defineClass.setAccessible(true);
-                resolveClass.setAccessible(true);
-                findLoadedClass.setAccessible(true);
-                return null;
-            }
-        });
     }
 
     private Injector(ClassLoader parent) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -262,7 +262,7 @@
  *
  * @author David Megginson, david@megginson.com
  * @version 0.2
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @see org.xml.sax.XMLFilter
  * @see org.xml.sax.ContentHandler
  */
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,6 +42,8 @@
 import java.io.StringWriter;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -91,8 +93,6 @@
                     }
                 } catch (XMLStreamException ex) {
                     Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
-                } catch (NoSuchMethodException ex) {
-                    Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
                 }
             }
 
@@ -282,17 +282,31 @@
                 return new Zephyr(xof,clazz);
             } catch (XMLStreamException e) {
                 return null;    // impossible
-            } catch (NoSuchMethodException e) {
-                return null;    // this xof wasn't Zephyr
             }
         }
 
-        private Zephyr(XMLOutputFactory xof, Class clazz) throws NoSuchMethodException {
+        private Zephyr(XMLOutputFactory xof, Class clazz) {
             this.xof = xof;
 
             zephyrClass = clazz;
-            setOutputMethod = clazz.getMethod("setOutput", StreamResult.class, String.class);
-            resetMethod = clazz.getMethod("reset");
+            setOutputMethod = getMethod(clazz, "setOutput", StreamResult.class, String.class);
+            resetMethod = getMethod(clazz, "reset");
+        }
+
+        private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
+            return AccessController.doPrivileged(
+                    new PrivilegedAction<Method>() {
+                        @Override
+                        public Method run() {
+                            try {
+                                return c.getMethod(methodname, params);
+                            } catch (NoSuchMethodException e) {
+                                // impossible
+                                throw new NoSuchMethodError(e.getMessage());
+                            }
+                        }
+                    }
+            );
         }
 
         /**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -42,13 +42,12 @@
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.ws.WebServiceException;
 import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.security.*;
-import java.util.PropertyPermission;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
 import java.util.logging.Level;
 
 /**
@@ -258,24 +257,13 @@
                         public JAXBContext run() throws Exception {
                             return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
                         }
-                    }, createSecurityContext()
-            );
+                    });
         } else {
             // usage from JAX-WS/Metro/Glassfish
             return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
         }
     }
 
-    private static AccessControlContext createSecurityContext() {
-        PermissionCollection perms = new Permissions();
-        perms.add(new RuntimePermission("accessClassInPackage.com" + ".sun.xml.internal.ws.runtime.config")); // avoid repackaging
-        perms.add(new ReflectPermission("suppressAccessChecks"));
-        return new AccessControlContext(
-                new ProtectionDomain[]{
-                        new ProtectionDomain(null, perms),
-                });
-    }
-
     private static boolean isJDKInternal() {
         // avoid "string repackaging"
         return MetroConfigLoader.class.getName().startsWith("com." + "sun.xml.internal.ws");
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,7 +49,7 @@
         try {
             Class<?> factoryClass;
             if (isJDKInternal(className)) {
-                factoryClass = Class.forName(className, true, null);
+                factoryClass = Class.forName(className, true, TubeCreator.class.getClassLoader());
             } else {
                 factoryClass = Class.forName(className, true, tubeFactoryClassLoader);
             }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -109,11 +109,12 @@
     }
 
     private Collection<TubeCreator> initializeTubeCreators(TubeFactoryList tfl) {
-        final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        ClassLoader classLoader = tccl != null ? tccl : TubelineAssemblyController.class.getClassLoader();
 
         LinkedList<TubeCreator> tubeCreators = new LinkedList<TubeCreator>();
         for (TubeFactoryConfig tubeFactoryConfig : tfl.getTubeFactoryConfigs()) {
-            tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, contextClassLoader));
+            tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, classLoader));
         }
         return tubeCreators;
     }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -91,7 +91,8 @@
 import java.lang.reflect.Proxy;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -715,11 +716,6 @@
         final ClassLoader loader = getDelegatingLoader(portInterface.getClassLoader(),
                 WSServiceDelegate.class.getClassLoader());
 
-        // accessClassInPackage privilege needs to be granted ...
-        RuntimePermission perm = new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.*");
-        PermissionCollection perms = perm.newPermissionCollection();
-        perms.add(perm);
-
         return AccessController.doPrivileged(
                 new PrivilegedAction<T>() {
                     @Override
@@ -728,12 +724,8 @@
                                 new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis);
                         return portInterface.cast(proxy);
                     }
-                },
-                new AccessControlContext(
-                        new ProtectionDomain[]{
-                                new ProtectionDomain(null, perms)
-                        })
-        );
+                });
+
     }
 
     private WSDLService getWSDLModelfromSEI(final Class sei) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -58,12 +58,8 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
-import java.security.AccessControlContext;
 import java.security.AccessController;
-import java.security.Permissions;
 import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.logging.Level;
@@ -569,9 +565,6 @@
 
         // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages
         if (isJDKRuntime()) {
-            Permissions permissions = new Permissions();
-            permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault"));
-            permissions.add(new ReflectPermission("suppressAccessChecks"));
             return AccessController.doPrivileged(
                     new PrivilegedAction<JAXBContext>() {
                         @Override
@@ -582,9 +575,7 @@
                                 throw new Error(e);
                             }
                         }
-                    },
-                    new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)})
-            );
+                    });
 
         } else {
             try {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -50,28 +50,36 @@
     private static final Method definePackage;
 
     static {
+        Method[] m = AccessController.doPrivileged(
+                new PrivilegedAction<Method[]>() {
+                    @Override
+                    public Method[] run() {
+                        return new Method[]{
+                                getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+                                getMethod(ClassLoader.class, "resolveClass", Class.class),
+                                getMethod(ClassLoader.class, "getPackage", String.class),
+                                getMethod(ClassLoader.class, "definePackage",
+                                        String.class, String.class, String.class, String.class,
+                                        String.class, String.class, String.class, URL.class)
+                        };
+                    }
+                }
+        );
+        defineClass = m[0];
+        resolveClass = m[1];
+        getPackage = m[2];
+        definePackage = m[3];
+    }
+
+    private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
         try {
-            defineClass = ClassLoader.class.getDeclaredMethod("defineClass",String.class,byte[].class,Integer.TYPE,Integer.TYPE);
-            resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass",Class.class);
-            getPackage = ClassLoader.class.getDeclaredMethod("getPackage", String.class);
-            definePackage = ClassLoader.class.getDeclaredMethod("definePackage",
-                    String.class, String.class, String.class, String.class,
-                    String.class, String.class, String.class, URL.class);
+            Method m = c.getDeclaredMethod(methodname, params);
+            m.setAccessible(true);
+            return m;
         } catch (NoSuchMethodException e) {
             // impossible
             throw new NoSuchMethodError(e.getMessage());
         }
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            public Void run() {
-                // TODO: check security implication
-                // do these setAccessible allow anyone to call these methods freely?s
-                defineClass.setAccessible(true);
-                resolveClass.setAccessible(true);
-                getPackage.setAccessible(true);
-                definePackage.setAccessible(true);
-                return null;
-            }
-        });
     }
 
     static synchronized Class inject(ClassLoader cl, String className, byte[] image) {
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
  * <p>The comment element is a place holder for any comments that the code
  * generator may want to include in the generated code.</p>
  *
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java	Fri Aug 08 11:36:48 2014 -0700
@@ -70,9 +70,10 @@
  * <li>If the method throws an unchecked exception the class MUST NOT be put into
  * service except in the case of EJBs where the EJB can handle exceptions and
  * even recover from them.</li></ul>
- * @since Common Annotations 1.0
+ *
  * @see javax.annotation.PreDestroy
  * @see javax.annotation.Resource
+ * @since 1.6, Common Annotations 1.0
  */
 @Documented
 @Retention (RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Fri Aug 08 11:36:48 2014 -0700
@@ -72,7 +72,7 @@
  *
  * @see javax.annotation.PostConstruct
  * @see javax.annotation.Resource
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Resource.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Resource.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,7 +48,7 @@
  * appear on private fields and methods of superclasses; the container
  * is required to perform injection in these cases as well.
  *
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 @Target({TYPE, FIELD, METHOD})
 @Retention(RUNTIME)
@@ -66,7 +66,7 @@
      * The name of the resource that the reference points to. It can
      * link to any compatible resource using the global JNDI names.
      *
-     * @since Common Annotations 1.1
+     * @since 1.7, Common Annotations 1.1
      */
 
     String lookup() default "";
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Resources.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Resources.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  * This class is used to allow multiple resources declarations.
  *
  * @see javax.annotation.Resource
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/jws/HandlerChain.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/HandlerChain.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,6 +28,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE, METHOD, FIELD})
 public @interface HandlerChain {
--- a/jaxws/src/share/jaxws_classes/javax/jws/Oneway.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/Oneway.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface Oneway {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebMethod.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebMethod.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface WebMethod {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebParam.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebParam.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({PARAMETER})
 public @interface WebParam {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebResult.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebResult.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface WebResult {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebService.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebService.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE})
 public @interface WebService {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/InitParam.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/InitParam.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,7 +25,8 @@
 
 package javax.jws.soap;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Deprecated public @interface InitParam {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE,METHOD})
 public @interface SOAPBinding {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,7 +25,8 @@
 
 package javax.jws.soap;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Deprecated public @interface SOAPMessageHandler {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,7 +27,8 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Retention(value=RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -76,7 +76,7 @@
  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
  *     Joseph Fialli
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class Binder<XmlNode> {
     /**
@@ -153,7 +153,7 @@
      *     binding.
      * @throws IllegalArgumentException
      *      If any of the input parameters are null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public abstract <T> JAXBElement<T>
         unmarshal( XmlNode xmlNode, Class<T> declaredType )
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
  * is a checked exception.
  *
  * @see JAXB
- * @since JAXB2.1
+ * @since 1.6, JAXB 2.1
  */
 public class DataBindingException extends RuntimeException {
     public DataBindingException(String message, Throwable cause) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -88,7 +88,7 @@
  * @see DatatypeConverterInterface
  * @see ParseConversionEvent
  * @see PrintConversionEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 final public class DatatypeConverter {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,7 @@
  * This class is responsible for whitespace normalization.
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.1
+ * @since JAXB 2.1
  */
 final class DatatypeConverterImpl implements DatatypeConverterInterface {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java	Fri Aug 08 11:36:48 2014 -0700
@@ -78,7 +78,7 @@
  * @see DatatypeConverter
  * @see ParseConversionEvent
  * @see PrintConversionEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public interface DatatypeConverterInterface {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  * and 5.7.1 "Bind to Java Element Interface" of the specification.
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public interface Element {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java	Fri Aug 08 11:36:48 2014 -0700
@@ -92,7 +92,7 @@
  * a non-null value.
  *
  * @author Kohsuke Kawaguchi
- * @since 2.1
+ * @since 1.6, JAXB 2.1
  */
 public final class JAXB {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -257,7 +257,7 @@
  * @see Marshaller
  * @see Unmarshaller
  * @see S 7.4.1 "Named Packages" in Java Language Specification</a>
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class JAXBContext {
 
@@ -423,7 +423,7 @@
      *   <li>failure to locate a value for the context factory provider property</li>
      *   <li>mixing schema derived packages from different providers on the same contextPath</li>
      * </ol>
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( String contextPath, ClassLoader classLoader, Map<String,?>  properties  )
         throws JAXBException {
@@ -497,7 +497,7 @@
 //     * @throws IllegalArgumentException
 //     *      if the parameter contains {@code null} (i.e., {@code newInstance(null);})
 //     *
-//     * @since JAXB2.0
+//     * @since JAXB 2.0
 //     */
 //    public static JAXBContext newInstance( Source[] externalBindings, Class... classesToBeBound )
 //        throws JAXBException {
@@ -576,7 +576,7 @@
      * @throws IllegalArgumentException
      *      if the parameter contains {@code null} (i.e., {@code newInstance(null);})
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( Class... classesToBeBound )
         throws JAXBException {
@@ -622,7 +622,7 @@
      * @throws IllegalArgumentException
      *      if the parameter contains {@code null} (i.e., {@code newInstance(null,someMap);})
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( Class[] classesToBeBound, Map<String,?> properties )
         throws JAXBException {
@@ -692,7 +692,7 @@
      *      if DOM API corresponding to <tt>domType</tt> is not supported by
      *      the implementation.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> Binder<T> createBinder(Class<T> domType) {
         // to make JAXB 1.0 implementations work, this method must not be
@@ -705,7 +705,7 @@
      *
      * @return always a new valid <tt>Binder</tt> object.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Binder<Node> createBinder() {
         return createBinder(Node.class);
@@ -722,7 +722,7 @@
      *      Calling this method on JAXB 1.0 implementations will throw
      *      an UnsupportedOperationException.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public JAXBIntrospector createJAXBIntrospector() {
         // to make JAXB 1.0 implementations work, this method must not be
@@ -744,7 +744,7 @@
      *      Calling this method on JAXB 1.0 implementations will throw
      *      an UnsupportedOperationException.
      *
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void generateSchema(SchemaOutputResolver outputResolver) throws IOException  {
         // to make JAXB 1.0 implementations work, this method must not be
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -58,7 +58,7 @@
  * </p>
  *
  * @author Kohsuke Kawaguchi, Joe Fialli
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 
 public class JAXBElement<T> implements Serializable {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
  * @see JAXBContext
  * @see Marshaller
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class JAXBException extends Exception {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,7 +41,7 @@
  * {@link JAXBContext#createJAXBIntrospector()}.
  *
  * @see JAXBContext#createJAXBIntrospector()
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class JAXBIntrospector {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java	Fri Aug 08 11:36:48 2014 -0700
@@ -73,7 +73,7 @@
  * @see java.lang.SecurityManager
  *
  * @author Joe Fialli
- * @since JAXB 2.2
+ * @since 1.7, JAXB 2.2
  */
 
 /* code was borrowed originally from java.lang.RuntimePermission. */
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
  * @see JAXBException
  * @see Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class MarshalException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java	Fri Aug 08 11:36:48 2014 -0700
@@ -311,7 +311,7 @@
  * @see JAXBContext
  * @see Validator
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface Marshaller {
 
@@ -421,7 +421,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB2.1
+     * @since 1.6, JAXB 2.1
      */
     public void marshal( Object jaxbElement, File output )
         throws JAXBException;
@@ -515,7 +515,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void marshal( Object jaxbElement, javax.xml.stream.XMLStreamWriter writer )
         throws JAXBException;
@@ -539,7 +539,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void marshal( Object jaxbElement, javax.xml.stream.XMLEventWriter writer )
         throws JAXBException;
@@ -655,7 +655,7 @@
      *      if the adapter parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setAdapter( XmlAdapter adapter );
 
@@ -684,7 +684,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
 
@@ -697,7 +697,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> A getAdapter( Class<A> type );
 
@@ -730,7 +730,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Marshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setSchema( Schema schema );
 
@@ -745,7 +745,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Marshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Schema getSchema();
 
@@ -766,7 +766,7 @@
      *
      * @see Marshaller#setListener(Listener)
      * @see Marshaller#getListener()
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static abstract class Listener {
         /**
@@ -807,7 +807,7 @@
      * One can unregister current Listener by setting listener to <tt>null</tt>.
      *
      * @param listener an instance of a class that implements {@link Listener}
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setListener(Listener listener);
 
@@ -815,7 +815,7 @@
      * <p>Return {@link Listener} registered with this {@link Marshaller}.
      *
      * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Marshaller.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Listener getListener();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface NotIdentifiableEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
  * @see ValidationEvent
  * @see ValidationEventHandler
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ParseConversionEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
  * @see ValidationEvent
  * @see ValidationEventHandler
  * @see Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface PrintConversionEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  * @see JAXBContext
  * @see Validator
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class PropertyException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,6 +42,7 @@
  *
  * @author
  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public abstract class SchemaOutputResolver {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see ValidationEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public class TypeConstraintException extends java.lang.RuntimeException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,7 @@
  * @see JAXBException
  * @see Unmarshaller
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class UnmarshalException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java	Fri Aug 08 11:36:48 2014 -0700
@@ -404,7 +404,7 @@
  * @see JAXBContext
  * @see Marshaller
  * @see Validator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface Unmarshaller {
 
@@ -474,7 +474,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If the InputStream parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Object unmarshal( Reader reader ) throws JAXBException;
 
@@ -571,7 +571,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
 
@@ -660,7 +660,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
         throws JAXBException;
@@ -696,7 +696,7 @@
      * @throws IllegalStateException
      *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
      *      START_ELEMENT  event.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      * @see #unmarshal(javax.xml.stream.XMLStreamReader, Class)
      */
     public Object unmarshal( javax.xml.stream.XMLStreamReader reader )
@@ -731,7 +731,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
 
@@ -766,7 +766,7 @@
      * @throws IllegalStateException
      *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
      *      START_ELEMENT event.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      * @see #unmarshal(javax.xml.stream.XMLEventReader, Class)
      */
     public Object unmarshal( javax.xml.stream.XMLEventReader reader )
@@ -802,7 +802,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
 
@@ -962,7 +962,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Unmarshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setSchema( javax.xml.validation.Schema schema );
 
@@ -986,7 +986,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Unmarshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public javax.xml.validation.Schema getSchema();
 
@@ -1001,7 +1001,7 @@
      *      if the adapter parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setAdapter( XmlAdapter adapter );
 
@@ -1030,7 +1030,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
 
@@ -1043,7 +1043,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> A getAdapter( Class<A> type );
 
@@ -1081,7 +1081,7 @@
      * (@link #setListener(Listener)}
      * (@link #getListener()}
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static abstract class Listener {
         /**
@@ -1128,7 +1128,7 @@
      * One can unregister current Listener by setting listener to <tt>null</tt>.
      *
      * @param listener  provides unmarshal event callbacks for this {@link Unmarshaller}
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void     setListener(Listener listener);
 
@@ -1136,7 +1136,7 @@
      * <p>Return {@link Listener} registered with this {@link Unmarshaller}.
      *
      * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Unmarshaller.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Listener getListener();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
  *
  * @author <ul><li>Kohsuke KAWAGUCHI, Sun Microsystems, Inc.</li></ul>
  * @see Unmarshaller#getUnmarshallerHandler()
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface UnmarshallerHandler extends ContentHandler
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -65,7 +65,7 @@
  * @see Marshaller
  * @see ValidationEvent
  * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEventHandler {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEventLocator {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
  * @see JAXBException
  * @see Validator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -154,7 +154,7 @@
  * @see ValidationEventHandler
  * @see ValidationEvent
  * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  * @deprecated since JAXB 2.0
  */
 public interface Validator {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,7 @@
  * be called from applications.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public interface DomHandler<ElementT,ResultT extends Result> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,7 @@
  * {@link DomHandler} implementation for W3C DOM (<code>org.w3c.dom</code> package.)
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public class W3CDomHandler implements DomHandler<Element,DOMResult> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,7 +30,7 @@
  * fields in a JAXB bound class.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessorOrder
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  * properties.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessorType
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -70,7 +70,7 @@
  *    following annotations at the package level: {@link XmlJavaTypeAdapter}.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessOrder
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -84,7 +84,7 @@
  *    following annotations at the package level: {@link XmlJavaTypeAdapter}.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessType
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -66,7 +66,7 @@
  * map's key. The key's value is the String value of the attribute.
  *
  * @author Kohsuke Kawaguchi, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -243,7 +243,7 @@
  * </pre>
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java	Fri Aug 08 11:36:48 2014 -0700
@@ -66,7 +66,7 @@
  * The above binding supports WS-I AP 1.0 <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">WS-I Attachments Profile Version 1.0.</a>
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -122,7 +122,7 @@
  * </pre>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -134,7 +134,7 @@
  *
  * <p>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD, PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -130,7 +130,7 @@
  * name "foo".
  *
  * @see XmlRegistry
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java	Fri Aug 08 11:36:48 2014 -0700
@@ -216,7 +216,7 @@
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems,Inc. </li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlElementRefs
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
@@ -284,7 +284,7 @@
      * For compatibility with JAXB 2.1, this property defaults to <tt>true</tt>,
      * despite the fact that {@link XmlElement#required()} defaults to false.
      *
-     * @since 2.2
+     * @since 1.7, JAXB 2.2
      */
     boolean required() default true;
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
  *
  * @see XmlElementWrapper
  * @see XmlElementRef
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -87,7 +87,7 @@
  * @see XmlElements
  * @see XmlElementRef
  * @see XmlElementRefs
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  *
  */
 
@@ -139,7 +139,7 @@
      * simply a mechanism to let users express their application constraints
      * better.
      *
-     * @since JAXB 2.1
+     * @since 1.6, JAXB 2.1
      */
     boolean required() default false;
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java	Fri Aug 08 11:36:48 2014 -0700
@@ -166,7 +166,7 @@
  * @see XmlElementRef
  * @see XmlElementRefs
  * @see XmlJavaTypeAdapter
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({FIELD,METHOD})
 public @interface XmlElements {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
  *
  * <p><b>Examples:</b> See examples in {@link XmlEnumValue}
  *
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java	Fri Aug 08 11:36:48 2014 -0700
@@ -114,7 +114,7 @@
  *     &lt;/xs:simpleType>
  * </pre>
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java	Fri Aug 08 11:36:48 2014 -0700
@@ -87,7 +87,7 @@
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlIDREF
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java	Fri Aug 08 11:36:48 2014 -0700
@@ -243,7 +243,7 @@
  * </pre>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlID
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java	Fri Aug 08 11:36:48 2014 -0700
@@ -51,7 +51,7 @@
  * ever called for the property. The binary data will always be inlined.
  *
  * @author Joseph Fialli
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java	Fri Aug 08 11:36:48 2014 -0700
@@ -104,7 +104,7 @@
  *  </ul>
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({FIELD,METHOD,PARAMETER})
 public @interface XmlList {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,7 +47,7 @@
  * the value of the attribute takes precedence and that will control the marshalling.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java	Fri Aug 08 11:36:48 2014 -0700
@@ -124,7 +124,7 @@
  * <p>See "Package Specification" in javax.xml.bind.package javadoc for
  * additional common information.</p>
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  *
  * <p><b>Example:</b>See <tt>XmlSchema</tt> annotation type for an example.
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,6 +61,6 @@
  * </table>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public enum XmlNsForm {UNQUALIFIED, QUALIFIED, UNSET}
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
  * Marks a class that has {@link XmlElementDecl}s.
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlElementDecl
  */
 @Retention(RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -155,7 +155,7 @@
  * </pre>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java	Fri Aug 08 11:36:48 2014 -0700
@@ -114,7 +114,7 @@
  * </pre>
 
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target(PACKAGE)
@@ -191,7 +191,7 @@
      * such attribute), for example so that the user can specify a local
      * copy of the resource through the command line interface.
      *
-     * @since JAXB2.1
+     * @since 1.6, JAXB 2.1
      */
     String location() default NO_LOCATION;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -83,7 +83,7 @@
  *     }
  * </pre>
  *
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD,METHOD,PACKAGE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlSchemaType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({PACKAGE})
 public @interface XmlSchemaTypes {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java	Fri Aug 08 11:36:48 2014 -0700
@@ -70,7 +70,7 @@
  * correctly bind <tt>Dog</tt> and <tt>Cat</tt>.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.1
+ * @since 1.6, JAXB 2.1
  */
 @Target({ElementType.TYPE})
 @Retention(RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java	Fri Aug 08 11:36:48 2014 -0700
@@ -88,7 +88,7 @@
  * </pre>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD, TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -379,7 +379,7 @@
  * @see XmlAttribute
  * @see XmlValue
  * @see XmlSchema
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java	Fri Aug 08 11:36:48 2014 -0700
@@ -124,7 +124,7 @@
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  * sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public class CollapsedStringAdapter extends XmlAdapter<String,String> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
  * This {@link XmlAdapter} binds <tt>byte[]</tt> to the hexBinary representation in XML.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public final class HexBinaryAdapter extends XmlAdapter<String,byte[]> {
     public byte[] unmarshal(String s) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  * as specified in <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">the whitespace facet 'replace'</a>
  *
  * @author Kohsuke Kawaguchi, Martin Grebac
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public final class NormalizedStringAdapter extends XmlAdapter<String,String> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -160,7 +160,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
  * @see XmlJavaTypeAdapter
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class XmlAdapter<ValueType,BoundType> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -86,7 +86,7 @@
  * <p><b> Example: </b> See example in {@link XmlAdapter}
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAdapter
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java	Fri Aug 08 11:36:48 2014 -0700
@@ -51,7 +51,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlJavaTypeAdapter
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({PACKAGE})
 public @interface XmlJavaTypeAdapters {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -279,7 +279,7 @@
         </table>
 
         <!-- Put @see and @since tags down here. -->
-        @since JAXB 2.0
+        @since 1.6, JAXB 2.0
     </body>
 </html>
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
  * @author Marc Hadley
  * @author Kohsuke Kawaguchi
  * @author Joseph Fialli
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  *
  * @see Marshaller#setAttachmentMarshaller(AttachmentMarshaller)
  *
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java	Fri Aug 08 11:36:48 2014 -0700
@@ -56,7 +56,7 @@
  * @author Kohsuke Kawaguchi
  * @author Joseph Fialli
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  *
  * @see javax.xml.bind.Unmarshaller#setAttachmentUnmarshaller(AttachmentUnmarshaller)
  *
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,7 @@
         </ul>
 
         <!-- Put @see and @since tags down here. -->
-        @since JAXB 2.0
+        @since 1.6, JAXB 2.0
     </body>
 </html>
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
  * @see javax.xml.bind.Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class AbstractMarshallerImpl implements Marshaller
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -68,7 +68,7 @@
  *         <li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li>
  *         </ul>
  * @see javax.xml.bind.Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class AbstractUnmarshallerImpl implements Unmarshaller
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -52,7 +52,7 @@
  * @see javax.xml.bind.Unmarshaller
  * @see javax.xml.bind.Validator
  * @see javax.xml.bind.ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class DefaultValidationEventHandler implements ValidationEventHandler {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,7 +41,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class NotIdentifiableEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ParseConversionEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class PrintConversionEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventImpl implements ValidationEvent
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,7 +47,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventLocatorImpl implements ValidationEventLocator
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java	Fri Aug 08 11:36:48 2014 -0700
@@ -71,6 +71,7 @@
  *
  * @author
  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public class JAXBResult extends SAXResult {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java	Fri Aug 08 11:36:48 2014 -0700
@@ -87,6 +87,7 @@
  *
  * @author
  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public class JAXBSource extends SAXSource {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java	Fri Aug 08 11:36:48 2014 -0700
@@ -45,7 +45,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventCollector implements ValidationEventHandler
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java	Fri Aug 08 11:36:48 2014 -0700
@@ -114,6 +114,8 @@
  * <PRE>
  *     ap1.clearContent();
  * </PRE>
+ *
+ * @since 1.6
  */
 
 public abstract class AttachmentPart {
@@ -190,7 +192,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      * @see #getRawContentBytes
      */
     public abstract InputStream getRawContent() throws SOAPException;
@@ -208,7 +210,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract byte[] getRawContentBytes() throws SOAPException;
 
@@ -225,7 +227,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract InputStream getBase64Content() throws SOAPException;
 
@@ -267,7 +269,7 @@
      *
      * @exception SOAPException if an there is an error in setting the content
      * @exception NullPointerException if <code>content</code> is null
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
 
@@ -285,7 +287,7 @@
      *
      * @exception SOAPException if an there is an error in setting the content
      * or content is null
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setRawContentBytes(
         byte[] content, int offset, int len,  String contentType)
@@ -309,7 +311,7 @@
      * @exception SOAPException if an there is an error in setting the content
      * @exception NullPointerException if <code>content</code> is null
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setBase64Content(
         InputStream content, String contentType) throws SOAPException;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java	Fri Aug 08 11:36:48 2014 -0700
@@ -56,6 +56,8 @@
  *    d.addDetailEntry(name);
  *    Iterator it = d.getDetailEntries();
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface Detail extends SOAPFaultElement {
 
@@ -85,7 +87,7 @@
      * DetailEntry object to this Detail object.
      *
      * @see Detail#addDetailEntry(Name name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public DetailEntry addDetailEntry(QName qname) throws SOAPException;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,6 +30,8 @@
  * a <code>SOAPFault</code> object.  A <code>DetailEntry</code> object,
  * which carries information about errors related to the <code>SOAPBody</code>
  * object that contains it, is application-specific.
+ *
+ * @since 1.6
  */
 public interface DetailEntry extends SOAPElement {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -63,6 +63,8 @@
  *        This method can be used internally by a service implementation to
  *        create a message that is a response to a request.
  * </UL>
+ *
+ * @since 1.6
  */
 public abstract class MessageFactory {
 
@@ -140,7 +142,7 @@
      * @exception SOAPException if there was an error in creating the
      *            specified implementation of  <code>MessageFactory</code>.
      * @see SAAJMetaFactory
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static MessageFactory newInstance(String protocol) throws SOAPException {
         return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,6 +32,7 @@
  * object.
  *
  * @see MimeHeaders
+ * @since 1.6
  */
 public class MimeHeader {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,7 @@
  * API.
  * @see SOAPMessage#getAttachments
  * @see AttachmentPart
+ * @since 1.6
  */
 public class MimeHeaders {
     private Vector headers;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java	Fri Aug 08 11:36:48 2014 -0700
@@ -73,6 +73,7 @@
  * in favor of <code>javax.xml.namespace.QName<code>
  * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
  * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
+ * @since 1.6
  */
 public interface Name {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,6 +30,8 @@
  * This interface extnends the standard DOM Node interface with methods for
  * getting and setting the value of a node, for
  * getting and setting the parent of a node, and for removing a node.
+ *
+ * @since 1.6
  */
 public interface Node extends org.w3c.dom.Node {
     /**
@@ -61,7 +63,7 @@
      *              node and either has more than one child node or has a child
      *              node that is not a <code>Text</code> node.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setValue(String value);
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
 * class.
 *
 * @author SAAJ RI Development Team
-* @since SAAJ 1.3
+* @since 1.6, SAAJ 1.3
 */
 
 public abstract class SAAJMetaFactory {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  *
  * @author XWS-Security Development Team
  *
- * @since SAAJ 1.3
+ * @since 1.6, SAAJ 1.3
  */
 public class SAAJResult extends DOMResult {
 
@@ -53,7 +53,7 @@
      *
      * @throws SOAPException if there is a problem creating a <code>SOAPMessage</code>
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult() throws SOAPException {
         this(MessageFactory.newInstance().createMessage());
@@ -79,7 +79,7 @@
      * @throws SOAPException if a <code>SOAPMessage</code> supporting the
      *             specified protocol cannot be created
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(String protocol) throws SOAPException {
         this(MessageFactory.newInstance(protocol).createMessage());
@@ -99,7 +99,7 @@
      *                  populated as a result of some transformation or
      *                  marshalling operation
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(SOAPMessage message) {
         super(message.getSOAPPart());
@@ -116,7 +116,7 @@
      *
      * @param rootNode - the root to which the results will be appended
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(SOAPElement rootNode) {
         super(rootNode);
@@ -125,7 +125,7 @@
 
     /**
      * @return the resulting Tree that was created under the specified root Node.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public javax.xml.soap.Node getResult() {
         return (javax.xml.soap.Node)super.getNode().getFirstChild();
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,6 +42,7 @@
  * error information, is an example of a <code>SOAPBodyElement</code> object.
  *
  * @see SOAPFault
+ * @since 1.6
  */
 public interface SOAPBody extends SOAPElement {
 
@@ -90,7 +91,7 @@
      * @exception SOAPException if there is a SOAP error
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
 
@@ -127,7 +128,7 @@
      * @see SOAPFault#setFaultString
      * @see SOAPBody#addFault(Name faultCode, String faultString, Locale locale)
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPFault addFault(QName faultCode, String faultString, Locale locale)
         throws SOAPException;
@@ -164,7 +165,7 @@
      *                if there is a SOAP error
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPFault addFault(Name faultCode, String faultString)
         throws SOAPException;
@@ -202,7 +203,7 @@
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
      * @see SOAPBody#addFault(Name faultCode, String faultString)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPFault addFault(QName faultCode, String faultString)
         throws SOAPException;
@@ -252,7 +253,7 @@
      * @exception SOAPException
      *                if a SOAP error occurs
      * @see SOAPBody#addBodyElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
 
@@ -272,7 +273,7 @@
      *         that was added.
      * @exception SOAPException
      *                if the <code>Document</code> cannot be added
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPBodyElement addDocument(org.w3c.dom.Document document)
         throws SOAPException;
@@ -290,7 +291,7 @@
      *                if there is not exactly one child <code>SOAPElement</code> of the <code>
      *              <code>SOAPBody</code>.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public org.w3c.dom.Document extractContentAsDocument()
         throws SOAPException;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,6 +38,8 @@
  * <PRE>
  *    SOAPBodyElement sbe = sb.addBodyElement(myName);
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface SOAPBodyElement extends SOAPElement {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java	Fri Aug 08 11:36:48 2014 -0700
@@ -45,6 +45,8 @@
  * directly to a URL following the request/response paradigm.  That is,
  * messages are sent using the method <code>call</code>, which sends the
  * message and then waits until it gets a reply.
+ *
+ * @since 1.6
  */
 public abstract class SOAPConnection {
 
@@ -78,7 +80,7 @@
      * @return the <code>SOAPMessage</code> object that is the response to the
      *                  get message request
      * @throws SOAPException if there is a SOAP error
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPMessage get(Object to)
                                 throws SOAPException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,6 +32,8 @@
  * SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects
  * can be created by calling <code>createConnection()</code> on the newly
  * created <code>SOAPConnectionFactory</code> object.
+ *
+ * @since 1.6
  */
 public abstract class SOAPConnectionFactory {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,6 +29,8 @@
 
 /**
  * The definition of constants pertaining to the SOAP protocol.
+ *
+ * @since 1.6
  */
 public interface SOAPConstants {
     /**
@@ -41,7 +43,7 @@
      * argument version of <code>createMessage</code>, an
      * <code>UnsupportedOperationException</code>.
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
 
@@ -49,7 +51,7 @@
      * Used to create <code>MessageFactory</code> instances that create
      * <code>SOAPMessages</code> whose behavior supports the SOAP 1.1  specification.
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
 
@@ -58,26 +60,26 @@
      * <code>SOAPMessages</code> whose behavior supports the SOAP 1.2
      * specification
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
 
     /**
      * The default protocol: SOAP 1.1 for backwards compatibility.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
 
     /**
      * The namespace identifier for the SOAP 1.1 envelope.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
                 URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
     /**
      * The namespace identifier for the SOAP 1.2 envelope.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
                 URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
@@ -102,21 +104,21 @@
 
     /**
      * The namespace identifier for the SOAP 1.2 encoding.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
 
     /**
      * The media type  of the <code>Content-Type</code> MIME header in SOAP 1.1.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         SOAP_1_1_CONTENT_TYPE = "text/xml";
 
     /**
      * The media type  of the <code>Content-Type</code> MIME header in SOAP 1.2.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
@@ -137,21 +139,21 @@
      * The URI identifying the next application processing a SOAP request as the intended
      * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
      * specification).
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next";
 
     /**
      * The URI specifying the role None in SOAP 1.2.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none";
 
     /**
      * The URI identifying the ultimate receiver of the SOAP 1.2 message.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER =
@@ -159,41 +161,41 @@
 
     /**
      * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String SOAP_ENV_PREFIX = "env";
 
     /**
      * SOAP 1.2 VersionMismatch Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_VERSIONMISMATCH_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 MustUnderstand Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_MUSTUNDERSTAND_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 DataEncodingUnknown Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 Sender Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_SENDER_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 Receiver Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_RECEIVER_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,6 +40,8 @@
  * objects of the correct type. See {@link #getChildElements()} and
  * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
  * for details.
+ *
+ * @since 1.6
  */
 public interface SOAPElement extends Node, org.w3c.dom.Element {
 
@@ -74,7 +76,7 @@
      * @exception SOAPException if there is an error in creating the
      *                          <code>SOAPElement</code> object
      * @see SOAPElement#addChildElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement addChildElement(QName qname) throws SOAPException;
 
@@ -173,7 +175,7 @@
      * is also useful for recycling portions of a document within a SOAP
      * message.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public abstract void removeContents();
 
@@ -224,7 +226,7 @@
                                 an attribute with <code>QName</code>
                                 <code>qname</code> on this SOAPElement.
      * @see SOAPElement#addAttribute(Name, String)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement addAttribute(QName qname, String value)
         throws SOAPException;
@@ -261,7 +263,7 @@
      * @return a <code>String</code> giving the value of the specified
      *         attribute, Null if there is no such attribute
      * @see SOAPElement#getAttributeValue(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getAttributeValue(QName qname);
 
@@ -287,7 +289,7 @@
      *
      * @return an iterator over the QNames of the attributes
      * @see SOAPElement#getAllAttributes()
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getAllAttributesAsQNames();
 
@@ -322,7 +324,7 @@
      * @return an iterator over the namespace prefixes are within scope of this
      *         <code>SOAPElement</code> object
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator getVisibleNamespacePrefixes();
 
@@ -348,7 +350,7 @@
      *
      * @exception SOAPException if the <code>QName</code> cannot be created.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName createQName(String localName, String prefix)
         throws SOAPException;
@@ -366,7 +368,7 @@
      * @return a <code>QName</code> object with the qname of this
      *         <code>SOAPElement</code> object
      * @see SOAPElement#getElementName()
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName getElementQName();
 
@@ -386,7 +388,7 @@
     *                          is not allowed.
     * @return The renamed Node
     *
-    * @since SAAJ 1.3
+    * @since 1.6, SAAJ 1.3
     */
    public SOAPElement setElementQName(QName newName) throws SOAPException;
 
@@ -409,7 +411,7 @@
      * @return <code>true</code> if the attribute was
      *         removed successfully; <code>false</code> if it was not
      * @see SOAPElement#removeAttribute(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean removeAttribute(QName qname);
 
@@ -496,7 +498,7 @@
      *         in this <code>SOAPElement</code> object with the
      *         specified qname
      * @see SOAPElement#getChildElements(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getChildElements(QName qname);
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -37,6 +37,7 @@
  * inserted.
  * @deprecated - Use <code>javax.xml.soap.SOAPFactory</code> for creating SOAPElements.
  * @see javax.xml.soap.SOAPFactory
+ * @since 1.6
  */
 public class SOAPElementFactory {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java	Fri Aug 08 11:36:48 2014 -0700
@@ -93,6 +93,8 @@
  *     Name name = se.createName("GetLastTradePrice", "WOMBAT",
  *                                "http://www.wombat.org/trader");
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface SOAPEnvelope extends SOAPElement {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,8 @@
  * the provider.  Reasons for embedding a <code>Throwable</code>
  * object include problems such as input/output errors or a parsing
  * problem, such as an error in parsing a header.
+ *
+ * @since 1.6
  */
 public class SOAPException extends Exception {
     private Throwable cause;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,6 +43,7 @@
  * <code>javax.xml.soap.Detail</code> objects as well as
  * <code>java.xml.soap.Name</code> objects.
  *
+ * @since 1.6
  */
 public abstract class SOAPFactory {
 
@@ -77,7 +78,7 @@
      * @exception SOAPException if there is an error in creating the
      *            <code>SOAPElement</code> object
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement createElement(Element domElement) throws SOAPException {
         throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
@@ -120,7 +121,7 @@
      * @exception SOAPException if there is an error in creating the
      *            <code>SOAPElement</code> object
      * @see SOAPFactory#createElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public  SOAPElement createElement(QName qname) throws SOAPException {
         throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
@@ -188,7 +189,7 @@
      *@param faultCode the FaultCode for the fault
      *@return a <code>SOAPFault</code> object
      *@throws SOAPException if there is a SOAP error
-     *@since SAAJ 1.3
+     *@since 1.6, SAAJ 1.3
      */
     public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
 
@@ -196,7 +197,7 @@
      *Creates a new default <code>SOAPFault</code> object
      *@return a <code>SOAPFault</code> object
      *@throws SOAPException if there is a SOAP error
-     *@since SAAJ 1.3
+     *@since 1.6, SAAJ 1.3
      */
     public abstract SOAPFault createFault() throws SOAPException;
 
@@ -290,7 +291,7 @@
      * @exception SOAPException if there was an error creating the
      *            specified <code>SOAPFactory</code>
      * @see SAAJMetaFactory
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static SOAPFactory newInstance(String protocol)
         throws SOAPException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,6 +42,8 @@
  * Depending on the <code>protocol</code> specified while creating the
  * <code>MessageFactory</code> instance,  a <code>SOAPFault</code> has
  * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
+ *
+ * @since 1.6
  */
 public interface SOAPFault extends SOAPBodyElement {
 
@@ -72,7 +74,7 @@
      * @exception SOAPException if there was an error in adding the
      *            <i>faultcode</i> element to the underlying XML tree.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setFaultCode(Name faultCodeQName) throws SOAPException;
 
@@ -91,7 +93,7 @@
      * @see #setFaultCode(Name)
      * @see #getFaultCodeAsQName()
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultCode(QName faultCodeQName) throws SOAPException;
 
@@ -128,7 +130,7 @@
      * @return a <code>Name</code> representing the faultcode
      * @see #setFaultCode(Name)
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Name getFaultCodeAsName();
 
@@ -141,7 +143,7 @@
      *
      * @see #setFaultCode(QName)
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName getFaultCodeAsQName();
 
@@ -158,7 +160,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultSubcodes();
 
@@ -171,7 +173,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void removeAllFaultSubcodes();
 
@@ -187,7 +189,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void appendFaultSubcode(QName subcode) throws SOAPException;
 
@@ -270,7 +272,7 @@
      * @exception SOAPException if there was an error in adding the
      *            <code>faultString</code> to the underlying XML tree.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setFaultString(String faultString, Locale locale)
         throws SOAPException;
@@ -315,7 +317,7 @@
      *          the fault string or <code>null</code> if no locale was specified
      * @see #setFaultString(String, Locale)
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Locale getFaultStringLocale();
 
@@ -327,7 +329,7 @@
      * @return true if this <code>SOAPFault</code> has a <code>Detail</code>
      * subelement and false otherwise.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean hasDetail();
 
@@ -377,7 +379,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultReasonLocales() throws SOAPException;
 
@@ -393,7 +395,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultReasonTexts() throws SOAPException;
 
@@ -414,7 +416,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultReasonText(Locale locale) throws SOAPException;
 
@@ -441,7 +443,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void addFaultReasonText(String text, java.util.Locale locale)
         throws SOAPException;
@@ -457,7 +459,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Node.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultNode();
 
@@ -472,7 +474,7 @@
      *      support the SOAP 1.2 concept of Fault Node.
      *
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultNode(String uri) throws SOAPException;
 
@@ -487,7 +489,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultRole();
 
@@ -504,7 +506,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultRole(String uri) throws SOAPException;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,6 +32,8 @@
  * <P>
  * Content is added to a <code>SOAPFaultElement</code> using the
  * <code>SOAPElement</code> method <code>addTextNode</code>.
+ *
+ * @since 1.6
  */
 public interface SOAPFaultElement extends SOAPElement {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -66,6 +66,7 @@
  * </PRE>
  *
  * @see SOAPHeaderElement
+ * @since 1.6
  */
 public interface SOAPHeader extends SOAPElement {
     /**
@@ -92,7 +93,7 @@
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs
      * @see SOAPHeader#addHeaderElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addHeaderElement(QName qname)
         throws SOAPException;
@@ -115,7 +116,7 @@
      * @see #extractHeaderElements
      * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator examineMustUnderstandHeaderElements(String actor);
 
@@ -180,7 +181,7 @@
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
      * @exception UnsupportedOperationException if this is a SOAP 1.1 Header.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
         throws SOAPException;
@@ -196,7 +197,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
         throws SOAPException;
@@ -211,7 +212,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
         throws SOAPException;
@@ -226,7 +227,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
         throws SOAPException;
@@ -240,7 +241,7 @@
      *          <code>SOAPHeader</code>
      * @see #extractAllHeaderElements
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator examineAllHeaderElements();
 
@@ -255,7 +256,7 @@
      *
      * @see #examineAllHeaderElements
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator extractAllHeaderElements();
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,6 +33,8 @@
  * <P>
  * A <code>SOAPHeaderElement</code> object can have other
  * <code>SOAPElement</code> objects as its children.
+ *
+ * @since 1.6
  */
 public interface SOAPHeaderElement extends SOAPElement {
 
@@ -65,7 +67,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setRole(String uri) throws SOAPException;
 
@@ -89,7 +91,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getRole();
 
@@ -143,7 +145,7 @@
      * @see #setMustUnderstand
      * @see #getRelay
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setRelay(boolean relay) throws SOAPException;
 
@@ -160,7 +162,7 @@
      * @see #getMustUnderstand
      * @see #setRelay
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean getRelay();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java	Fri Aug 08 11:36:48 2014 -0700
@@ -100,6 +100,7 @@
  *
  * @see MessageFactory
  * @see AttachmentPart
+ * @since 1.6
  */
 public abstract class SOAPMessage {
     /**
@@ -108,7 +109,7 @@
          * supported values. The default is "utf-8".
          *
          * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public static final String CHARACTER_SET_ENCODING =
         "javax.xml.soap.character-set-encoding";
@@ -119,7 +120,7 @@
      * "false".
      *
      * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public static final String WRITE_XML_DECLARATION =
         "javax.xml.soap.write-xml-declaration";
@@ -163,7 +164,7 @@
          *         object
          * @exception SOAPException
          *               if the SOAP Body does not exist or cannot be retrieved
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public SOAPBody getSOAPBody() throws SOAPException {
         throw new UnsupportedOperationException("getSOAPBody must be overridden by all subclasses of SOAPMessage");
@@ -178,7 +179,7 @@
          *         object
          * @exception SOAPException
          *               if the SOAP Header does not exist or cannot be retrieved
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public SOAPHeader getSOAPHeader() throws SOAPException {
         throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
@@ -230,7 +231,7 @@
      * @param headers
      *           a <code>MimeHeaders</code> object containing the MIME
      *           headers for which to search
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void removeAttachments(MimeHeaders headers);
 
@@ -258,7 +259,7 @@
      * @throws SOAPException if there is an error in the attempt to access the
      *          attachment
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
 
@@ -432,7 +433,7 @@
      *           the value to be associated with the specified property
      * @exception SOAPException
      *               if the property name is not recognized.
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setProperty(String property, Object value)
         throws SOAPException {
@@ -448,7 +449,7 @@
      *         if no such property exists.
      * @exception SOAPException
      *               if the property name is not recognized.
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Object getProperty(String property) throws SOAPException {
         throw new UnsupportedOperationException("getProperty must be overridden by all subclasses of SOAPMessage");
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java	Fri Aug 08 11:36:48 2014 -0700
@@ -64,6 +64,8 @@
  * The <code>SOAPPart</code> method <code>getEnvelope</code> can be used
  * to retrieve the <code>SOAPEnvelope</code> object.
  * <P>
+ *
+ * @since 1.6
  */
 public abstract class SOAPPart implements org.w3c.dom.Document, Node {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,6 +29,7 @@
  * A representation of a node whose value is text.  A <code>Text</code> object
  * may represent text that is content or text that is a comment.
  *
+ * @since 1.6
  */
 public interface Text extends Node, org.w3c.dom.Text {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Action.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Action.java	Fri Aug 08 11:36:48 2014 -0700
@@ -118,7 +118,7 @@
  *
  * @see FaultAction
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,7 +29,7 @@
  * clients that wish to receive callback notification of the completion of
  * service endpoint operations invoked asynchronously.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface AsyncHandler<T> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Binding.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Binding.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,7 +29,7 @@
 /** The <code>Binding</code> interface is the base interface
  *  for JAX-WS protocol bindings.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Binding {
 
@@ -61,7 +61,7 @@
      * @return String The binding identifier for the port.
      *    Never returns <code>null</code>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     String getBindingID();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
  * protocol binding and associated context objects for request and
  * response message processing.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.Binding
  **/
@@ -154,7 +154,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public EndpointReference getEndpointReference();
 
@@ -176,7 +176,7 @@
      * @throws java.lang.UnsupportedOperationException If this
      * <code>BindingProvider</code> uses the XML/HTTP binding.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,7 +39,7 @@
  *  This annotation may be overriden programmatically or via
  *  deployment descriptors, depending on the platform in use.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  **/
 @Target(ElementType.TYPE)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Dispatch.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Dispatch.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
  *  class acts as a factory for the creation of <code>Dispatch</code>
  *  instances.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Dispatch<T> extends BindingProvider {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Endpoint.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Endpoint.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,7 @@
  * as possible instead of generating new ones based on the annotations
  * present on the implementor.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.Binding
  * @see javax.xml.ws.BindingType
@@ -119,7 +119,7 @@
      *
      *
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      *
      */
     public static Endpoint create(Object implementor, WebServiceFeature ... features) {
@@ -166,7 +166,7 @@
      *        </code> parameter will have their default values.
      *
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
         return Provider.provider().createEndpoint(bindingId, implementor, features);
@@ -266,7 +266,7 @@
      *          If a <code>java.lang.SecurityManger</code>
      *          is being used and the application doesn't have the
      *          <code>WebServicePermission("publishEndpoint")</code> permission.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Endpoint publish(String address, Object implementor, WebServiceFeature ... features) {
         return Provider.provider().createAndPublishEndpoint(address, implementor, features);
@@ -330,7 +330,7 @@
      *          If a <code>java.lang.SecurityManger</code>
      *          is being used and the application doesn't have the
      *          <code>WebServicePermission("publishEndpoint")</code> permission.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public void publish(HttpContext serverContext) {
         throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
@@ -446,7 +446,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract EndpointReference getEndpointReference(Element... referenceParameters);
 
@@ -472,7 +472,7 @@
      * uses the XML/HTTP binding.
      *
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
             Element... referenceParameters);
@@ -490,7 +490,7 @@
      * @throws java.lang.IllegalStateException
      *        If the endpoint has been published already or it has been stopped.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public void setEndpointContext(EndpointContext ctxt) {
         throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  * before {@link Endpoint#publish} methods.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class EndpointContext {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java	Fri Aug 08 11:36:48 2014 -0700
@@ -81,7 +81,7 @@
  *
  * @see W3CEndpointReference
  * @see Service
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @XmlTransient // to treat this class like Object as far as databinding is concerned (proposed JAXB 2.1 feature)
 public abstract class EndpointReference {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/FaultAction.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/FaultAction.java	Fri Aug 08 11:36:48 2014 -0700
@@ -145,7 +145,7 @@
  *   &lt;/definitions>
  * </pre>
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Holder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Holder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,7 +30,7 @@
 /**
  * Holds a value of type <code>T</code>.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public final class Holder<T> implements Serializable {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  *  protocol agnostic XML message and contains methods that
  *  provide access to the payload of the message.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalMessage {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,7 +30,7 @@
  *  are used to communicate protocol level fault information to clients and may
  *  be used on the server to control the protocol specific fault representation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public class ProtocolException extends WebServiceException {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Provider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Provider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
  *  the <code>Provider</code> instance will receive entire protocol messages
  *  or just message payloads.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.xml.transform.Source
  *  @see javax.xml.soap.SOAPMessage
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,7 @@
  * overloading conflicts in document literal mode. Only the <code>className</code>
  * is required in this case.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  **/
 
 @Target(ElementType.METHOD)
@@ -65,7 +65,7 @@
     /**
      * wsdl:part name for the wrapper part
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public String partName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
  *
  * @see RespectBindingFeature
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java	Fri Aug 08 11:36:48 2014 -0700
@@ -80,7 +80,7 @@
  *
  * @see AddressingFeature
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class RespectBindingFeature extends WebServiceFeature {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Response.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Response.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,7 +39,7 @@
  *  {@link WebServiceException} that represents the error that occured during the
  *  asynchronous method invocation.</p>
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Response<T> extends Future<T> {
     /** Gets the contained response context.
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,7 +39,7 @@
  * overloading conflicts in document literal mode. Only the <code>className</code>
  * is required in this case.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 
 @Target(ElementType.METHOD)
@@ -65,7 +65,7 @@
     /**
      * wsdl:part name for the wrapper part
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public String partName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Service.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Service.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
  * can be enabled by creating a <code>ThreadPoolExecutor</code> and
  * registering it with the service.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.spi.Provider
  * @see javax.xml.ws.handler.HandlerResolver
@@ -153,7 +153,7 @@
      * @see java.lang.reflect.InvocationHandler
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(QName portName,
             Class<T> serviceEndpointInterface, WebServiceFeature... features) {
@@ -219,7 +219,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(Class<T> serviceEndpointInterface,
             WebServiceFeature... features) {
@@ -297,7 +297,7 @@
      *                      with this port or is unsupported.
      *                  </UL>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(EndpointReference endpointReference,
            Class<T> serviceEndpointInterface, WebServiceFeature... features) {
@@ -381,7 +381,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
             Service.Mode mode, WebServiceFeature... features) {
@@ -456,7 +456,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
             Class<T> type, Service.Mode mode,
@@ -514,7 +514,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public Dispatch<Object> createDispatch(QName portName,
             JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
@@ -587,7 +587,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
     **/
     public Dispatch<Object> createDispatch(EndpointReference endpointReference,
             JAXBContext context, Service.Mode mode,
@@ -722,7 +722,7 @@
      *        it must throw a WebServiceException.
      * @throws WebServiceException If any error in creation of the
      *                    specified service.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      **/
     public static Service create(
             java.net.URL wsdlDocumentLocation,
@@ -752,7 +752,7 @@
      * @throws WebServiceException If any error in creation of the
      *                    specified service
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Service create(QName serviceName, WebServiceFeature ... features) {
         return new Service(null, serviceName, features);
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,7 +36,7 @@
  * Used to indicate whether a {@link Provider} implementation wishes to work
  * with entire protocol messages or just with protocol message payloads.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,7 +41,7 @@
  *  determined based on the value of the <code>WebServiceClient</code>
  *  annotation on the generated service interface itself.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.xml.ws.WebServiceClient
 **/
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebFault.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebFault.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,7 +36,7 @@
  * to the local and namespace name of the fault element and the name
  * of the fault bean.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
@@ -60,7 +60,7 @@
 
   /**
    *  wsdl:Message's name. Default name is the exception's class name.
-   *  @since JAX-WS 2.2
+   *  @since 1.7, JAX-WS 2.2
    */
   public String messageName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,7 @@
  *  element represents the Web service for which the generated
  *  service interface provides a client view.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,7 +41,7 @@
  *  into an endpoint implementation class using the
  *  <code>Resource</code> annotation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.annotation.Resource
  **/
@@ -120,7 +120,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public EndpointReference getEndpointReference(Element... referenceParameters);
 
@@ -144,7 +144,7 @@
      * @throws WebServiceException If the <code>clazz</code> type of
      * <code>EndpointReference</code> is not supported.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
             Element... referenceParameters);
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,7 +28,7 @@
 /** The <code>WebServiceException</code> class is the base
  *  exception class for all JAX-WS API runtime exceptions.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 
 public class WebServiceException extends java.lang.RuntimeException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java	Fri Aug 08 11:36:48 2014 -0700
@@ -44,7 +44,7 @@
  * @see javax.xml.ws.soap.AddressingFeature
  * @see javax.xml.ws.soap.MTOMFeature
  *
- * @since 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public abstract class WebServiceFeature {
    /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,6 +55,7 @@
  * @see java.security.Permissions
  * @see java.lang.SecurityManager
  * @see java.net.SocketPermission
+ * @since 1.6
  */
 public final class WebServicePermission extends BasicPermission {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
 /**
  * Used to annotate a Provider implementation class.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  * @see javax.xml.ws.Provider
  */
 @Target(ElementType.TYPE)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java	Fri Aug 08 11:36:48 2014 -0700
@@ -75,7 +75,7 @@
  * @see javax.annotation.Resource
  * @see WebServiceFeatureAnnotation
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
 **/
 
@@ -143,7 +143,7 @@
      * A portable JNDI lookup name that resolves to the target
      * web service reference.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     String lookup() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -69,7 +69,7 @@
  * </code></pre>
  *
  * @see WebServiceRef
- * @since 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,7 @@
 /** The <code>Handler</code> interface
  *  is the base interface for JAX-WS handlers.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Handler<C extends MessageContext> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,7 +39,7 @@
  *
  *  @see javax.xml.ws.Service#setHandlerResolver
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface HandlerResolver {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,7 +28,7 @@
 /** The <code>LogicalHandler</code> extends
  *  Handler to provide typesafety for the message context parameter.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalHandler<C extends LogicalMessageContext> extends Handler<C> {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  *  provide access to a the contained message as a protocol neutral
  *  LogicalMessage
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalMessageContext
                     extends MessageContext {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,7 +36,7 @@
  * enable handlers in a handler chain to share processing related
  * state.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public interface MessageContext extends Map<String, Object> {
 
@@ -168,7 +168,7 @@
      * wsa:IsReferenceParameter="true" attribute.
      * <p>Type: List&lt;Element>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public static final String REFERENCE_PARAMETERS =
             "javax.xml.ws.reference.parameters";
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,7 @@
  *  This interface is never implemented by an application,
  *  only by a JAX-WS implementation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface PortInfo {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,7 @@
  *  to provide typesafety for the message context parameter and add a method
  *  to obtain access to the headers that may be processed by the handler.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPHandler<T extends SOAPMessageContext>
     extends Handler<T> {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
  *
  *  @see javax.xml.soap.SOAPMessage
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPMessageContext
                     extends javax.xml.ws.handler.MessageContext {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,7 @@
 /** The <code>HTTPBinding</code> interface is an
  *  abstraction for the XML/HTTP binding.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface HTTPBinding extends Binding {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
  *  <p>Since there is no standard format for faults or exceptions
  *  in XML/HTTP messaging, only the HTTP status code is captured.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public class HTTPException extends javax.xml.ws.ProtocolException  {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
  * This annotation's behaviour is defined by the corresponding feature
  * {@link AddressingFeature}.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
@@ -106,7 +106,7 @@
      * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
      * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     Responses responses() default Responses.ALL;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java	Fri Aug 08 11:36:48 2014 -0700
@@ -112,7 +112,7 @@
  * for more information on WS-Addressing.
  *
  * @see Addressing
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 public final class AddressingFeature extends WebServiceFeature {
@@ -151,7 +151,7 @@
      * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
      * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public enum Responses {
         /**
@@ -229,7 +229,7 @@
      * @param required true means requires the use of ws-addressing .
      * @param responses specifies what type of responses are required
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public AddressingFeature(boolean enabled, boolean required, Responses responses) {
         this.enabled = enabled;
@@ -268,7 +268,7 @@
      *         {@link Responses#NON_ANONYMOUS} when endpoint requires the use
      * of only non-anonymous responses
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Responses getResponses() {
         return responses;
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
  * This annotation's behaviour is defined by the corresponding feature
  * {@link MTOMFeature}.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
  * The {@link #threshold} property can be used to set the threshold
  * value used to determine when binary data should be XOP encoded.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class MTOMFeature extends WebServiceFeature {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
 /** The <code>SOAPBinding</code> interface is an abstraction for
  *  the SOAP binding.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPBinding extends Binding {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,7 +48,7 @@
  *  @see javax.xml.ws.soap.SOAPBinding#getSOAPFactory
  *  @see javax.xml.ws.ProtocolException
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  **/
 public class SOAPFaultException extends javax.xml.ws.ProtocolException  {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
  *
  * @see Provider#createEndpoint(String, Class, Invoker, WebServiceFeature...)
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 
 public abstract class Invoker {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,7 +41,7 @@
  * <code>Endpoint</code> objects.
  * <p>
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public abstract class Provider {
 
@@ -161,7 +161,7 @@
      *        it must throw a WebServiceException.
      * @return The newly created service delegate.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public ServiceDelegate createServiceDelegate(
             java.net.URL wsdlDocumentLocation,
@@ -218,7 +218,7 @@
      * @throws NullPointerException If the <code>null</code>
      * <code>eprInfoset</code> value is given.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset);
 
@@ -271,7 +271,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(EndpointReference endpointReference,
             Class<T> serviceEndpointInterface,
@@ -333,7 +333,7 @@
      * @throws WebServiceException If an error occurs while creating the
      *                             <code>W3CEndpointReference</code>.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName,
             List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters);
@@ -407,7 +407,7 @@
      *     </ul>
      * @throws WebServiceException If an error occurs while creating the
      *                             <code>W3CEndpointReference</code>.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReference createW3CEndpointReference(String address,
             QName interfaceName, QName serviceName, QName portName,
@@ -434,7 +434,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createAndPublishEndpoint(String address,
             Object implementor, WebServiceFeature ... features) {
@@ -455,7 +455,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createEndpoint(String bindingId, Object implementor,
             WebServiceFeature ... features) {
@@ -478,7 +478,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createEndpoint(String bindingId, Class<?> implementorClass,
             Invoker invoker, WebServiceFeature ... features) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,7 +47,7 @@
  * @see javax.xml.ws.Service
  * @see javax.xml.ws.spi.Provider
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public abstract class ServiceDelegate {
 
@@ -119,7 +119,7 @@
      * @see java.lang.reflect.InvocationHandler
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(QName portName,
             Class<T> serviceEndpointInterface, WebServiceFeature... features);
@@ -194,7 +194,7 @@
      *                      with this port or is unsupported.
      *                  </UL>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(EndpointReference endpointReference,
            Class<T> serviceEndpointInterface, WebServiceFeature... features);
@@ -256,7 +256,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(Class<T> serviceEndpointInterface,
             WebServiceFeature... features);
@@ -334,7 +334,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
             Service.Mode mode, WebServiceFeature... features);
@@ -406,7 +406,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
             Class<T> type, Service.Mode mode,
@@ -462,7 +462,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract Dispatch<Object> createDispatch(QName portName,
             JAXBContext context, Service.Mode mode, WebServiceFeature... features);
@@ -532,7 +532,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
     **/
     public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
             JAXBContext context, Service.Mode mode,
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Fri Aug 08 11:36:48 2014 -0700
@@ -65,7 +65,7 @@
  * @see MTOM
  * @see RespectBinding
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target(ElementType.ANNOTATION_TYPE)
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -37,7 +37,7 @@
  * web service requests to corresponding HttpContext objects.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpContext {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
  * is undefined.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpExchange {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,7 +36,7 @@
  * {@link Endpoint#publish(HttpContext) }
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpHandler {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java	Fri Aug 08 11:36:48 2014 -0700
@@ -90,6 +90,6 @@
   </pre>
 
   @author Jitendra Kotamraju
-  @since JAX-WS 2.2
+  @since 1.7, JAX-WS 2.2
  */
 package javax.xml.ws.spi.http;
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,7 @@
  * WS-Addressing</a>
  * for more information on WS-Addressing EndpointReferences.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 // XmlRootElement allows this class to be marshalled on its own
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
  * <code>endpointName</code> (if specified) MUST match a service and port
  * in the WSDL document.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class W3CEndpointReferenceBuilder {
     /**
@@ -110,6 +110,7 @@
      * @return A <code>W3CEndpointReferenceBuilder</code> instance with
      *   the <code>interfaceName</code> as <code>wsam:InterfaceName</code>
      *   element added to the <code>wsa:Metadata</code> element
+     * @since 1.7
      */
     public W3CEndpointReferenceBuilder interfaceName(QName interfaceName) {
         this.interfaceName = interfaceName;
@@ -253,7 +254,7 @@
      * @throws java.lang.IllegalArgumentException if <code>element</code>
      * is <code>null</code>.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReferenceBuilder element(Element element) {
         if (element == null) {
@@ -277,7 +278,7 @@
      * @throws java.lang.IllegalArgumentException if <code>name</code>
      *   or <code>value</code> is <code>null</code>.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReferenceBuilder attribute(QName name, String value) {
         if (name == null || value == null) {
--- a/jdk/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 2df45ac1bf491278f38c12e0dfbeebadb6c54c8c jdk9-b21
 85bcf0f99edc08873614afbe5a5563e13ce13c83 jdk9-b22
 9febf9dbc0a4b15323f2dbd29931cfbf086332b4 jdk9-b23
+875450e7ef8dde8f59db662ec1351ea30b8cb35d jdk9-b24
+a31efe49556a7c12f9ea2c9ee8b4fae8aa67723a jdk9-b25
--- a/jdk/make/CopyFiles.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/CopyFiles.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -122,7 +122,7 @@
 
 ##########################################################################################
 #
-# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
+# Copy cursor.properties and cursors gif files to LIBDIR
 #
 ifneq ($(OPENJDK_TARGET_OS), macosx)
   OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
@@ -130,11 +130,6 @@
   OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
 endif
 
-$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
-	$(call install-file)
-
-COPY_FILES += $(LIBDIR)/flavormap.properties
-
 CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
 CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
 
--- a/jdk/make/CopyIntoClasses.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/CopyIntoClasses.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -163,6 +163,19 @@
 
 ################################################################################
 
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/datatransfer/flavormap.properties
+else
+  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/datatransfer/flavormap.properties
+endif
+
+$(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
+	$(install-file)
+
+COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties
+
+################################################################################
+
 CLEAN_FILES := $(wildcard \
     $(JDK_TOPDIR)/src/share/classes/com/sun/imageio/plugins/common/*.properties \
     $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/*.properties \
--- a/jdk/make/Setup.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/Setup.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -27,7 +27,7 @@
 
 # To build with all warnings enabled, do the following:
 # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS := -Xlint:all,-deprecation,-rawtypes,-unchecked -Werror
+JAVAC_WARNINGS := -Xlint:all,-deprecation -Werror
 
 # Any java code executed during a JDK build to build other parts of the JDK must be 
 # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this 
--- a/jdk/make/data/swingbeaninfo/SwingBeanInfo.template	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/data/swingbeaninfo/SwingBeanInfo.template	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -42,7 +42,7 @@
  */
 
 public class @(BeanClassName)BeanInfo extends javax.swing.SwingBeanInfoBase {
-    private static final Class class@(BeanClassName) = @(BeanClassObject);
+    private static final Class<?> class@(BeanClassName) = @(BeanClassObject);
 
     /**
      * @return a @(BeanClassName) BeanDescriptor
--- a/jdk/make/data/swingbeaninfo/javax/swing/SwingBeanInfoBase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/data/swingbeaninfo/javax/swing/SwingBeanInfoBase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -67,7 +67,7 @@
      * its PropertyDescriptors will be included.
      */
     public BeanInfo[] getAdditionalBeanInfo() {
-        Class superClass = getBeanDescriptor().getBeanClass().getSuperclass();
+        Class<?> superClass = getBeanDescriptor().getBeanClass().getSuperclass();
         BeanInfo superBeanInfo = null;
         try {
             superBeanInfo = Introspector.getBeanInfo(superClass);
--- a/jdk/make/data/swingbeaninfo/sun/swing/BeanInfoUtils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/data/swingbeaninfo/sun/swing/BeanInfoUtils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -122,7 +122,7 @@
      * @see java.beans#PropertyDescriptor
      * @see java.beans#FeatureDescriptor
      */
-    public static PropertyDescriptor createPropertyDescriptor(Class cls, String name, Object[] args)
+    public static PropertyDescriptor createPropertyDescriptor(Class<?> cls, String name, Object[] args)
     {
         PropertyDescriptor pd = null;
         try {
@@ -156,7 +156,7 @@
                 String methodName = (String)value;
                 Method method;
                 try {
-                    method = cls.getMethod(methodName, new Class[0]);
+                    method = cls.getMethod(methodName, new Class<?>[0]);
                     pd.setReadMethod(method);
                 }
                 catch(Exception e) {
@@ -168,8 +168,8 @@
                 String methodName = (String)value;
                 Method method;
                 try {
-                    Class type = pd.getPropertyType();
-                    method = cls.getMethod(methodName, new Class[]{type});
+                    Class<?> type = pd.getPropertyType();
+                    method = cls.getMethod(methodName, new Class<?>[]{type});
                     pd.setWriteMethod(method);
                 }
                 catch(Exception e) {
@@ -215,9 +215,9 @@
      * @see java.beans#BeanInfo
      * @see java.beans#PropertyDescriptor
      */
-    public static BeanDescriptor createBeanDescriptor(Class cls, Object[] args)
+    public static BeanDescriptor createBeanDescriptor(Class<?> cls, Object[] args)
     {
-        Class customizerClass = null;
+        Class<?> customizerClass = null;
 
         /* For reasons I don't understand, customizerClass is a
          * readOnly property.  So we have to find it and pass it
@@ -242,11 +242,11 @@
     }
 
     static private PropertyDescriptor createReadOnlyPropertyDescriptor(
-        String name, Class cls) throws IntrospectionException {
+        String name, Class<?> cls) throws IntrospectionException {
 
         Method readMethod = null;
         String base = capitalize(name);
-        Class[] parameters = new Class[0];
+        Class<?>[] parameters = new Class<?>[0];
 
         // Is it a boolean?
         try {
@@ -264,7 +264,7 @@
 
         try {
             // Try indexed accessor pattern.
-            parameters = new Class[1];
+            parameters = new Class<?>[1];
             parameters[0] = int.class;
             readMethod = cls.getMethod("get" + base, parameters);
         } catch (NoSuchMethodException nsme) {
--- a/jdk/make/lib/PlatformLibraries.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/lib/PlatformLibraries.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -90,8 +90,7 @@
   LIBOSX_DIRS := \
       $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
       $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
-      $(JDK_TOPDIR)/src/macosx/native/apple/security \
-      $(JDK_TOPDIR)/src/macosx/native/apple/launcher
+      $(JDK_TOPDIR)/src/macosx/native/apple/security
 
   $(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
       LIBRARY := osx, \
--- a/jdk/make/mapfiles/libawt/mapfile-mawt-vers	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/mapfiles/libawt/mapfile-mawt-vers	Fri Aug 08 11:36:48 2014 -0700
@@ -204,6 +204,7 @@
                 Java_sun_print_CUPSPrinter_canConnect;
                 Java_sun_print_CUPSPrinter_getMedia;
                 Java_sun_print_CUPSPrinter_getPageSizes;
+                Java_sun_print_CUPSPrinter_getResolutions;
 
                 Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
                 Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
--- a/jdk/make/mapfiles/libawt_headless/mapfile-vers	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/mapfiles/libawt_headless/mapfile-vers	Fri Aug 08 11:36:48 2014 -0700
@@ -76,6 +76,7 @@
 		Java_sun_print_CUPSPrinter_canConnect;
 		Java_sun_print_CUPSPrinter_getMedia;
 		Java_sun_print_CUPSPrinter_getPageSizes;
+		Java_sun_print_CUPSPrinter_getResolutions;
 
 		# libfontmanager entry points
 		AWTIsHeadless;
--- a/jdk/make/mapfiles/libawt_xawt/mapfile-vers	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/mapfiles/libawt_xawt/mapfile-vers	Fri Aug 08 11:36:48 2014 -0700
@@ -442,6 +442,7 @@
 	Java_sun_print_CUPSPrinter_canConnect;
 	Java_sun_print_CUPSPrinter_getMedia;
 	Java_sun_print_CUPSPrinter_getPageSizes;
+	Java_sun_print_CUPSPrinter_getResolutions;
 
         awt_GetDrawingSurface;
         awt_FreeDrawingSurface;
--- a/jdk/make/profile-includes.txt	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/make/profile-includes.txt	Fri Aug 08 11:36:48 2014 -0700
@@ -177,7 +177,6 @@
     ext/dnsns.jar \
     ext/nashorn.jar \
     ext/zipfs.jar \
-    flavormap.properties \
     fontconfig.RedHat.5.bfc \
     fontconfig.RedHat.5.properties.src \
     fontconfig.RedHat.6.bfc \
--- a/jdk/src/macosx/bundle/JavaAppLauncher/JavaAppLauncher.xcodeproj/project.pbxproj	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-// !$*UTF8*$!
-{
-        archiveVersion = 1;
-        classes = {
-        };
-        objectVersion = 45;
-        objects = {
-
-/* Begin PBXBuildFile section */
-                2C483E05143512EB00F2AEFD /* 1.7.0.jre in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 2C483E04143512EB00F2AEFD /* 1.7.0.jre */; };
-                89D3CD32142EEB2200A08AED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 89D3CD29142EEB2200A08AED /* InfoPlist.strings */; };
-                89D3CD33142EEB2200A08AED /* GenericApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = 89D3CD2B142EEB2200A08AED /* GenericApp.icns */; };
-                89D3CD35142EEB2200A08AED /* JVMArgs.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3CD30142EEB2200A08AED /* JVMArgs.m */; };
-                89D3CD36142EEB2200A08AED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3CD31142EEB2200A08AED /* main.m */; };
-                89D3D365143041F000A08AED /* JavaAppLauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3D364143041F000A08AED /* JavaAppLauncher.m */; };
-                8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-                2C48F06614350F0F00F2AEFD /* Copy PlugIns */ = {
-                        isa = PBXCopyFilesBuildPhase;
-                        buildActionMask = 2147483647;
-                        dstPath = "";
-                        dstSubfolderSpec = 13;
-                        files = (
-                                2C483E05143512EB00F2AEFD /* 1.7.0.jre in Copy PlugIns */,
-                        );
-                        name = "Copy PlugIns";
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-                1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
-                2C483E04143512EB00F2AEFD /* 1.7.0.jre */ = {isa = PBXFileReference; lastKnownFileType = folder; name = 1.7.0.jre; path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/1.7.0.jre"; sourceTree = SOURCE_ROOT; };
-                2C48F06714350F8300F2AEFD /* 1.7.0.jdk */ = {isa = PBXFileReference; lastKnownFileType = folder; name = 1.7.0.jdk; path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk"; sourceTree = SOURCE_ROOT; };
-                2CB5DA5E14355FCA00D3A656 /* classfile_constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = classfile_constants.h; sourceTree = "<group>"; };
-                2CB5DA6014355FCA00D3A656 /* jawt_md.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jawt_md.h; sourceTree = "<group>"; };
-                2CB5DA6114355FCA00D3A656 /* jni_md.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni_md.h; sourceTree = "<group>"; };
-                2CB5DA6214355FCA00D3A656 /* jawt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jawt.h; sourceTree = "<group>"; };
-                2CB5DA6314355FCA00D3A656 /* jdwpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdwpTransport.h; sourceTree = "<group>"; };
-                2CB5DA6414355FCA00D3A656 /* jni.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni.h; sourceTree = "<group>"; };
-                2CB5DA6514355FCA00D3A656 /* jvmti.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jvmti.h; sourceTree = "<group>"; };
-                2CB5DA6614355FCA00D3A656 /* jvmticmlr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jvmticmlr.h; sourceTree = "<group>"; };
-                89D3CD2A142EEB2200A08AED /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-                89D3CD2B142EEB2200A08AED /* GenericApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = GenericApp.icns; path = /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/GenericApp.icns; sourceTree = "<absolute>"; };
-                89D3CD2C142EEB2200A08AED /* JavaAppLauncher-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "JavaAppLauncher-Info.plist"; sourceTree = "<group>"; };
-                89D3CD2E142EEB2200A08AED /* JavaAppLauncher_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaAppLauncher_Prefix.pch; sourceTree = "<group>"; };
-                89D3CD2F142EEB2200A08AED /* JVMArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JVMArgs.h; sourceTree = "<group>"; };
-                89D3CD30142EEB2200A08AED /* JVMArgs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JVMArgs.m; sourceTree = "<group>"; };
-                89D3CD31142EEB2200A08AED /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-                89D3D363143041F000A08AED /* JavaAppLauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaAppLauncher.h; sourceTree = "<group>"; };
-                89D3D364143041F000A08AED /* JavaAppLauncher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavaAppLauncher.m; sourceTree = "<group>"; };
-                8D1107320486CEB800E47090 /* JavaAppLauncher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JavaAppLauncher.app; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-                8D11072E0486CEB800E47090 /* Frameworks */ = {
-                        isa = PBXFrameworksBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-                1058C7A0FEA54F0111CA2CBB /* frameworks */ = {
-                        isa = PBXGroup;
-                        children = (
-                                1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-                        );
-                        name = frameworks;
-                        sourceTree = "<group>";
-                };
-                19C28FACFE9D520D11CA2CBB /* Products */ = {
-                        isa = PBXGroup;
-                        children = (
-                                8D1107320486CEB800E47090 /* JavaAppLauncher.app */,
-                        );
-                        name = Products;
-                        sourceTree = "<group>";
-                };
-                29B97314FDCFA39411CA2CEA /* JavaAppLauncher */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89D3CD2D142EEB2200A08AED /* src */,
-                                89D3CD28142EEB2200A08AED /* resources */,
-                                29B97323FDCFA39411CA2CEA /* linking */,
-                                19C28FACFE9D520D11CA2CBB /* Products */,
-                        );
-                        name = JavaAppLauncher;
-                        sourceTree = "<group>";
-                };
-                29B97323FDCFA39411CA2CEA /* linking */ = {
-                        isa = PBXGroup;
-                        children = (
-                                2C48F06714350F8300F2AEFD /* 1.7.0.jdk */,
-                                2C483E04143512EB00F2AEFD /* 1.7.0.jre */,
-                                2CB5DA5D14355FCA00D3A656 /* include */,
-                                1058C7A0FEA54F0111CA2CBB /* frameworks */,
-                        );
-                        name = linking;
-                        sourceTree = "<group>";
-                };
-                2CB5DA5D14355FCA00D3A656 /* include */ = {
-                        isa = PBXGroup;
-                        children = (
-                                2CB5DA5E14355FCA00D3A656 /* classfile_constants.h */,
-                                2CB5DA5F14355FCA00D3A656 /* darwin */,
-                                2CB5DA6214355FCA00D3A656 /* jawt.h */,
-                                2CB5DA6314355FCA00D3A656 /* jdwpTransport.h */,
-                                2CB5DA6414355FCA00D3A656 /* jni.h */,
-                                2CB5DA6514355FCA00D3A656 /* jvmti.h */,
-                                2CB5DA6614355FCA00D3A656 /* jvmticmlr.h */,
-                        );
-                        name = include;
-                        path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/include";
-                        sourceTree = "<group>";
-                };
-                2CB5DA5F14355FCA00D3A656 /* darwin */ = {
-                        isa = PBXGroup;
-                        children = (
-                                2CB5DA6014355FCA00D3A656 /* jawt_md.h */,
-                                2CB5DA6114355FCA00D3A656 /* jni_md.h */,
-                        );
-                        path = darwin;
-                        sourceTree = "<group>";
-                };
-                89D3CD28142EEB2200A08AED /* resources */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89D3CD29142EEB2200A08AED /* InfoPlist.strings */,
-                                89D3CD2B142EEB2200A08AED /* GenericApp.icns */,
-                                89D3CD2C142EEB2200A08AED /* JavaAppLauncher-Info.plist */,
-                        );
-                        path = resources;
-                        sourceTree = "<group>";
-                };
-                89D3CD2D142EEB2200A08AED /* src */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89D3CD31142EEB2200A08AED /* main.m */,
-                                89D3D363143041F000A08AED /* JavaAppLauncher.h */,
-                                89D3D364143041F000A08AED /* JavaAppLauncher.m */,
-                                89D3CD2F142EEB2200A08AED /* JVMArgs.h */,
-                                89D3CD30142EEB2200A08AED /* JVMArgs.m */,
-                                89D3CD2E142EEB2200A08AED /* JavaAppLauncher_Prefix.pch */,
-                        );
-                        path = src;
-                        sourceTree = "<group>";
-                };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-                8D1107260486CEB800E47090 /* JavaAppLauncher */ = {
-                        isa = PBXNativeTarget;
-                        buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "JavaAppLauncher" */;
-                        buildPhases = (
-                                8D1107290486CEB800E47090 /* Resources */,
-                                2C48F06614350F0F00F2AEFD /* Copy PlugIns */,
-                                8D11072C0486CEB800E47090 /* Sources */,
-                                8D11072E0486CEB800E47090 /* Frameworks */,
-                        );
-                        buildRules = (
-                        );
-                        dependencies = (
-                        );
-                        name = JavaAppLauncher;
-                        productInstallPath = "$(HOME)/Applications";
-                        productName = JavaAppLauncher;
-                        productReference = 8D1107320486CEB800E47090 /* JavaAppLauncher.app */;
-                        productType = "com.apple.product-type.application";
-                };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-                29B97313FDCFA39411CA2CEA /* Project object */ = {
-                        isa = PBXProject;
-                        buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "JavaAppLauncher" */;
-                        compatibilityVersion = "Xcode 3.1";
-                        developmentRegion = English;
-                        hasScannedForEncodings = 1;
-                        knownRegions = (
-                                en,
-                                English,
-                        );
-                        mainGroup = 29B97314FDCFA39411CA2CEA /* JavaAppLauncher */;
-                        projectDirPath = "";
-                        projectRoot = "";
-                        targets = (
-                                8D1107260486CEB800E47090 /* JavaAppLauncher */,
-                        );
-                };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-                8D1107290486CEB800E47090 /* Resources */ = {
-                        isa = PBXResourcesBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D3CD32142EEB2200A08AED /* InfoPlist.strings in Resources */,
-                                89D3CD33142EEB2200A08AED /* GenericApp.icns in Resources */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-                8D11072C0486CEB800E47090 /* Sources */ = {
-                        isa = PBXSourcesBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D3CD35142EEB2200A08AED /* JVMArgs.m in Sources */,
-                                89D3CD36142EEB2200A08AED /* main.m in Sources */,
-                                89D3D365143041F000A08AED /* JavaAppLauncher.m in Sources */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-                89D3CD29142EEB2200A08AED /* InfoPlist.strings */ = {
-                        isa = PBXVariantGroup;
-                        children = (
-                                89D3CD2A142EEB2200A08AED /* English */,
-                        );
-                        name = InfoPlist.strings;
-                        sourceTree = "<group>";
-                };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-                C01FCF4B08A954540054247B /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ALWAYS_SEARCH_USER_PATHS = NO;
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_ENABLE_FIX_AND_CONTINUE = YES;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                                GCC_PREFIX_HEADER = src/JavaAppLauncher_Prefix.pch;
-                                INFOPLIST_FILE = "resources/JavaAppLauncher-Info.plist";
-                                INSTALL_PATH = "$(HOME)/Applications";
-                                LIBRARY_SEARCH_PATHS = "$(inherited)";
-                                PRODUCT_NAME = JavaAppLauncher;
-                        };
-                        name = Debug;
-                };
-                C01FCF4C08A954540054247B /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ALWAYS_SEARCH_USER_PATHS = NO;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                GCC_MODEL_TUNING = G5;
-                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                                GCC_PREFIX_HEADER = src/JavaAppLauncher_Prefix.pch;
-                                INFOPLIST_FILE = "resources/JavaAppLauncher-Info.plist";
-                                INSTALL_PATH = "$(HOME)/Applications";
-                                LIBRARY_SEARCH_PATHS = "$(inherited)";
-                                PRODUCT_NAME = JavaAppLauncher;
-                        };
-                        name = Release;
-                };
-                C01FCF4F08A954540054247B /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-                                GCC_C_LANGUAGE_STANDARD = gnu99;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                ONLY_ACTIVE_ARCH = YES;
-                                PREBINDING = NO;
-                                SDKROOT = "";
-                        };
-                        name = Debug;
-                };
-                C01FCF5008A954540054247B /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-                                GCC_C_LANGUAGE_STANDARD = gnu99;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                PREBINDING = NO;
-                                SDKROOT = "";
-                        };
-                        name = Release;
-                };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-                C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "JavaAppLauncher" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                C01FCF4B08A954540054247B /* Debug */,
-                                C01FCF4C08A954540054247B /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                C01FCF4E08A954540054247B /* Build configuration list for PBXProject "JavaAppLauncher" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                C01FCF4F08A954540054247B /* Debug */,
-                                C01FCF5008A954540054247B /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-/* End XCConfigurationList section */
-        };
-        rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
--- a/jdk/src/macosx/bundle/JavaAppLauncher/resources/English.lproj/InfoPlist.strings	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-
--- a/jdk/src/macosx/bundle/JavaAppLauncher/resources/JavaAppLauncher-Info.plist	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-        <key>CFBundleDevelopmentRegion</key>
-        <string>English</string>
-        <key>CFBundleExecutable</key>
-        <string>${EXECUTABLE_NAME}</string>
-        <key>CFBundleIconFile</key>
-        <string>GenericApp.icns</string>
-        <key>CFBundleIdentifier</key>
-        <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
-        <key>CFBundleDisplayName</key>
-        <string>Your Cool App</string>
-        <key>CFBundleInfoDictionaryVersion</key>
-        <string>6.0</string>
-        <key>CFBundleName</key>
-        <string>${PRODUCT_NAME}</string>
-        <key>CFBundlePackageType</key>
-        <string>APPL</string>
-        <key>CFBundleShortVersionString</key>
-        <string>1.0</string>
-        <key>CFBundleSignature</key>
-        <string>????</string>
-        <key>CFBundleVersion</key>
-        <string>1</string>
-        <key>LSMinimumSystemVersion</key>
-        <string>${MACOSX_DEPLOYMENT_TARGET}</string>
-        <key>NSHumanReadableCopyright</key>
-        <string>Copyright © 2011 Your Company Inc. All Rights Reserved.</string>
-        <key>JVMInfo</key>
-        <dict>
-                <key>JRE</key>
-                <string>1.7.0.jre</string>
-                <key>ClassPath</key>
-                <array/>
-                <key>Properties</key>
-                <dict>
-                        <key>apple.laf.useScreenMenuBar</key>
-                        <string>true</string>
-                </dict>
-                <key>MainClass</key>
-                <string>com.yourcompany.yourapp.mainclass</string>
-                <key>Arguments</key>
-                <array/>
-        </dict>
-</dict>
-</plist>
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/JVMArgs.h	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "jni.h"
-
-
-@interface JVMArgs : NSObject {
-@public
-    NSBundle *jreBundle;
-    char *preferredJVMLib;
-    JavaVMInitArgs vm_args;
-    BOOL startOnFirstThread;
-    BOOL debug;
-
-    NSDictionary *appInfo;
-    NSMutableDictionary *jvmInfo;
-
-    NSString *userHome;
-    NSString *appPackage;
-    NSString *javaRoot;
-}
-
-@property (retain, nonatomic) NSBundle *jreBundle;
-@property (nonatomic) char *preferredJVMLib;
-@property (nonatomic) JavaVMInitArgs vm_args;
-@property (nonatomic) BOOL startOnFirstThread;
-@property (nonatomic) BOOL debug;
-
-@property (retain, nonatomic) NSDictionary *appInfo;
-@property (retain, nonatomic) NSMutableDictionary *jvmInfo;
-
-@property (retain, nonatomic) NSString *userHome;
-@property (retain, nonatomic) NSString *appPackage;
-@property (retain, nonatomic) NSString *javaRoot;
-
-+ (JVMArgs *)jvmArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv;
-
-@end
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/JVMArgs.m	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, 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.
- */
-
-#import "JVMArgs.h"
-
-
-#define kArgsFailure "JVMArgsFailure"
-
-NSString *kArgumentsKey = @"Arguments";
-
-NSString *kClassPathKey = @"ClassPath";
-#ifdef __i386__
-NSString *kArchClassPathKey = @"ClassPath.i386";
-#elif __x86_64__
-NSString *kArchClassPathKey = @"ClassPath.x86_64";
-#endif
-
-NSString *kVMOptionsKey = @"VMOptions";
-#ifdef __i386__
-NSString *kArchVMOptionsKey = @"VMOptions.i386";
-#elif __x86_64__
-NSString *kArchVMOptionsKey = @"VMOptions.x86_64";
-#endif
-
-
-@implementation JVMArgs
-
-@synthesize jreBundle;
-@synthesize preferredJVMLib;
-@synthesize vm_args;
-@synthesize startOnFirstThread;
-@synthesize debug;
-
-@synthesize appInfo;
-@synthesize jvmInfo;
-
-@synthesize userHome;
-@synthesize appPackage;
-@synthesize javaRoot;
-
-- (void) dealloc {
-    self.jreBundle = nil;
-    if (self.preferredJVMLib) free(self.preferredJVMLib);
-
-    self.appInfo = nil;
-    self.jvmInfo = nil;
-
-    self.userHome = nil;
-    self.appPackage = nil;
-    self.javaRoot = nil;
-
-    [super dealloc];
-}
-
-
-NSString *GetJavaRoot(NSDictionary *jvmInfoDict) {
-    NSObject *javaRoot = [jvmInfoDict objectForKey:@"$JAVAROOT"];
-    if (![javaRoot isKindOfClass:[NSString class]]) return @"$APP_PACKAGE/Contents/Java";
-    return (NSString *)javaRoot;
-}
-
-// Replaces occurances of $JAVAROOT, $APP_PACKAGE, and $USER_HOME
-- (NSString *) expandMacros:(NSString *)str {
-    if ([str rangeOfString:@"$JAVAROOT"].length == 0 && [str rangeOfString:@"$APP_PACKAGE"].length == 0 && [str rangeOfString:@"$USER_HOME"].length == 0) return str;
-
-    // expand $JAVAROOT first, because it can contain $APP_PACKAGE
-    NSMutableString *mutable = [str mutableCopy];
-    [mutable replaceOccurrencesOfString:@"$JAVAROOT" withString:javaRoot options:0 range:NSMakeRange(0, [str length])];
-    [mutable replaceOccurrencesOfString:@"$APP_PACKAGE" withString:appPackage options:0 range:NSMakeRange(0, [str length])];
-    [mutable replaceOccurrencesOfString:@"$USER_HOME" withString:userHome options:0 range:NSMakeRange(0, [str length])];
-    return mutable;
-}
-
-- (NSArray *) arrayFrom:(id) obj delimitedBy:(NSString *)delimiter withErrKey:(NSString *)key {
-    if (obj == nil) return nil;
-    if ([obj isKindOfClass:[NSArray class]]) return obj;
-    if (![obj isKindOfClass:[NSString class]]) {
-        [NSException raise:@kArgsFailure format:@"%@", [NSString stringWithFormat:@"Failed to find '%@' array in JVMInfo Info.plist"]];
-    }
-
-    // split
-    return [(NSString *)obj componentsSeparatedByString:delimiter];
-}
-
-- (void) buildArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv {
-    // for verbose logging
-    self.debug = NULL != getenv("JAVA_LAUNCHER_VERBOSE");
-
-    self.appInfo = [appBundle infoDictionary];
-
-    // all apps must have a JVMInfo dictionary inside their Info.plist
-    self.jvmInfo = [[self.appInfo objectForKey:@"JVMInfo"] mutableCopy];
-    if (![jvmInfo isKindOfClass:[NSDictionary class]]) {
-        [NSException raise:@kArgsFailure format:@"Failed to find 'JVMInfo' dictionary in Info.plist"];
-    }
-
-    // initialize macro expansion values
-    self.userHome = NSHomeDirectory();
-    self.appPackage = [appBundle bundlePath];
-    self.javaRoot = GetJavaRoot(jvmInfo);
-    self.javaRoot = [self expandMacros:self.javaRoot]; // dereference $APP_PACKAGE
-
-    // if the 'Arguments' key is defined, those override the ones that came into main()
-    NSArray *jvmInfoArgs = [jvmInfo valueForKey:kArgumentsKey];
-    if (jvmInfoArgs != nil) {
-        // substitute all the variables in the 'Arguments' array/string
-        jvmInfoArgs = [self arrayFrom:jvmInfoArgs delimitedBy:@" " withErrKey:kArgumentsKey];
-        NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:[jvmInfoArgs count]];
-        [jvmInfoArgs enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
-            [arguments replaceObjectAtIndex:idx withObject:[self expandMacros:[obj description]]];
-        }];
-        [jvmInfo setObject:arguments forKey:kArgumentsKey];
-    } else if (argc != 0) {
-        // put the (macro expanded) args to main() in an NSArray
-        NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:argc];
-        for (int i = 0; i < argc; i++) {
-            [arguments addObject:[self expandMacros:[NSString stringWithUTF8String:(argv[i])]]];
-        }
-        [jvmInfo setObject:arguments forKey:kArgumentsKey];
-    }
-
-    // all JVMInfo's must have a JRE or JDK key
-    NSString *jreBundleName = [jvmInfo objectForKey:@"JRE"];
-    if (!jreBundleName) jreBundleName = [jvmInfo objectForKey:@"JDK"];
-    if (![jreBundleName isKindOfClass:[NSString class]]) {
-        [NSException raise:@kArgsFailure format:@"Failed to find 'JRE' or 'JDK' string in Info.plist JVMInfo"];
-    }
-
-    // the JRE/JDK must be loadable from the ($APP_PACKAGE)/Contents/PlugIns/ directory
-    NSURL *jreBundleURL = [[appBundle builtInPlugInsURL] URLByAppendingPathComponent:jreBundleName];
-    self.jreBundle = [NSBundle bundleWithURL:jreBundleURL];
-    if (!self.jreBundle) {
-        [NSException raise:@kArgsFailure format:@"Failed to find JRE/JDK at: %@", jreBundleURL];
-    }
-
-    // if the app prefers 'client' or 'server', use the JVM key
-    NSString *JVMLib = [jvmInfo objectForKey:@"JVM"];
-    if (JVMLib != nil) self.preferredJVMLib = strdup([JVMLib UTF8String]);
-
-    // sniff for StartOnFirstThread
-    if ([[jvmInfo objectForKey:@"StartOnFirstThread"] boolValue]) {
-        self.startOnFirstThread = YES;
-    } else if ([[jvmInfo objectForKey:@"StartOnMainThread"] boolValue]) {
-        // for key compatibility with the Apple JavaApplicationStub's 'Java' dictionary
-        self.startOnFirstThread = YES;
-    }
-
-    // add $JAVAROOT directory to the JNI library search path
-    setenv("JAVA_LIBRARY_PATH", [javaRoot UTF8String], 1);
-
-    // 'WorkingDirectory' key changes current working directory
-    NSString *javaWorkingDir = [jvmInfo objectForKey:@"WorkingDirectory"];
-    if (javaWorkingDir == nil) javaWorkingDir = @"$APP_PACKAGE/..";
-    javaWorkingDir = [self expandMacros:javaWorkingDir];
-    if (chdir([javaWorkingDir UTF8String]) == -1) {
-        NSLog(@kArgsFailure " chdir() failed, could not change the current working directory to %s\n", [javaWorkingDir UTF8String]);
-    }
-
-    NSMutableArray *classpath = [NSMutableArray array];
-
-    // 'Jar' key sets exactly one classpath entry
-    NSString *jarFile = [jvmInfo objectForKey:@"Jar"];
-    if (jarFile != nil) {
-        [jvmInfo setObject:[self expandMacros:jarFile] forKey:@"Jar"];
-        [classpath addObject:jarFile];
-    }
-
-    // 'ClassPath' key allows arbitrary classpath
-    [classpath addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kClassPathKey] delimitedBy:@":" withErrKey:kClassPathKey]];
-    [classpath addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kArchClassPathKey] delimitedBy:@":" withErrKey:kArchClassPathKey]];
-
-    // Sum up all the classpath entries into one big JVM arg
-    NSMutableString *classpathOption = [NSMutableString stringWithString:@"-Djava.class.path="];
-    [classpath enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
-        if (idx > 1) [classpathOption appendString:@":"];
-        [classpathOption appendString:obj];
-    }];
-
-    NSMutableArray *jvmOptions = [NSMutableArray arrayWithObject:classpathOption];
-
-    // 'VMOptions' key allows arbitary VM start up options
-    [jvmOptions addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kVMOptionsKey] delimitedBy:@" " withErrKey:kVMOptionsKey]];
-    [jvmOptions addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kArchVMOptionsKey] delimitedBy:@" " withErrKey:kArchVMOptionsKey]];
-
-    // 'Properties' key is a sub-dictionary transfered to initial System.properties
-    NSDictionary *properties = [jvmInfo objectForKey:@"Properties"];
-    if (properties != nil) {
-        if (![properties isKindOfClass:[NSDictionary class]]) {
-            [NSException raise:@kArgsFailure format:@"Failed to find 'Properties' dictionary in Info.plist JVMInfo"];
-        }
-
-        [properties enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
-            [jvmOptions addObject:[NSString stringWithFormat:@"-D%@=%@", key, obj]];
-        }];
-    }
-
-    // build the real JVM init args struct
-    vm_args.version = JNI_VERSION_1_6;
-    vm_args.ignoreUnrecognized = JNI_TRUE;
-    vm_args.nOptions = [jvmOptions count];
-    vm_args.options = calloc(vm_args.nOptions, sizeof(JavaVMOption));
-    [jvmOptions enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
-        NSString *expanded = [self expandMacros:[obj description]]; // turn everything into a string, and expand macros
-        vm_args.options[idx].optionString = strdup([expanded UTF8String]);
-    }];
-}
-
-+ (JVMArgs *)jvmArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv {
-    JVMArgs *args = [JVMArgs new];
-    [args buildArgsForBundle:appBundle argc:argc argv:argv];
-    return [args autorelease];
-}
-
-@end
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher.h	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "jni.h"
-
-#import "JVMArgs.h"
-
-
-@interface JavaAppLauncher : NSObject {
-    JVMArgs *args;
-    JavaVM *jvm;
-}
-
-@property (retain) JVMArgs *args;
-
-- (void) findAndLoadJVM;
-- (void) invokeBundledAppJavaLauncherWithEnv:(JNIEnv *)env;
-
-@end
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher.m	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-#import "JavaAppLauncher.h"
-
-#import <dlfcn.h>
-
-#import "jni.h"
-
-#define kLaunchFailure "JavaAppLauncherFailure"
-
-
-typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
-typedef void (JNICALL *SetPreferredJVM_t)(const char *prefJVM);
-
-
-@implementation JavaAppLauncher
-
-@synthesize args;
-
-- (void) findAndLoadJVM {
-    NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
-    @try {
-        // load the libjli.dylib of the embedded JRE (or JDK) bundle
-        NSURL *jreBundleURL = [args.jreBundle bundleURL];
-        CFBundleRef jreBundle = CFBundleCreate(NULL, (CFURLRef)jreBundleURL);
-
-        NSError *err = nil;
-        Boolean jreBundleLoaded = CFBundleLoadExecutableAndReturnError(jreBundle, (CFErrorRef *)&err);
-        if (err != nil || !jreBundleLoaded) {
-            [NSException raise:@kLaunchFailure format:@"could not load the JRE/JDK: %@", err];
-        }
-
-        // if there is a preferred libjvm to load, set it here
-        if (args.preferredJVMLib != NULL) {
-            SetPreferredJVM_t setPrefJVMFxnPtr = CFBundleGetFunctionPointerForName(jreBundle, CFSTR("JLI_SetPreferredJVM"));
-            if (setPrefJVMFxnPtr != NULL) {
-                setPrefJVMFxnPtr(args.preferredJVMLib);
-            } else {
-                NSLog(@"No JLI_SetPreferredJVM in JRE/JDK primary executable, failed to set preferred JVM library to: %s", args->preferredJVMLib);
-            }
-        }
-
-        // pull the JNI_CreateJavaVM function pointer out of the primary executable of the JRE/JDK bundle
-        CreateJavaVM_t createJVMFxnPtr = CFBundleGetFunctionPointerForName(jreBundle, CFSTR("JNI_CreateJavaVM"));
-        if (createJVMFxnPtr == NULL) {
-            [NSException raise:@kLaunchFailure format:@"null JNI_CreateJavaVM fxn ptr from: %@", jreBundle];
-        }
-
-        // instantiate the JVM
-        JNIEnv *env;
-        jint createJVMStatus = createJVMFxnPtr(&jvm, (void **)&env, &(args->vm_args));
-        if (createJVMStatus != JNI_OK) {
-            [NSException raise:@kLaunchFailure format:@"failed to JNI_CreateJavaVM (%d): %@", createJVMStatus, jreBundle];
-        }
-
-        // check the app needs to run the Java main() on the main thread
-        if (args.startOnFirstThread) {
-            dispatch_sync(dispatch_get_main_queue(), ^(void) {
-                JNIEnv *mainThreadEnv;
-                (*jvm)->AttachCurrentThread(jvm, (void **)&mainThreadEnv, NULL);
-                [self invokeBundledAppJavaLauncherWithEnv:mainThreadEnv];
-                (*jvm)->DetachCurrentThread(jvm);
-            });
-        } else {
-            [self invokeBundledAppJavaLauncherWithEnv:env];
-        }
-
-    } @catch (NSException *e) {
-        NSLog(@"%@: %@", e, [e callStackSymbols]);
-    }
-
-    if (jvm) {
-        (*jvm)->DetachCurrentThread(jvm);
-        (*jvm)->DestroyJavaVM(jvm);
-    }
-
-    [pool drain];
-}
-
-static const char kLauncherClassName[] = "apple/launcher/JavaAppLauncher";
-
-- (void) invokeBundledAppJavaLauncherWithEnv:(JNIEnv *)env {
-    // hand off control to the apple.launcher.JavaAppLauncher class
-
-    jclass mainClass = (*env)->FindClass(env, kLauncherClassName);
-    if (mainClass == NULL) {
-        fprintf(stderr, kLaunchFailure " FindClass() failed for class %s:\n", kLauncherClassName);
-        (*env)->ExceptionDescribe(env);
-        return;
-    }
-
-    jmethodID mainMethod = (*env)->GetStaticMethodID(env, mainClass, "launch", "(JZ)V");
-    if ((mainMethod == NULL) || (*env)->ExceptionOccurred(env)) {
-        fprintf(stderr, kLaunchFailure " GetStaticMethodID() failed for launch() method");
-        (*env)->ExceptionDescribe(env);
-        return;
-    }
-
-    CFDictionaryRef jvmInfo = CFRetain(args.jvmInfo);
-
-    (*env)->CallStaticVoidMethod(env, mainClass, mainMethod, (jlong)jvmInfo, (jboolean)args.debug);
-    if ((*env)->ExceptionOccurred(env)) {
-        fprintf(stderr, kLaunchFailure " CallStaticVoidMethod() threw an exception\n");
-        (*env)->ExceptionDescribe(env);
-        return;
-    }
-}
-
-@end
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/JavaAppLauncher_Prefix.pch	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-//
-// Prefix header for all source files of the 'JavaAppLauncher' target in the 'JavaAppLauncher' project
-//
-
-#ifdef __OBJC__
-    #import <Cocoa/Cocoa.h>
-#endif
--- a/jdk/src/macosx/bundle/JavaAppLauncher/src/main.m	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "JVMArgs.h"
-#import "JavaAppLauncher.h"
-
-
-static void dummyTimer(CFRunLoopTimerRef timer, void *info) {}
-static void ParkEventLoop() {
-    // RunLoop needs at least one source, and 1e20 is pretty far into the future
-    CFRunLoopTimerRef t = CFRunLoopTimerCreate(kCFAllocatorDefault, 1.0e20, 0.0, 0, 0, dummyTimer, NULL);
-    CFRunLoopAddTimer(CFRunLoopGetCurrent(), t, kCFRunLoopDefaultMode);
-    CFRelease(t);
-
-    // Park this thread in the main run loop.
-    int32_t result;
-    do {
-        result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, false);
-    } while (result != kCFRunLoopRunFinished);
-}
-
-int main(int argc, char *argv[]) {
-    NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
-    @try {
-        NSBundle *mainBundle = [NSBundle mainBundle];
-
-        // pick apart the Info.plist, and release all the temporary objects
-        NSAutoreleasePool *argParsingPool = [NSAutoreleasePool new];
-        JVMArgs *args = [JVMArgs jvmArgsForBundle:mainBundle argc:argc argv:argv];
-        JavaAppLauncher *launcher = [JavaAppLauncher new];
-        launcher.args = args;
-        [argParsingPool drain];
-
-        // kick off a new thread to instantiate the JVM on
-        NSThread *thread = [[NSThread alloc] initWithTarget:launcher selector:@selector(findAndLoadJVM) object:nil];
-        struct rlimit limit;
-        int err = getrlimit(RLIMIT_STACK, &limit);
-        if (err == 0 && limit.rlim_cur != 0LL) {
-            [thread setStackSize:limit.rlim_cur];
-        }
-        [thread start];
-        [thread release];
-
-        [launcher release];
-
-        ParkEventLoop();
-
-    } @catch (NSException *e) {
-        NSLog(@"%@: %@", e, [e callStackSymbols]);
-    }
-
-    [pool drain];
-
-    return 0;
-}
--- a/jdk/src/macosx/classes/apple/launcher/JavaAppLauncher.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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 apple.launcher;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.text.MessageFormat;
-import java.util.*;
-import java.util.jar.*;
-
-import javax.swing.*;
-
-class JavaAppLauncher implements Runnable {
-    static {
-        java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
-                public Void run() {
-                    System.loadLibrary("osx");
-                    return null;
-                }
-            });
-    }
-
-    private static native <T> T nativeConvertAndRelease(final long ptr);
-    private static native void nativeInvokeNonPublic(Class<? extends Method> cls, Method m, String[] args);
-
-    // entry point from native
-    static void launch(final long javaDictionaryPtr, final boolean verbose) {
-        final Map<String, ?> javaDictionary = nativeConvertAndRelease(javaDictionaryPtr);
-        (new JavaAppLauncher(javaDictionary, verbose)).run();
-    }
-
-        // these are the values for the enumeration JavaFailureMode
-        static final String kJavaFailureMainClassNotSpecified = "MainClassNotSpecified";
-        static final String kJavaFailureMainClassNotFound = "CannotLoadMainClass";
-        static final String kJavaFailureMainClassHasNoMain = "NoMainMethod";
-        static final String kJavaFailureMainClassMainNotStatic = "MainNotStatic";
-        static final String kJavaFailureMainThrewException = "MainThrewException";
-        static final String kJavaFailureMainInitializerException = "MainInitializerException";
-
-        final boolean verbose; // Normally set by environment variable JAVA_LAUNCHER_VERBOSE.
-        final Map<String, ?> javaDictionary;
-
-        JavaAppLauncher(final Map<String, ?> javaDictionary, final boolean verbose) {
-                this.verbose = verbose;
-                this.javaDictionary = javaDictionary;
-        }
-
-        @Override
-        public void run() {
-                final Method m = loadMainMethod(getMainMethod());
-                final String methodName = m.getDeclaringClass().getName() + ".main(String[])";
-                try {
-                        log("Calling " + methodName + " method");
-                        m.invoke(null, new Object[] { getArguments() });
-                        log(methodName + " has returned");
-                } catch (final IllegalAccessException x) {
-                        try {
-                                nativeInvokeNonPublic(m.getClass(), m, getArguments());
-                        } catch (final Throwable excpt) {
-                                logError(methodName + " threw an exception:");
-                                if ((excpt instanceof UnsatisfiedLinkError) && excpt.getMessage().equals("nativeInvokeNonPublic")) {
-                                        showFailureAlertAndKill(kJavaFailureMainThrewException, "nativeInvokeNonPublic not registered");
-                                } else {
-                                        excpt.printStackTrace();
-                                        showFailureAlertAndKill(kJavaFailureMainThrewException, excpt.toString());
-                                }
-                        }
-                } catch (final InvocationTargetException invokeExcpt) {
-                        logError(methodName + " threw an exception:");
-                        invokeExcpt.getTargetException().printStackTrace();
-                        showFailureAlertAndKill(kJavaFailureMainThrewException, invokeExcpt.getTargetException().toString());
-                }
-        }
-
-        Method loadMainMethod(final String mainClassName) {
-                try {
-                        final Class<?> mainClass = Class.forName(mainClassName, true, sun.misc.Launcher.getLauncher().getClassLoader());
-                        final Method mainMethod = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
-                        if ((mainMethod.getModifiers() & Modifier.STATIC) == 0) {
-                                logError("The main(String[]) method of class " + mainClassName + " is not static!");
-                                showFailureAlertAndKill(kJavaFailureMainClassMainNotStatic, mainClassName);
-                        }
-                        return mainMethod;
-                } catch (final ExceptionInInitializerError x) {
-                        logError("The main class \"" + mainClassName + "\" had a static initializer throw an exception.");
-                        x.getException().printStackTrace();
-                        showFailureAlertAndKill(kJavaFailureMainInitializerException, x.getException().toString());
-                } catch (final ClassNotFoundException x) {
-                        logError("The main class \"" + mainClassName + "\" could not be found.");
-                        showFailureAlertAndKill(kJavaFailureMainClassNotFound, mainClassName);
-                } catch (final NoSuchMethodException x) {
-                        logError("The main class \"" + mainClassName + "\" has no static main(String[]) method.");
-                        showFailureAlertAndKill(kJavaFailureMainClassHasNoMain, mainClassName);
-                } catch (final NullPointerException x) {
-                        logError("No main class specified");
-                        showFailureAlertAndKill(kJavaFailureMainClassNotSpecified, null);
-                }
-
-                return null;
-        }
-
-        // get main class name from 'Jar' key, or 'MainClass' key
-        String getMainMethod() {
-                final Object javaJar = javaDictionary.get("Jar");
-                if (javaJar != null) {
-                        if (!(javaJar instanceof String)) {
-                                logError("'Jar' key in 'Java' sub-dictionary of Info.plist requires a string value");
-                                return null;
-                        }
-
-                        final String jarPath = (String)javaJar;
-                        if (jarPath.length() == 0) {
-                                log("'Jar' key of sub-dictionary 'Java' of Info.plist key is empty");
-                        } else {
-                                // extract main class from manifest of this jar
-                                final String main = getMainFromManifest(jarPath);
-                                if (main == null) {
-                                        logError("jar file '" + jarPath + "' does not have Main-Class: attribute in its manifest");
-                                        return null;
-                                }
-
-                                log("Main class " + main + " found in jar manifest");
-                                return main;
-                        }
-                }
-
-                final Object javaMain = javaDictionary.get("MainClass");
-                if (!(javaMain instanceof String)) {
-                        logError("'MainClass' key in 'Java' sub-dictionary of Info.plist requires a string value");
-                        return null;
-                }
-
-                final String main = (String)javaMain;
-                if (main.length() == 0) {
-                        log("'MainClass' key of sub-dictionary 'Java' of Info.plist key is empty");
-                        return null;
-                }
-
-                log("Main class " + (String)javaMain + " found via 'MainClass' key of sub-dictionary 'Java' of Info.plist key");
-                return (String)javaMain;
-        }
-
-        // get arguments for main(String[]) out of Info.plist and command line
-        String[] getArguments() {
-                // check for 'Arguments' key, which contains the main() args if not defined in Info.plist
-                final Object javaArguments = javaDictionary.get("Arguments");
-                if (javaArguments == null) {
-                        // no arguments
-                        log("No arguments for main(String[]) specified");
-                        return new String[0];
-                }
-
-                if (javaArguments instanceof List) {
-                        final List<?> args = (List<?>)javaArguments;
-                        final int count = args.size();
-                        log("Arguments to main(String[" + count + "]):");
-
-                        final String[] result = new String[count];
-                        for (int i = 0; i < count; ++i) {
-                                final Object element = args.get(i);
-                                if (element instanceof String) {
-                                        result[i] = (String)element;
-                                } else {
-                                        logError("Found non-string in array");
-                                }
-                                log("   arg[" + i + "]=" + result[i]);
-                        }
-                        return result;
-                }
-
-                logError("'Arguments' key in 'Java' sub-dictionary of Info.plist requires a string value or an array of strings");
-                return new String[0];
-        }
-
-        // returns name of main class, or null
-        String getMainFromManifest(final String jarpath) {
-                JarFile jar = null;
-                try {
-                        jar = new JarFile(jarpath);
-                        final Manifest man = jar.getManifest();
-                        final Attributes attr = man.getMainAttributes();
-                        return attr.getValue("Main-Class");
-                } catch (final IOException x) {
-                        // shrug
-                } finally {
-                        if (jar != null) {
-                                try {
-                                        jar.close();
-                                } catch (final IOException x) { }
-                        }
-                }
-                return null;
-        }
-
-        void log(final String s) {
-                if (!verbose) return;
-                System.out.println("[LaunchRunner] " + s);
-        }
-
-        static void logError(final String s) {
-                System.err.println("[LaunchRunner Error] " + s);
-        }
-
-        // This kills the app and does not return!
-        static void showFailureAlertAndKill(final String msg, String arg) {
-                if (arg == null) arg = "<<null>>";
-                JOptionPane.showMessageDialog(null, getMessage(msg, arg), "", JOptionPane.ERROR_MESSAGE);
-                System.exit(-1);
-        }
-
-        static String getMessage(final String msgKey, final Object ... args) {
-            final String msg = ResourceBundle.getBundle("appLauncherErrors").getString(msgKey);
-            return MessageFormat.format(msg, args);
-        }
-}
--- a/jdk/src/macosx/classes/apple/launcher/appLauncherErrors.properties	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-MainClassNotSpecified=No main class specified.
-CannotLoadMainClass=The main class \u201C{0}\u201D could not be loaded.
-NoMainMethod=The main class \u201C{0}\u201D has no \u201Cvoid main(String[])\u201D method.
-MainNotStatic=The \u201Cmain(String[])\u201D method of class \u201C{0}\u201D is not static.
-MainThrewException=Uncaught exception in main method: {0}
-MainInitializerException=A static initializer of the main class threw an exception: {0}
--- a/jdk/src/macosx/classes/apple/security/KeychainStore.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/apple/security/KeychainStore.java	Fri Aug 08 11:36:48 2014 -0700
@@ -74,19 +74,19 @@
      * Entries that have been deleted.  When something calls engineStore we'll
      * remove them from the keychain.
      */
-    private Hashtable deletedEntries = new Hashtable();
+    private Hashtable<String, Object> deletedEntries = new Hashtable<>();
 
     /**
      * Entries that have been added.  When something calls engineStore we'll
      * add them to the keychain.
      */
-    private Hashtable addedEntries = new Hashtable();
+    private Hashtable<String, Object> addedEntries = new Hashtable<>();
 
     /**
      * Private keys and certificates are stored in a hashtable.
      * Hash entries are keyed by alias names.
      */
-    private Hashtable entries = new Hashtable();
+    private Hashtable<String, Object> entries = new Hashtable<>();
 
     /**
      * Algorithm identifiers and corresponding OIDs for the contents of the PKCS12 bag we get from the Keychain.
@@ -471,7 +471,7 @@
 
             // This will be slow, but necessary.  Enumerate the values and then see if the cert matches the one in the trusted cert entry.
             // Security framework doesn't support the same certificate twice in a keychain.
-            Collection allValues = entries.values();
+            Collection<Object> allValues = entries.values();
 
             for (Object value : allValues) {
                 if (value instanceof TrustedCertEntry) {
@@ -517,7 +517,7 @@
      *
      * @return enumeration of the alias names
      */
-    public Enumeration engineAliases() {
+    public Enumeration<String> engineAliases() {
         permissionCheck();
         return entries.keys();
     }
@@ -598,8 +598,8 @@
         permissionCheck();
         Certificate certElem;
 
-        for (Enumeration e = entries.keys(); e.hasMoreElements(); ) {
-            String alias = (String)e.nextElement();
+        for (Enumeration<String> e = entries.keys(); e.hasMoreElements(); ) {
+            String alias = e.nextElement();
             Object entry = entries.get(alias);
             if (entry instanceof TrustedCertEntry) {
                 certElem = ((TrustedCertEntry)entry).cert;
@@ -634,8 +634,8 @@
         permissionCheck();
 
         // Delete items that do have a keychain item ref.
-        for (Enumeration e = deletedEntries.keys(); e.hasMoreElements(); ) {
-            String alias = (String)e.nextElement();
+        for (Enumeration<String> e = deletedEntries.keys(); e.hasMoreElements(); ) {
+            String alias = e.nextElement();
             Object entry = deletedEntries.get(alias);
             if (entry instanceof TrustedCertEntry) {
                 if (((TrustedCertEntry)entry).certRef != 0) {
@@ -664,8 +664,8 @@
 
         // Add all of the certs or keys in the added entries.
         // No need to check for 0 refs, as they are in the added list.
-        for (Enumeration e = addedEntries.keys(); e.hasMoreElements(); ) {
-            String alias = (String)e.nextElement();
+        for (Enumeration<String> e = addedEntries.keys(); e.hasMoreElements(); ) {
+            String alias = e.nextElement();
             Object entry = addedEntries.get(alias);
             if (entry instanceof TrustedCertEntry) {
                 TrustedCertEntry tce = (TrustedCertEntry)entry;
@@ -730,8 +730,8 @@
 
         // Release any stray keychain references before clearing out the entries.
         synchronized(entries) {
-            for (Enumeration e = entries.keys(); e.hasMoreElements(); ) {
-                String alias = (String)e.nextElement();
+            for (Enumeration<String> e = entries.keys(); e.hasMoreElements(); ) {
+                String alias = e.nextElement();
                 Object entry = entries.get(alias);
                 if (entry instanceof TrustedCertEntry) {
                     if (((TrustedCertEntry)entry).certRef != 0) {
@@ -816,7 +816,7 @@
 
         // Next, create X.509 Certificate objects from the raw data.  This is complicated
         // because a certificate's public key may be too long for Java's default encryption strength.
-        List createdCerts = new ArrayList();
+        List<CertKeychainItemPair> createdCerts = new ArrayList<>();
 
         try {
             CertificateFactory cf = CertificateFactory.getInstance("X.509");
@@ -842,12 +842,12 @@
 
         // We have our certificates in the List, so now extract them into an array of
         // Certificates and SecCertificateRefs.
-        Object[] objArray = createdCerts.toArray();
+        CertKeychainItemPair[] objArray = createdCerts.toArray(new CertKeychainItemPair[0]);
         Certificate[] certArray = new Certificate[objArray.length];
         long[] certRefArray = new long[objArray.length];
 
         for (int i = 0; i < objArray.length; i++) {
-            CertKeychainItemPair addedItem = (CertKeychainItemPair)objArray[i];
+            CertKeychainItemPair addedItem = objArray[i];
             certArray[i] = addedItem.mCert;
             certRefArray[i] = addedItem.mCertificateRef;
         }
--- a/jdk/src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -95,7 +95,7 @@
 
     static Creator getCImageCreator() {
         try {
-            final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
+            final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class<?>[] {});
             getCreatorMethod.setAccessible(true);
             return (Creator)getCreatorMethod.invoke(null, new Object[] {});
         } catch (final Throwable e) {
--- a/jdk/src/macosx/classes/com/apple/laf/AquaBorder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaBorder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -75,7 +75,7 @@
     protected AquaBorder deriveBorderForSize(final Size size) {
         try {
             final Class<? extends AquaBorder> clazz = getClass();
-            final AquaBorder border = clazz.getConstructor(new Class[] { clazz }).newInstance(new Object[] { this });
+            final AquaBorder border = clazz.getConstructor(new Class<?>[] { clazz }).newInstance(new Object[] { this });
             border.setSize(size);
             return border;
         } catch (final Throwable e) {
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,8 +35,8 @@
 
 @SuppressWarnings("serial") // Superclass is not serializable across versions
 class AquaComboBoxButton extends JButton {
-    final protected JComboBox comboBox;
-    final protected JList list;
+    final protected JComboBox<Object> comboBox;
+    final protected JList<?> list;
     final protected CellRendererPane rendererPane;
     final protected AquaComboBoxUI ui;
 
@@ -45,7 +45,10 @@
     boolean isSquare;
 
     @SuppressWarnings("serial") // anonymous class
-    protected AquaComboBoxButton(final AquaComboBoxUI ui, final JComboBox comboBox, final CellRendererPane rendererPane, final JList list) {
+    protected AquaComboBoxButton(final AquaComboBoxUI ui,
+                                 final JComboBox<Object> comboBox,
+                                 final CellRendererPane rendererPane,
+                                 final JList<?> list) {
         super("");
         putClientProperty("JButton.buttonType", "comboboxInternal");
 
@@ -163,7 +166,7 @@
     }
 
     protected void doRendererPaint(final Graphics g, final ButtonModel buttonModel, final boolean editable, final Insets insets, int left, int top, int width, int height) {
-        final ListCellRenderer renderer = comboBox.getRenderer();
+        final ListCellRenderer<Object> renderer = comboBox.getRenderer();
 
         // fake it out! not renderPressed
         final Component c = renderer.getListCellRendererComponent(list, comboBox.getSelectedItem(), -1, false, false);
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
     protected Component bottomStrut;
     protected boolean isPopDown = false;
 
-    public AquaComboBoxPopup(final JComboBox cBox) {
+    public AquaComboBoxPopup(final JComboBox<Object> cBox) {
         super(cBox);
     }
 
@@ -93,7 +93,7 @@
         final int rowCount = Math.min(maxRowCount, currentElementCount);
 
         final Dimension popupSize = new Dimension();
-        final ListCellRenderer renderer = list.getCellRenderer();
+        final ListCellRenderer<Object> renderer = list.getCellRenderer();
 
         for (int i = 0; i < rowCount; i++) {
             final Object value = list.getModel().getElementAt(i);
@@ -149,8 +149,8 @@
 
     @Override
     @SuppressWarnings("serial") // anonymous class
-    protected JList createList() {
-        return new JList(comboBox.getModel()) {
+    protected JList<Object> createList() {
+        return new JList<Object>(comboBox.getModel()) {
             @Override
             public void processMouseEvent(MouseEvent e) {
                 if (e.isMetaDown()) {
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,8 +29,8 @@
 import javax.swing.plaf.UIResource;
 
 @SuppressWarnings("serial") // Superclass is not serializable across versions
-class AquaComboBoxRenderer extends AquaComboBoxRendererInternal implements UIResource {
-    public AquaComboBoxRenderer(final JComboBox comboBox) {
+class AquaComboBoxRenderer extends AquaComboBoxRendererInternal<Object> implements UIResource {
+    public AquaComboBoxRenderer(final JComboBox<?> comboBox) {
         super(comboBox);
     }
 }
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,8 +31,8 @@
 import java.awt.*;
 
 @SuppressWarnings("serial") // Superclass is not serializable across versions
-class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
-    final JComboBox fComboBox;
+class AquaComboBoxRendererInternal<E> extends JLabel implements ListCellRenderer<E> {
+    final JComboBox<?> fComboBox;
     boolean fSelected;
     boolean fChecked;
     boolean fInList;
@@ -40,7 +40,7 @@
     boolean fDrawCheckedItem = true;
 
     // Provides space for a checkbox, and is translucent
-    public AquaComboBoxRendererInternal(final JComboBox comboBox) {
+    public AquaComboBoxRendererInternal(final JComboBox<?> comboBox) {
         super();
         fComboBox = comboBox;
     }
@@ -72,7 +72,10 @@
     }
 
     // Really means is the one with the mouse over it
-    public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
+    public Component getListCellRendererComponent(final JList<? extends E> list,
+                                                  final E value, int index,
+                                                  final boolean isSelected,
+                                                  final boolean cellHasFocus) {
         fInList = (index >= 0); // When the button wants the item painted, it passes in -1
         fSelected = isSelected;
         if (index < 0) {
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -102,13 +102,13 @@
                 if (now - 1000 < lastBlink) return;
                 lastBlink = now;
 
-                final JList itemList = popup.getList();
+                final JList<Object> itemList = popup.getList();
                 final ListUI listUI = itemList.getUI();
                 if (!(listUI instanceof AquaListUI)) return;
                 final AquaListUI aquaListUI = (AquaListUI)listUI;
 
                 final int selectedIndex = comboBox.getSelectedIndex();
-                final ListModel dataModel = itemList.getModel();
+                final ListModel<Object> dataModel = itemList.getModel();
                 if (dataModel == null) return;
 
                 final Object value = dataModel.getElementAt(selectedIndex);
@@ -125,7 +125,7 @@
         // this space intentionally left blank
     }
 
-    protected ListCellRenderer createRenderer() {
+    protected ListCellRenderer<Object> createRenderer() {
         return new AquaComboBoxRenderer(comboBox);
     }
 
@@ -185,7 +185,7 @@
 
             final Object text = editor.getText();
 
-            final ListModel model = listBox.getModel();
+            final ListModel<Object> model = listBox.getModel();
             final int items = model.getSize();
             for (int i = 0; i < items; i++) {
                 final Object element = model.getElementAt(i);
@@ -423,7 +423,7 @@
                 return;
             }
 
-            final JComboBox cb = (JComboBox)parent;
+            final JComboBox<?> cb = (JComboBox<?>) parent;
             final int width = cb.getWidth();
             final int height = cb.getHeight();
 
@@ -450,11 +450,11 @@
         return Boolean.TRUE.equals(c.getClientProperty(AquaComboBoxUI.IS_TABLE_CELL_EDITOR));
     }
 
-    protected static boolean isPopdown(final JComboBox c) {
+    protected static boolean isPopdown(final JComboBox<?> c) {
         return c.isEditable() || Boolean.TRUE.equals(c.getClientProperty(AquaComboBoxUI.POPDOWN_CLIENT_PROPERTY_KEY));
     }
 
-    protected static void triggerSelectionEvent(final JComboBox comboBox, final ActionEvent e) {
+    protected static void triggerSelectionEvent(final JComboBox<?> comboBox, final ActionEvent e) {
         if (!comboBox.isEnabled()) return;
 
         final AquaComboBoxUI aquaUi = (AquaComboBoxUI)comboBox.getUI();
@@ -505,7 +505,7 @@
     @SuppressWarnings("serial") // anonymous class
     private static final Action toggleSelectionAction = new AbstractAction() {
         public void actionPerformed(final ActionEvent e) {
-            final JComboBox comboBox = (JComboBox)e.getSource();
+            final JComboBox<?> comboBox = (JComboBox<?>) e.getSource();
             if (!comboBox.isEnabled()) return;
             if (comboBox.isEditable()) return;
 
@@ -525,7 +525,7 @@
     private final Action hideAction = new AbstractAction() {
         @Override
         public void actionPerformed(final ActionEvent e) {
-            final JComboBox comboBox = (JComboBox)e.getSource();
+            final JComboBox<?> comboBox = (JComboBox<?>) e.getSource();
             comboBox.firePopupMenuCanceled();
             comboBox.setPopupVisible(false);
         }
@@ -588,10 +588,11 @@
     }
 
     @SuppressWarnings("unchecked")
-    static final RecyclableSingleton<ClientPropertyApplicator<JComboBox, AquaComboBoxUI>> APPLICATOR = new RecyclableSingleton<ClientPropertyApplicator<JComboBox, AquaComboBoxUI>>() {
+    static final RecyclableSingleton<ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>> APPLICATOR = new
+            RecyclableSingleton<ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>>() {
         @Override
-        protected ClientPropertyApplicator<JComboBox, AquaComboBoxUI> getInstance() {
-            return new ClientPropertyApplicator<JComboBox, AquaComboBoxUI>(
+        protected ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI> getInstance() {
+            return new ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>(
                 new Property<AquaComboBoxUI>(AquaFocusHandler.FRAME_ACTIVE_PROPERTY) {
                     public void applyProperty(final AquaComboBoxUI target, final Object value) {
                         if (Boolean.FALSE.equals(value)) {
@@ -633,7 +634,7 @@
                     }
                 }
             ) {
-                public AquaComboBoxUI convertJComponentToTarget(final JComboBox combo) {
+                public AquaComboBoxUI convertJComponentToTarget(final JComboBox<?> combo) {
                     final ComboBoxUI comboUI = combo.getUI();
                     if (comboUI instanceof AquaComboBoxUI) return (AquaComboBoxUI)comboUI;
                     return null;
@@ -641,7 +642,7 @@
             };
         }
     };
-    static ClientPropertyApplicator<JComboBox, AquaComboBoxUI> getApplicator() {
+    static ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI> getApplicator() {
         return APPLICATOR.get();
     }
 }
--- a/jdk/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -724,6 +724,7 @@
             final Transferable transferable = dtde.getTransferable();
 
             try {
+                @SuppressWarnings("unchecked")
                 final java.util.List<File> fileList = (java.util.List<File>)transferable.getTransferData(DataFlavor.javaFileListFlavor);
                 dropFiles(fileList.toArray(new File[fileList.size()]));
                 dtde.dropComplete(true);
@@ -1144,11 +1145,14 @@
     }
 
     @SuppressWarnings("serial") // anonymous class
-    protected ListCellRenderer createDirectoryComboBoxRenderer(final JFileChooser fc) {
-        return new AquaComboBoxRendererInternal(directoryComboBox) {
-            public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
-                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-                final File directory = (File)value;
+    protected ListCellRenderer<File> createDirectoryComboBoxRenderer(final JFileChooser fc) {
+        return new AquaComboBoxRendererInternal<File>(directoryComboBox) {
+            public Component getListCellRendererComponent(final JList<? extends File> list,
+                                                          final File directory,
+                                                          final int index,
+                                                          final boolean isSelected,
+                                                          final boolean cellHasFocus) {
+                super.getListCellRendererComponent(list, directory, index, isSelected, cellHasFocus);
                 if (directory == null) {
                     setText("");
                     return this;
@@ -1173,7 +1177,7 @@
      * Data model for a type-face selection combo-box.
      */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
-    protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
+    protected class DirectoryComboBoxModel extends AbstractListModel<File> implements ComboBoxModel<File> {
         Vector<File> fDirectories = new Vector<File>();
         int topIndex = -1;
         int fPathCount = 0;
@@ -1248,7 +1252,7 @@
             return fDirectories.size();
         }
 
-        public Object getElementAt(final int index) {
+        public File getElementAt(final int index) {
             return fDirectories.elementAt(index);
         }
     }
@@ -1257,11 +1261,14 @@
     // Renderer for Types ComboBox
     //
     @SuppressWarnings("serial") // anonymous class
-    protected ListCellRenderer createFilterComboBoxRenderer() {
-        return new AquaComboBoxRendererInternal(filterComboBox) {
-            public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
-                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-                final FileFilter filter = (FileFilter)value;
+    protected ListCellRenderer<FileFilter> createFilterComboBoxRenderer() {
+        return new AquaComboBoxRendererInternal<FileFilter>(filterComboBox) {
+            public Component getListCellRendererComponent(final JList<? extends FileFilter> list,
+                                                          final FileFilter filter,
+                                                          final int index,
+                                                          final boolean isSelected,
+                                                          final boolean cellHasFocus) {
+                super.getListCellRendererComponent(list, filter, index, isSelected, cellHasFocus);
                 if (filter != null) setText(filter.getDescription());
                 return this;
             }
@@ -1356,7 +1363,7 @@
         }
 
         public void actionPerformed(final ActionEvent e) {
-            getFileChooser().setFileFilter((FileFilter)filterComboBox.getSelectedItem());
+            getFileChooser().setFileFilter((FileFilter) filterComboBox.getSelectedItem());
         }
     }
 
@@ -1503,7 +1510,7 @@
         fTextfieldPanel.add(tPanel, BorderLayout.CENTER);
 
         // DirectoryComboBox, left-justified, 200x20 not including drop shadow
-        directoryComboBox = new JComboBox();
+        directoryComboBox = new JComboBox<>();
         directoryComboBox.putClientProperty("JComboBox.lightweightKeyboardNavigation", "Lightweight");
         fDirectoryComboBoxModel = createDirectoryComboBoxModel(fc);
         directoryComboBox.setModel(fDirectoryComboBoxModel);
@@ -1551,7 +1558,7 @@
         // Combobox
         filterComboBoxModel = createFilterComboBoxModel();
         fc.addPropertyChangeListener(filterComboBoxModel);
-        filterComboBox = new JComboBox(filterComboBoxModel);
+        filterComboBox = new JComboBox<>(filterComboBoxModel);
         formatLabel.setLabelFor(filterComboBox);
         filterComboBox.setRenderer(createFilterComboBoxRenderer());
         d = new Dimension(220, (int)filterComboBox.getMinimumSize().getHeight());
@@ -1788,7 +1795,7 @@
         }
     }
 
-    JComboBox directoryComboBox;
+    JComboBox<File> directoryComboBox;
     DirectoryComboBoxModel fDirectoryComboBoxModel;
     private final Action directoryComboBoxAction = new DirectoryComboBoxAction();
 
@@ -1797,7 +1804,7 @@
     JTableExtension fFileList;
 
     private FilterComboBoxModel filterComboBoxModel;
-    JComboBox filterComboBox;
+    JComboBox<FileFilter> filterComboBox;
     private final Action filterComboBoxAction = new FilterComboBoxAction();
 
     private static final Dimension hstrut10 = new Dimension(10, 1);
--- a/jdk/src/macosx/classes/com/apple/laf/AquaFocusHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaFocusHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -131,7 +131,7 @@
         c.setSelectionBackground(UIManager.getColor(bgName));
     }
 
-    static void swapSelectionColors(final String prefix, final JList c, final Object value) {
+    static void swapSelectionColors(final String prefix, final JList<?> c, final Object value) {
         if (!isComponentValid(c)) return;
 
         final Color bg = c.getSelectionBackground();
@@ -149,7 +149,7 @@
         }
     }
 
-    static void setSelectionColors(final JList c, final String fgName, final String bgName) {
+    static void setSelectionColors(final JList<?> c, final String fgName, final String bgName) {
         c.setSelectionForeground(UIManager.getColor(fgName));
         c.setSelectionBackground(UIManager.getColor(bgName));
     }
--- a/jdk/src/macosx/classes/com/apple/laf/AquaListUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaListUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -79,7 +79,7 @@
          * For a Home action, scrolls to the top. Otherwise, scroll to the end.
          */
         public void actionPerformed(final ActionEvent e) {
-            final JList list = (JList)e.getSource();
+            final JList<?> list = (JList<?>)e.getSource();
 
             if (fHomeAction) {
                 list.ensureIndexIsVisible(0);
@@ -135,7 +135,7 @@
         }*/
     }
 
-    JList getComponent() {
+    JList<Object> getComponent() {
         return list;
     }
 
@@ -144,7 +144,7 @@
         final Rectangle rowBounds = getCellBounds(list, selectedIndex, selectedIndex);
         if (rowBounds == null) return;
 
-        final ListCellRenderer renderer = list.getCellRenderer();
+        final ListCellRenderer<Object> renderer = list.getCellRenderer();
         if (renderer == null) return;
 
         final Component rendererComponent = renderer.getListCellRendererComponent(list, value, selectedIndex, selected, true);
--- a/jdk/src/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3820,7 +3820,7 @@
                 _loader = null;
                 final Class<?> klass = (Class<?>)loader;
                 try {
-                    final java.lang.reflect.Method method = klass.getDeclaredMethod("loadActionMap", new Class[] { LazyActionMap.class });
+                    final java.lang.reflect.Method method = klass.getDeclaredMethod("loadActionMap", new Class<?>[] { LazyActionMap.class });
                     method.invoke(klass, new Object[] { this });
                 } catch (final NoSuchMethodException nsme) {
                     assert false : "LazyActionMap unable to load actions " + klass;
--- a/jdk/src/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -69,6 +69,7 @@
 
     final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
         @Override
+        @SuppressWarnings("unchecked")
         protected ClientPropertyApplicator<JTableHeader, JTableHeader> getInstance() {
             return new ClientPropertyApplicator<JTableHeader, JTableHeader>(
                     new Property<JTableHeader>("JTableHeader.selectedColumn") {
--- a/jdk/src/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Fri Aug 08 11:36:48 2014 -0700
@@ -121,7 +121,7 @@
         try {
             // see if this component has a "getUI" method
             final Class<? extends JComponent> clazz = c.getClass();
-            final Method getUIMethod = clazz.getMethod("getUI", new Class[0]);
+            final Method getUIMethod = clazz.getMethod("getUI", new Class<?>[0]);
 
             // see if that UI is one of ours that understands sizing
             final Object ui = getUIMethod.invoke(c, new Object[0]);
--- a/jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -82,7 +82,8 @@
             @Override
             public Creator run() {
                 try {
-                    final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
+                    final Method getCreatorMethod = CImage.class.getDeclaredMethod(
+                                "getCreator", new Class<?>[] {});
                     getCreatorMethod.setAccessible(true);
                     return (Creator)getCreatorMethod.invoke(null, new Object[] {});
                 } catch (final Exception ignored) {
@@ -383,7 +384,8 @@
                     @Override
                     public Method run() {
                         try {
-                            final Method method = JComponent.class.getDeclaredMethod("getFlag", new Class[] { int.class });
+                            final Method method = JComponent.class.getDeclaredMethod(
+                                    "getFlag", new Class<?>[] { int.class });
                             method.setAccessible(true);
                             return method;
                         } catch (final Throwable ignored) {
--- a/jdk/src/macosx/classes/com/apple/laf/ClientPropertyApplicator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/ClientPropertyApplicator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,6 +33,7 @@
 public class ClientPropertyApplicator<T extends JComponent, N> implements PropertyChangeListener {
     private final Map<String, Property<N>> properties = new HashMap<String, Property<N>>();
 
+    @SuppressWarnings("unchecked")
     public ClientPropertyApplicator(final Property<N>... propertyList) {
         for (final Property<N> p : propertyList) {
             properties.put(p.name, p);
--- a/jdk/src/macosx/classes/com/apple/laf/ScreenMenuBar.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/ScreenMenuBar.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,6 +25,9 @@
 
 package com.apple.laf;
 
+import sun.awt.AWTAccessor;
+import sun.lwawt.macosx.CMenuBar;
+
 import java.awt.*;
 import java.awt.event.*;
 import java.lang.reflect.*;
@@ -243,54 +246,25 @@
             fSubmenus.remove(menu);
     }
 
-    private static Field[] stolenFields = null;
-
-    static {
-        stolenFields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
-            public Field[] run() {
-                try {
-                    final Field[] localFields = new Field[2];
-                    localFields[0] = MenuBar.class.getDeclaredField("menus");
-                    localFields[1] = MenuComponent.class.getDeclaredField("parent");
-                    AccessibleObject.setAccessible(localFields, true);
-                    return localFields;
-                } catch (final NoSuchFieldException nsf) {
-                    // If this happens, Sun changed the definition of MenuBar and MenuComponent!
-                    nsf.printStackTrace(System.err);
-                    return null;
-                }
-            }
-        });
-    };
-
     public Menu add(final Menu m, final int index) {
         synchronized (getTreeLock()) {
             if (m.getParent() != null) {
                 m.getParent().remove(m);
             }
 
-            // Use nasty reflection to get at the menus array and parent fields.
-            try {
-                if (stolenFields == null) return m;
-
-                final Vector<Menu> menus = (Vector<Menu>)stolenFields[0].get(this);
-                    menus.insertElementAt(m, index);
-
-                    stolenFields[1].set(m, this);
+            final Vector<Menu> menus = AWTAccessor.getMenuBarAccessor().getMenus(this);
+            menus.insertElementAt(m, index);
+            AWTAccessor.getMenuComponentAccessor().setParent(m, this);
 
-                    final sun.lwawt.macosx.CMenuBar peer = (sun.lwawt.macosx.CMenuBar)getPeer();
-                if (peer == null) return m;
+            final CMenuBar peer = (CMenuBar)getPeer();
+            if (peer == null) return m;
 
-                        peer.setNextInsertionIndex(index);
-                        if (m.getPeer() == null) {
-                            m.addNotify();
-                        }
-
-                        peer.setNextInsertionIndex(-1);
-            } catch (final IllegalAccessException iae) {
-                iae.printStackTrace(System.err);
+            peer.setNextInsertionIndex(index);
+            if (m.getPeer() == null) {
+                m.addNotify();
             }
 
+            peer.setNextInsertionIndex(-1);
             return m;
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/classes/sun/awt/datatransfer/flavormap.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,76 @@
+#
+# This properties file is used to initialize the default
+# java.awt.datatransfer.SystemFlavorMap. It contains the Mac OS X platform-specific,
+# default mappings between common Mac OS X selection atoms and platform-independent
+# MIME type strings, which will be converted into 
+# java.awt.datatransfer.DataFlavors.
+#
+# The standard format is:
+#
+# <native>=<MIME type>,<MIME type>, ...
+#
+# <native> should be a string identifier that the native platform will
+# recognize as a valid data format. <MIME type> should specify both a MIME
+# primary type and a MIME subtype separated by a '/'. The MIME type may include
+# parameters, where each parameter is a key/value pair separated by '=', and
+# where each parameter to the MIME type is separated by a ';'.
+#
+# Because SystemFlavorMap implements FlavorTable, developers are free to
+# duplicate DataFlavor values and set multiple values for a single native by
+# separating them with ",". If a mapping contains a duplicate key or value,
+# earlier mappings which included this key or value will be preferred.
+#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", and which support the charset parameter, should specify the exact
+# format in which the native platform expects the data. The "charset"
+# parameter specifies the char to byte encoding, the "eoln" parameter
+# specifies the end-of-line marker, and the "terminators" parameter specifies
+# the number of terminating NUL bytes. Note that "eoln" and "terminators"
+# are not standardized MIME type parameters. They are specific to this file
+# format ONLY. They will not appear in any of the DataFlavors returned by the
+# SystemFlavorMap at the Java level.
+#
+# If the "charset" parameter is omitted, or has zero length, the platform
+# default encoding is assumed. If the "eoln" parameter is omitted, or has
+# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
+# or has a value less than zero, zero is assumed.
+#
+# Upon initialization, the data transfer subsystem will record the specified
+# details of the native text format, but the default SystemFlavorMap will
+# present a large set of synthesized DataFlavors which map, in both
+# directions, to the native. After receiving data from the application in one
+# of the synthetic DataFlavors, the data transfer subsystem will transform
+# the data stream into the format specified in this file before passing the
+# transformed stream to the native system.
+#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", but which do not support the charset parameter, will be treated as
+# opaque, 8-bit data. They will not undergo any transformation process, and
+# any "charset", "eoln", or "terminators" parameters specified in this file
+# will be ignored.
+#
+# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
+# text flavors which support the charset parameter.
+
+UTF8_STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
+
+# The COMPOUND_TEXT support for inter-client text transfer is disabled by 
+# default. The reason is that many native applications prefer this format over 
+# other native text formats, but are unable to decode the textual data in this 
+# format properly. This results in java-to-native text transfer failures.
+# To enable the COMPOUND_TEXT support for this JRE installation uncomment 
+# the line below.
+
+# COMPOUND_TEXT=text/plain;charset=x-compound-text;eoln="\n";terminators=0
+
+TEXT=text/plain;eoln="\n";terminators=0
+STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
+FILE_NAME=application/x-java-file-list;class=java.util.List
+text/uri-list=application/x-java-file-list;class=java.util.List
+PNG=image/x-java-image;class=java.awt.Image
+JFIF=image/x-java-image;class=java.awt.Image
+TIFF=image/x-java-image;class=java.awt.Image
+RICH_TEXT=text/rtf
+HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
+URL=application/x-java-url;class=java.net.URL,\
+    text/uri-list;eoln="\r\n";terminators=1
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -88,7 +88,7 @@
         super.startDrag(dsc, cursor, dragImage, dragImageOffset);
     }
 
-    protected void startDrag(Transferable transferable, long[] formats, Map formatMap) {
+    protected void startDrag(Transferable transferable, long[] formats, Map<Long, DataFlavor> formatMap) {
         DragGestureEvent trigger = getTrigger();
         InputEvent         triggerEvent = trigger.getTriggerEvent();
 
@@ -311,7 +311,7 @@
         }
     }
 
-    private void setDefaultDragImage(JList component) {
+    private void setDefaultDragImage(JList<?> component) {
         Rectangle selectedOutline = null;
 
         // This code actually works, even under the (non-existant) multiple-selections, because we only draw a union outline
@@ -485,7 +485,7 @@
     private native long createNativeDragSource(Component component, long nativePeer, Transferable transferable,
         InputEvent triggerEvent, int dragPosX, int dragPosY, int extModifiers, int clickCount, long timestamp,
         long nsDragImagePtr, int dragImageOffsetX, int dragImageOffsetY,
-        int sourceActions, long[] formats, Map formatMap);
+        int sourceActions, long[] formats, Map<Long, DataFlavor> formatMap);
 
     private native void doDragging(long nativeDragSource);
 
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Fri Aug 08 11:36:48 2014 -0700
@@ -44,13 +44,14 @@
 public class CInputMethod extends InputMethodAdapter {
     private InputMethodContext fIMContext;
     private Component fAwtFocussedComponent;
-    private LWComponentPeer fAwtFocussedComponentPeer;
+    private LWComponentPeer<?, ?> fAwtFocussedComponentPeer;
     private boolean isActive;
 
     private static Map<TextAttribute, Integer>[] sHighlightStyles;
 
     // Intitalize highlight mapping table and its mapper.
     static {
+        @SuppressWarnings({"rawtypes", "unchecked"})
         Map<TextAttribute, Integer> styles[] = new Map[4];
         HashMap<TextAttribute, Integer> map;
 
@@ -242,7 +243,7 @@
     public void hideWindows() {
     }
 
-    long getNativeViewPtr(LWComponentPeer peer) {
+    long getNativeViewPtr(LWComponentPeer<?, ?> peer) {
         if (peer.getPlatformWindow() instanceof CPlatformWindow) {
             CPlatformWindow platformWindow = (CPlatformWindow) peer.getPlatformWindow();
             CPlatformView platformView = platformWindow.getContentView();
@@ -272,7 +273,7 @@
      * to talk to when responding to key events.
      */
     protected void setAWTFocussedComponent(Component component) {
-        LWComponentPeer peer = null;
+        LWComponentPeer<?, ?> peer = null;
         long modelPtr = 0;
         CInputMethod imInstance = this;
 
@@ -305,7 +306,7 @@
     /**
         * @see java.awt.Toolkit#mapInputMethodHighlight
      */
-    public static Map mapInputMethodHighlight(InputMethodHighlight highlight) {
+    public static Map<TextAttribute, ?> mapInputMethodHighlight(InputMethodHighlight highlight) {
         int index;
         int state = highlight.getState();
         if (state == InputMethodHighlight.RAW_TEXT) {
@@ -384,7 +385,7 @@
 
     // java.awt.Toolkit#getNativeContainer() is not available
     //    from this package
-    private LWComponentPeer getNearestNativePeer(Component comp) {
+    private LWComponentPeer<?, ?> getNearestNativePeer(Component comp) {
         if (comp==null)
             return null;
 
@@ -796,7 +797,7 @@
     // these calls will be ignored.
     private native void nativeNotifyPeer(long nativePeer, CInputMethod imInstance);
     private native void nativeEndComposition(long nativePeer);
-    private native void nativeHandleEvent(LWComponentPeer peer, AWTEvent event);
+    private native void nativeHandleEvent(LWComponentPeer<?, ?> peer, AWTEvent event);
 
     // Returns the locale of the active input method.
     static native Locale getNativeLocale();
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
     }
 
     static Object[] getAvailableLocalesInternal() {
-        List workList = nativeGetAvailableLocales();
+        List<?> workList = nativeGetAvailableLocales();
 
         if (workList != null) {
             return workList.toArray();
@@ -119,5 +119,5 @@
     }
 
     private static native void nativeInit();
-    private static native List nativeGetAvailableLocales();
+    private static native List<?> nativeGetAvailableLocales();
 }
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Aug 08 11:36:48 2014 -0700
@@ -151,7 +151,7 @@
         return (bits & mask) != 0;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "rawtypes"})
     static ClientPropertyApplicator<JRootPane, CPlatformWindow> CLIENT_PROPERTY_APPLICATOR = new ClientPropertyApplicator<JRootPane, CPlatformWindow>(new Property[] {
         new Property<CPlatformWindow>(WINDOW_DOCUMENT_MODIFIED) { public void applyProperty(final CPlatformWindow c, final Object value) {
             c.setStyleBits(DOCUMENT_MODIFIED, value == null ? false : Boolean.parseBoolean(value.toString()));
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,6 +32,7 @@
 import java.awt.event.InputEvent;
 import java.awt.event.InvocationEvent;
 import java.awt.event.KeyEvent;
+import java.awt.font.TextAttribute;
 import java.awt.im.InputMethodHighlight;
 import java.awt.im.spi.InputMethodDescriptor;
 import java.awt.peer.*;
@@ -543,9 +544,9 @@
             return super.getImage(filename);
         }
 
-        String fileneame2x = getScaledImageName(filename);
-        return (imageExists(fileneame2x))
-                ? getImageWithResolutionVariant(filename, fileneame2x)
+        String filename2x = getScaledImageName(filename);
+        return (imageExists(filename2x))
+                ? getImageWithResolutionVariant(filename, filename2x)
                 : super.getImage(filename);
     }
 
@@ -691,6 +692,7 @@
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
             Class<T> abstractRecognizerClass, DragSource ds, Component c,
             int srcActions, DragGestureListener dgl) {
@@ -743,7 +745,7 @@
      * @since 1.3
      */
     @Override
-    public Map mapInputMethodHighlight(InputMethodHighlight highlight) {
+    public Map<TextAttribute, ?> mapInputMethodHighlight(InputMethodHighlight highlight) {
         return CInputMethod.mapInputMethodHighlight(highlight);
     }
 
@@ -906,6 +908,9 @@
     }
 
     private static boolean isValidPath(String path) {
-        return !path.isEmpty() && !path.endsWith("/") && !path.endsWith(".");
+        return path != null &&
+                !path.isEmpty() &&
+                !path.endsWith("/") &&
+                !path.endsWith(".");
     }
 }
--- a/jdk/src/macosx/lib/flavormap.properties	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-#
-# This properties file is used to initialize the default
-# java.awt.datatransfer.SystemFlavorMap. It contains the Mac OS X platform-specific,
-# default mappings between common Mac OS X selection atoms and platform-independent
-# MIME type strings, which will be converted into
-# java.awt.datatransfer.DataFlavors.
-#
-# These default mappings may be augmented by specifying the
-#
-#       AWT.DnD.flavorMapFileURL 
-#
-# property in the appropriate awt.properties file. The specified properties URL
-# will be loaded into the SystemFlavorMap.
-#
-# The standard format is:
-#
-# <native>=<MIME type>
-#
-# <native> should be a string identifier that the native platform will
-# recognize as a valid data format. <MIME type> should specify both a MIME
-# primary type and a MIME subtype separated by a '/'. The MIME type may include
-# parameters, where each parameter is a key/value pair separated by '=', and
-# where each parameter to the MIME type is separated by a ';'.
-#
-# Because SystemFlavorMap implements FlavorTable, developers are free to
-# duplicate both native keys and DataFlavor values. If a mapping contains a
-# duplicate key or value, earlier mappings which included this key or value
-# will be preferred.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", and which support the charset parameter, should specify the exact
-# format in which the native platform expects the data. The "charset"
-# parameter specifies the char to byte encoding, the "eoln" parameter
-# specifies the end-of-line marker, and the "terminators" parameter specifies
-# the number of terminating NUL bytes. Note that "eoln" and "terminators"
-# are not standardized MIME type parameters. They are specific to this file
-# format ONLY. They will not appear in any of the DataFlavors returned by the
-# SystemFlavorMap at the Java level.
-#
-# If the "charset" parameter is omitted, or has zero length, the platform
-# default encoding is assumed. If the "eoln" parameter is omitted, or has
-# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
-# or has a value less than zero, zero is assumed.
-#
-# Upon initialization, the data transfer subsystem will record the specified
-# details of the native text format, but the default SystemFlavorMap will
-# present a large set of synthesized DataFlavors which map, in both
-# directions, to the native. After receiving data from the application in one
-# of the synthetic DataFlavors, the data transfer subsystem will transform
-# the data stream into the format specified in this file before passing the
-# transformed stream to the native system.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", but which do not support the charset parameter, will be treated as
-# opaque, 8-bit data. They will not undergo any transformation process, and
-# any "charset", "eoln", or "terminators" parameters specified in this file
-# will be ignored.
-#
-# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
-# text flavors which support the charset parameter.
-
-UTF8_STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
-
-# The COMPOUND_TEXT support for inter-client text transfer is disabled by 
-# default. The reason is that many native applications prefer this format over 
-# other native text formats, but are unable to decode the textual data in this 
-# format properly. This results in java-to-native text transfer failures.
-# To enable the COMPOUND_TEXT support for this JRE installation uncomment 
-# the line below.
-
-# COMPOUND_TEXT=text/plain;charset=x-compound-text;eoln="\n";terminators=0
-
-TEXT=text/plain;eoln="\n";terminators=0
-STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
-FILE_NAME=application/x-java-file-list;class=java.util.List
-text/uri-list=application/x-java-file-list;class=java.util.List
-PNG=image/x-java-image;class=java.awt.Image
-JFIF=image/x-java-image;class=java.awt.Image
-TIFF=image/x-java-image;class=java.awt.Image
-RICH_TEXT=text/rtf
-HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
-URL=application/x-java-url;class=java.net.URL
-URL=text/uri-list;eoln="\r\n";terminators=1
--- a/jdk/src/macosx/native/apple/launcher/JavaAppLauncher.m	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 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.
- */
-
-#import "apple_launcher_JavaAppLauncher.h"
-
-#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
-
-/*
- * Class:     apple_launcher_JavaAppLauncher
- * Method:    nativeConvertAndRelease
- * Signature: (J)Ljava/lang/Object;
- */
-JNIEXPORT jobject JNICALL Java_apple_launcher_JavaAppLauncher_nativeConvertAndRelease
-(JNIEnv *env, jclass clazz, jlong nsObjectPtr) {
-
-    jobject value = NULL;
-
-JNF_COCOA_ENTER(env);
-
-    id obj = jlong_to_ptr(nsObjectPtr);
-    value = [[JNFDefaultCoercions defaultCoercer] coerceNSObject:obj withEnv:env];
-    CFRelease(obj);
-
-JNF_COCOA_EXIT(env);
-
-    return value;
-}
-
-/*
- * Class:     apple_launcher_JavaAppLauncher
- * Method:    nativeInvokeNonPublic
- * Signature: (Ljava/lang/Class;Ljava/lang/reflect/Method;[Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_apple_launcher_JavaAppLauncher_nativeInvokeNonPublic
-(JNIEnv *env, jclass clazz, jclass targetClass, jobject targetMethod, jobjectArray args) {
-    jmethodID mainMethodID = (*env)->FromReflectedMethod(env, targetMethod);
-    if ((*env)->ExceptionOccurred(env)) return;
-    (*env)->CallStaticVoidMethod(env, targetClass, mainMethodID, args);
-}
--- a/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	Fri Aug 08 11:36:48 2014 -0700
@@ -45,6 +45,7 @@
 #include <dlfcn.h>
 
 #include <sizecalc.h>
+#import "ThreadUtilities.h"
 
 static NSScreen* SplashNSScreen()
 {
@@ -130,8 +131,12 @@
     NSAutoreleasePool *pool = [NSAutoreleasePool new];
     *scaleFactor = 1;
     char* scaledFile = nil;
-    float screenScaleFactor = [SplashNSScreen() backingScaleFactor];
-    
+    __block float screenScaleFactor = 1;
+
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+        screenScaleFactor = [SplashNSScreen() backingScaleFactor];
+    }];
+
     if (screenScaleFactor > 1) {
         NSString *fileName = [NSString stringWithUTF8String: file];
         NSUInteger length = [fileName length];
--- a/jdk/src/share/bin/java.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/bin/java.c	Fri Aug 08 11:36:48 2014 -0700
@@ -98,6 +98,7 @@
  */
 static void SetClassPath(const char *s);
 static void SelectVersion(int argc, char **argv, char **main_class);
+static void SetJvmEnvironment(int argc, char **argv);
 static jboolean ParseArguments(int *pargc, char ***pargv,
                                int *pmode, char **pwhat,
                                int *pret, const char *jrepath);
@@ -238,6 +239,10 @@
                                jvmpath, sizeof(jvmpath),
                                jvmcfg,  sizeof(jvmcfg));
 
+    if (!IsJavaArgs()) {
+        SetJvmEnvironment(argc,argv);
+    }
+
     ifn.CreateJavaVM = 0;
     ifn.GetDefaultJavaVMInitArgs = 0;
 
@@ -640,6 +645,67 @@
     return jvmtype;
 }
 
+/*
+ * static void SetJvmEnvironment(int argc, char **argv);
+ *   Is called just before the JVM is loaded.  We can set env variables
+ *   that are consumed by the JVM.  This function is non-destructive,
+ *   leaving the arg list intact.  The first use is for the JVM flag
+ *   -XX:NativeMemoryTracking=value.
+ */
+static void
+SetJvmEnvironment(int argc, char **argv) {
+
+    static const char*  NMT_Env_Name    = "NMT_LEVEL_";
+
+    int i;
+    for (i = 0; i < argc; i++) {
+        /*
+         * The following case checks for "-XX:NativeMemoryTracking=value".
+         * If value is non null, an environmental variable set to this value
+         * will be created to be used by the JVM.
+         * The argument is passed to the JVM, which will check validity.
+         * The JVM is responsible for removing the env variable.
+         */
+        char *arg = argv[i];
+        if (JLI_StrCCmp(arg, "-XX:NativeMemoryTracking=") == 0) {
+            int retval;
+            // get what follows this parameter, include "="
+            size_t pnlen = JLI_StrLen("-XX:NativeMemoryTracking=");
+            if (JLI_StrLen(arg) > pnlen) {
+                char* value = arg + pnlen;
+                size_t pbuflen = pnlen + JLI_StrLen(value) + 10; // 10 max pid digits
+
+                /*
+                 * ensures that malloc successful
+                 * DONT JLI_MemFree() pbuf.  JLI_PutEnv() uses system call
+                 *   that could store the address.
+                 */
+                char * pbuf = (char*)JLI_MemAlloc(pbuflen);
+
+                JLI_Snprintf(pbuf, pbuflen, "%s%d=%s", NMT_Env_Name, JLI_GetPid(), value);
+                retval = JLI_PutEnv(pbuf);
+                if (JLI_IsTraceLauncher()) {
+                    char* envName;
+                    char* envBuf;
+
+                    // ensures that malloc successful
+                    envName = (char*)JLI_MemAlloc(pbuflen);
+                    JLI_Snprintf(envName, pbuflen, "%s%d", NMT_Env_Name, JLI_GetPid());
+
+                    printf("TRACER_MARKER: NativeMemoryTracking: env var is %s\n",envName);
+                    printf("TRACER_MARKER: NativeMemoryTracking: putenv arg %s\n",pbuf);
+                    envBuf = getenv(envName);
+                    printf("TRACER_MARKER: NativeMemoryTracking: got value %s\n",envBuf);
+                    free(envName);
+                }
+
+            }
+
+        }
+
+    }
+}
+
 /* copied from HotSpot function "atomll()" */
 static int
 parse_size(const char *s, jlong *result) {
--- a/jdk/src/share/bin/jli_util.h	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/bin/jli_util.h	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -64,17 +64,22 @@
 #ifdef _WIN32
 #include <windows.h>
 #include <io.h>
+#include <process.h>
 #define JLI_StrCaseCmp(p1, p2)          stricmp((p1), (p2))
 #define JLI_StrNCaseCmp(p1, p2, p3)     strnicmp((p1), (p2), (p3))
 int  JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
 void JLI_CmdToArgs(char *cmdline);
 #define JLI_Lseek                       _lseeki64
+#define JLI_PutEnv                      _putenv
+#define JLI_GetPid                      _getpid
 #else  /* NIXES */
 #include <unistd.h>
 #include <strings.h>
 #define JLI_StrCaseCmp(p1, p2)          strcasecmp((p1), (p2))
 #define JLI_StrNCaseCmp(p1, p2, p3)     strncasecmp((p1), (p2), (p3))
 #define JLI_Snprintf                    snprintf
+#define JLI_PutEnv                      putenv
+#define JLI_GetPid                      getpid
 #ifdef __solaris__
 #define JLI_Lseek                       llseek
 #endif
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java	Fri Aug 08 11:36:48 2014 -0700
@@ -126,18 +126,18 @@
             new IIOMetadataNode(nativeMetadataFormatName);
 
         addChildNode(root, "BMPVersion", bmpVersion);
-        addChildNode(root, "Width", new Integer(width));
-        addChildNode(root, "Height", new Integer(height));
+        addChildNode(root, "Width", width);
+        addChildNode(root, "Height", height);
         addChildNode(root, "BitsPerPixel", new Short(bitsPerPixel));
-        addChildNode(root, "Compression", new Integer(compression));
-        addChildNode(root, "ImageSize", new Integer(imageSize));
+        addChildNode(root, "Compression", compression);
+        addChildNode(root, "ImageSize", imageSize);
 
         IIOMetadataNode node = addChildNode(root, "PixelsPerMeter", null);
-        addChildNode(node, "X", new Integer(xPixelsPerMeter));
-        addChildNode(node, "Y", new Integer(yPixelsPerMeter));
+        addChildNode(node, "X", xPixelsPerMeter);
+        addChildNode(node, "Y", yPixelsPerMeter);
 
-        addChildNode(root, "ColorsUsed", new Integer(colorsUsed));
-        addChildNode(root, "ColorsImportant", new Integer(colorsImportant));
+        addChildNode(root, "ColorsUsed", colorsUsed);
+        addChildNode(root, "ColorsImportant", colorsImportant);
 
         int version = 0;
         for (int i = 0; i < bmpVersion.length(); i++)
@@ -146,19 +146,19 @@
 
         if (version >= 4) {
             node = addChildNode(root, "Mask", null);
-            addChildNode(node, "Red", new Integer(redMask));
-            addChildNode(node, "Green", new Integer(greenMask));
-            addChildNode(node, "Blue", new Integer(blueMask));
-            addChildNode(node, "Alpha", new Integer(alphaMask));
+            addChildNode(node, "Red", redMask);
+            addChildNode(node, "Green", greenMask);
+            addChildNode(node, "Blue", blueMask);
+            addChildNode(node, "Alpha", alphaMask);
 
-            addChildNode(root, "ColorSpaceType", new Integer(colorSpace));
+            addChildNode(root, "ColorSpaceType", colorSpace);
 
             node = addChildNode(root, "CIEXYZEndPoints", null);
             addXYZPoints(node, "Red", redX, redY, redZ);
             addXYZPoints(node, "Green", greenX, greenY, greenZ);
             addXYZPoints(node, "Blue", blueX, blueY, blueZ);
 
-            node = addChildNode(root, "Intent", new Integer(intent));
+            node = addChildNode(root, "Intent", intent);
         }
 
         // Palette
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2323,7 +2323,7 @@
                 SOSMarkerSegment sos = (SOSMarkerSegment) seg;
                 SOSMarkerSegment.ScanComponentSpec [] specs = sos.componentSpecs;
                 for (int i = 0; i < specs.length; i++) {
-                    Integer id = new Integer(specs[i].componentSelector);
+                    Integer id = specs[i].componentSelector;
                     if (!ids.contains(id)) {
                         ids.add(id);
                     }
--- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -639,7 +639,7 @@
         metadata.zTXt_keyword.add(keyword);
 
         int method = stream.readUnsignedByte();
-        metadata.zTXt_compressionMethod.add(new Integer(method));
+        metadata.zTXt_compressionMethod.add(method);
 
         byte[] b = new byte[chunkLength - keyword.length() - 2];
         stream.readFully(b);
--- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1254,8 +1254,11 @@
             if (name.equals("IHDR")) {
                 IHDR_width = getIntAttribute(node, "width");
                 IHDR_height = getIntAttribute(node, "height");
-                IHDR_bitDepth = getEnumeratedAttribute(node, "bitDepth",
-                                                       IHDR_bitDepths);
+                IHDR_bitDepth =
+                        Integer.valueOf(IHDR_bitDepths[
+                                getEnumeratedAttribute(node,
+                                                    "bitDepth",
+                                                    IHDR_bitDepths)]);
                 IHDR_colorType = getEnumeratedAttribute(node, "colorType",
                                                         IHDR_colorTypeNames);
                 IHDR_compressionMethod =
@@ -1644,7 +1647,7 @@
                     int compressionMethod =
                         getEnumeratedAttribute(zTXt_node, "compressionMethod",
                                                zTXt_compressionMethodNames);
-                    zTXt_compressionMethod.add(new Integer(compressionMethod));
+                    zTXt_compressionMethod.add(compressionMethod);
 
                     String text = getAttribute(zTXt_node, "text");
                     zTXt_text.add(text);
--- a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java	Fri Aug 08 11:36:48 2014 -0700
@@ -75,9 +75,9 @@
         IIOMetadataNode root =
             new IIOMetadataNode(nativeMetadataFormatName);
 
-        addChildNode(root, "WBMPType", new Integer(wbmpType));
-        addChildNode(root, "Width", new Integer(width));
-        addChildNode(root, "Height", new Integer(height));
+        addChildNode(root, "WBMPType", wbmpType);
+        addChildNode(root, "Width", width);
+        addChildNode(root, "Height", height);
 
         return root;
     }
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -812,12 +812,12 @@
 
             "OptionPane.setButtonMargin", Boolean.FALSE,
             "OptionPane.sameSizeButtons", Boolean.TRUE,
-            "OptionPane.buttonOrientation", new Integer(SwingConstants.RIGHT),
+            "OptionPane.buttonOrientation", SwingConstants.RIGHT,
             "OptionPane.minimumSize", new DimensionUIResource(262, 90),
-            "OptionPane.buttonPadding", new Integer(10),
+            "OptionPane.buttonPadding", 10,
             "OptionPane.windowBindings", new Object[] {
                 "ESCAPE", "close" },
-            "OptionPane.buttonClickThreshhold", new Integer(500),
+            "OptionPane.buttonClickThreshhold", 500,
             "OptionPane.isYesLast", Boolean.TRUE,
             "OptionPane.font", new FontLazyValue(Region.OPTION_PANE),
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -567,7 +567,7 @@
             "ProgressBar.selectionForeground", table.get("control"),
             "ProgressBar.selectionBackground", table.get("controlText"),
             "ProgressBar.border", loweredBevelBorder,
-            "ProgressBar.cellLength", new Integer(6),
+            "ProgressBar.cellLength", 6,
             "ProgressBar.cellSpacing", Integer.valueOf(0),
 
             // Buttons
@@ -582,7 +582,7 @@
                  "released SPACE", "released"
               }),
 
-            "CheckBox.textIconGap", new Integer(8),
+            "CheckBox.textIconGap", 8,
             "CheckBox.margin", new InsetsUIResource(4, 2, 4, 2),
             "CheckBox.icon", checkBoxIcon,
             "CheckBox.focus", table.get("activeCaptionBorder"),
@@ -593,7 +593,7 @@
                  }),
 
             "RadioButton.margin", new InsetsUIResource(4, 2, 4, 2),
-            "RadioButton.textIconGap", new Integer(8),
+            "RadioButton.textIconGap", 8,
             "RadioButton.background", table.get("control"),
             "RadioButton.foreground", table.get("controlText"),
             "RadioButton.icon", radioButtonIcon,
@@ -627,10 +627,10 @@
             "Menu.selectionBackground", menuItemPressedBackground,
             "Menu.checkIcon", menuItemCheckIcon,
             "Menu.arrowIcon", menuArrowIcon,
-            "Menu.menuPopupOffsetX", new Integer(0),
-            "Menu.menuPopupOffsetY", new Integer(0),
-            "Menu.submenuPopupOffsetX", new Integer(-2),
-            "Menu.submenuPopupOffsetY", new Integer(3),
+            "Menu.menuPopupOffsetX", 0,
+            "Menu.menuPopupOffsetY", 0,
+            "Menu.submenuPopupOffsetX", -2,
+            "Menu.submenuPopupOffsetY", 3,
             "Menu.shortcutKeys", new int[]{
                 SwingUtilities2.getSystemMnemonicKeyMask(),
                 KeyEvent.META_MASK
@@ -938,7 +938,7 @@
             "Tree.collapsedIcon", treeCollapsedIcon,
             "Tree.editorBorder", focusBorder,
             "Tree.editorBorderSelectionColor", table.get("activeCaptionBorder"),
-            "Tree.rowHeight", new Integer(18),
+            "Tree.rowHeight", 18,
             "Tree.drawsFocusBorderAroundIcon", Boolean.TRUE,
             "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
                                 "COPY", "copy",
--- a/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1145,7 +1145,7 @@
 
         // Never destroy an orb in CNCtx.
         // The orb we have is either the shared/default orb, or one passed in to a constructor
-        // from elsewhere, so that orb is somebody else's reponsibility.
+        // from elsewhere, so that orb is somebody else's responsibility.
     }
 
     protected void finalize() {
--- a/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Fri Aug 08 11:36:48 2014 -0700
@@ -376,7 +376,7 @@
 
 
     /**
-     * Tries to retreive an UDP packet matching the given xid
+     * Tries to retrieve a UDP packet matching the given xid
      * received within the timeout.
      * If a packet with different xid is received, the received packet
      * is enqueued with the corresponding xid in 'resps'.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java	Fri Aug 08 11:36:48 2014 -0700
@@ -137,7 +137,7 @@
         limit = (entries == null) ? 0 : entries.size(); // handle empty set
         posn = 0; // reset
 
-        // mimimize the number of calls to processReturnCode()
+        // minimize the number of calls to processReturnCode()
         // (expensive when batchSize is small and there are many results)
         if ((res.status != LdapClient.LDAP_SUCCESS) ||
             ((res.status == LdapClient.LDAP_SUCCESS) &&
--- a/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java	Fri Aug 08 11:36:48 2014 -0700
@@ -196,7 +196,7 @@
                 System.out.println("ClientId received an exception");
                 e.printStackTrace();
             }
-            // Failed to invoke the comparator; flag unequality
+            // Failed to invoke the comparator; flag inequality
             return false;
         }
         if (((Integer) ret) == 0) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/EventQueue.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/EventQueue.java	Fri Aug 08 11:36:48 2014 -0700
@@ -75,7 +75,7 @@
      * Enqueue an event.
      * @param event Either a <tt>NamingExceptionEvent</tt> or a subclass
      *              of <tt>NamingEvent</tt> or
-     * <tt>UnsolicitedNotificatoniEvent</tt>.
+     * <tt>UnsolicitedNotificationEvent</tt>.
      * If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement
      * the corresponding subinterface of <tt>NamingListener</tt>.
      * For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em>
@@ -141,7 +141,7 @@
                     // it is interested in. (No need to check mask or
                     // instanceof subinterfaces.)
                     // It is the responsibility of the enqueuer to
-                    // only enqueue events with listseners of the correct type.
+                    // only enqueue events with listeners of the correct type.
 
                     if (e instanceof NamingEvent) {
                         ((NamingEvent)e).dispatch(v.elementAt(i));
--- a/jdk/src/share/classes/com/sun/jndi/ldap/EventSupport.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/EventSupport.java	Fri Aug 08 11:36:48 2014 -0700
@@ -83,7 +83,7 @@
  *a new notifier is created for the listener.
  *
  *<h4>Deregistration</h4>
- *When a deregistration request is made, this class attemps to find its
+ *When a deregistration request is made, this class attempts to find its
  *corresponding notifier. If the notifier is found, the listener is removed
  *from the notifier's list. If the listener is the last listener on the list,
  *the notifier's thread is terminated and removed from this class's hashtable.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,7 @@
 /**
   * This subclass is used by LDAP to implement the schema calls.
   * Basically, it keeps track of which context it is an attribute of
-  * so it can get the schema for that cotnext.
+  * so it can get the schema for that context.
   *
   * @author Jon Ruiz
   */
@@ -134,7 +134,7 @@
         // setup internal state
         this.setBaseCtxInfo();
 
-        // let the ObjectOutpurStream do the real work of serialization
+        // let the ObjectOutputStream do the real work of serialization
         out.defaultWriteObject();
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1651,7 +1651,7 @@
      *
      * This function is called regardless of the server's version, since
      * an administrator may have setup the server to support client schema
-     * queries. If this function trys a serarch on a v2 server that
+     * queries. If this function tries a search on a v2 server that
      * doesn't support schema, one of these two things will happen:
      * 1) It will get an exception when querying the root DSE
      * 2) It will not find a subschemasubentry on the root DSE
@@ -2016,7 +2016,7 @@
      *    - the returning attributes list is present but empty
      */
 
-    // returns true if a search can be caried out as a compare, and sets
+    // returns true if a search can be carried out as a compare, and sets
     // tokens[0] and tokens[1] to the type and value respectively.
     // e.g. filter "cn=Jon Ruiz" becomes, type "cn" and value "Jon Ruiz"
     // This function uses the documents JNDI Compare example as a model
@@ -2083,7 +2083,7 @@
             return false; // unbalanced
         }
 
-        // make sure the left and right half are not expresions themselves
+        // make sure the left and right half are not expressions themselves
         StringTokenizer illegalCharsTokenizer =
             new StringTokenizer(tokens[0], "()&|!=~><*", true);
 
@@ -2443,7 +2443,7 @@
     }
 
     /**
-     * Set whether aliases are derefereced during resolution and searches.
+     * Set whether aliases are dereferenced during resolution and searches.
      */
     private void setDerefAliases(String deref) {
         if (deref != null) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -346,8 +346,8 @@
     }
 
     /**
-     * Given an attribute value formated according to RFC 2253,
-     * returns the unformated value.  Returns a string value as
+     * Given an attribute value formatted according to RFC 2253,
+     * returns the unformatted value.  Returns a string value as
      * a string, and a binary value as a byte array.
      */
     public static Object unescapeAttributeValue(String val) {
@@ -687,7 +687,7 @@
         private final boolean binary;
         private final boolean valueCaseSensitive;
 
-        // If non-null, a canonical represention of the value suitable
+        // If non-null, a canonical representation of the value suitable
         // for comparison using String.compareTo().
         private String comparable = null;
 
@@ -842,8 +842,8 @@
         }
 
         /*
-         * Given an attribute value formated according to RFC 2253,
-         * returns the unformated value.  Escapes and quotes are
+         * Given an attribute value formatted according to RFC 2253,
+         * returns the unformatted value.  Escapes and quotes are
          * stripped away, and hex-encoded UTF-8 is converted to 16-bit
          * Unicode chars.  Returns a string value as a String, and a
          * binary value as a byte array.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapReferralContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapReferralContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -679,7 +679,7 @@
 
         } catch (LdapReferralException e) {
 
-            // %%% VR - setNameResolved(true);
+            // %%% setNameResolved(true);
 
             // append (referrals from) the exception that generated this
             // context to the new exception, so that referral processing
@@ -897,7 +897,7 @@
 
     /*
      * Use the attributes and scope components from the LDAP URL (if present)
-     * to override the corrpesonding components supplied in SearchControls.
+     * to override the corresponding components supplied in SearchControls.
      */
     private SearchControls overrideAttributesAndScope(SearchControls cons) {
         SearchControls urlCons;
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
         cancelled = true;
 
         // Unblock reader of pending request
-        // Should only ever have atmost one waiter
+        // Should only ever have at most one waiter
         notify();
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Fri Aug 08 11:36:48 2014 -0700
@@ -84,7 +84,7 @@
     // Object Class specific IDs
     private static final String    ABSTRACT_ID = "ABSTRACT";
     private static final String  STRUCTURAL_ID = "STRUCTURAL";
-    private static final String    AUXILARY_ID = "AUXILIARY";
+    private static final String   AUXILIARY_ID = "AUXILIARY";
     private static final String        MUST_ID = "MUST";
     private static final String         MAY_ID = "MAY";
 
@@ -300,8 +300,8 @@
         return new Object[] {currentName, attrs};
     }
 
-    // returns the index of the first whitespace char of a linear whitspace
-    // sequince ending at the given position.
+    // returns the index of the first whitespace char of a linear whitespace
+    // sequence ending at the given position.
     final private static int findTrailingWhitespace(String string, int pos) {
         for(int i = pos; i > 0; i--) {
             if(string.charAt(i) != WHSP) {
@@ -423,7 +423,7 @@
         if (tag.equals(OBSOLETE_ID) ||
             tag.equals(ABSTRACT_ID) ||
             tag.equals(STRUCTURAL_ID) ||
-            tag.equals(AUXILARY_ID) ||
+            tag.equals(AUXILIARY_ID) ||
             tag.equals(SINGLE_VAL_ID) ||
             tag.equals(COLLECTIVE_ID) ||
             tag.equals(NO_USER_MOD_ID)) {
@@ -819,7 +819,7 @@
             count++;
         }
 
-        attr = attrs.get(AUXILARY_ID);
+        attr = attrs.get(AUXILIARY_ID);
         if (attr != null) {
             objectDesc.append(writeBoolean(attr));
             count++;
@@ -856,7 +856,7 @@
                     attrId.equals(MUST_ID) ||
                     attrId.equals(STRUCTURAL_ID) ||
                     attrId.equals(DESC_ID) ||
-                    attrId.equals(AUXILARY_ID) ||
+                    attrId.equals(AUXILIARY_ID) ||
                     attrId.equals(ABSTRACT_ID) ||
                     attrId.equals(OBSOLETE_ID)) {
                     continue;
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	Fri Aug 08 11:36:48 2014 -0700
@@ -156,7 +156,7 @@
             String[] reqAttrs;
             if ((reqAttrs = searchArgs.reqAttrs) != null) {
                 // create an attribute set for those requested
-                Attributes rattrs = new BasicAttributes(true); // caseignore
+                Attributes rattrs = new BasicAttributes(true); // ignore case
                 for (int i = 0; i < reqAttrs.length; i++) {
                     rattrs.put(reqAttrs[i], null);
                 }
@@ -213,8 +213,6 @@
         // Update search-specific variables
         LdapSearchEnumeration se = (LdapSearchEnumeration)ne;
         startName = se.startName;
-//VR - keep original args, don't overwite with current args
-//      searchArgs = se.searchArgs;
     }
 
     void setStartName(Name nm) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java	Fri Aug 08 11:36:48 2014 -0700
@@ -162,7 +162,7 @@
     }
 
     /**
-     * Derermines whether an LDAP URL has query components.
+     * Determines whether an LDAP URL has query components.
      */
     public static boolean hasQueryComponents(String url) {
         return (url.lastIndexOf('?') != -1);
--- a/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
      *
      * @param dn A string distinguished name (RFC 2253).
      * @return A domain name or null if none can be derived.
-     * @throw InvalidNameException If the distinugished name is invalid.
+     * @throw InvalidNameException If the distinguished name is invalid.
      */
     static String mapDnToDomainName(String dn) throws InvalidNameException {
         if (dn == null) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,32 +25,77 @@
 
 package com.sun.jndi.ldap;
 
+import sun.misc.SharedSecrets;
+
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
-abstract class VersionHelper {
+public final class VersionHelper {
+
+    private static final VersionHelper helper = new VersionHelper();
 
-    private static final VersionHelper helper = new VersionHelper12();
+    /**
+     * Determines whether classes may be loaded from an arbitrary URL code base.
+     */
+    private static final boolean trustURLCodebase;
 
-    VersionHelper() {} // Disallow anyone from creating one of these.
+    static {
+        // System property to control whether classes may be loaded from an
+        // arbitrary URL code base
+        PrivilegedAction<String> act =
+                () -> System.getProperty("com.sun.jndi.ldap.object.trustURLCodebase", "false");
+        String trust = AccessController.doPrivileged(act);
+        trustURLCodebase = "true".equalsIgnoreCase(trust);
+    }
+
+    private VersionHelper() { }
 
     static VersionHelper getVersionHelper() {
         return helper;
     }
 
-    abstract ClassLoader getURLClassLoader(String[] url)
-        throws MalformedURLException;
+    ClassLoader getURLClassLoader(String[] url) throws MalformedURLException {
+        ClassLoader parent = getContextClassLoader();
+        /*
+         * Classes may only be loaded from an arbitrary URL code base when
+         * the system property com.sun.jndi.ldap.object.trustURLCodebase
+         * has been set to "true".
+         */
+        if (url != null && trustURLCodebase) {
+            return URLClassLoader.newInstance(getUrlArray(url), parent);
+        } else {
+            return parent;
+        }
+    }
 
+    Class<?> loadClass(String className) throws ClassNotFoundException {
+        return Class.forName(className, true, getContextClassLoader());
+    }
 
-    static protected URL[] getUrlArray(String[] url) throws MalformedURLException {
+    Thread createThread(Runnable r) {
+        AccessControlContext acc = AccessController.getContext();
+        // 4290486: doPrivileged is needed to create a thread in
+        // an environment that restricts "modifyThreadGroup".
+        PrivilegedAction<Thread> act =
+                () -> SharedSecrets.getJavaLangAccess().newThreadWithAcc(r, acc);
+        return AccessController.doPrivileged(act);
+    }
+
+    private ClassLoader getContextClassLoader() {
+        PrivilegedAction<ClassLoader> act =
+                Thread.currentThread()::getContextClassLoader;
+        return AccessController.doPrivileged(act);
+    }
+
+    private static URL[] getUrlArray(String[] url) throws MalformedURLException {
         URL[] urlArray = new URL[url.length];
         for (int i = 0; i < urlArray.length; i++) {
             urlArray[i] = new URL(url[i]);
         }
         return urlArray;
     }
-
-    abstract Class<?> loadClass(String className) throws ClassNotFoundException;
-
-    abstract Thread createThread(Runnable r);
 }
--- a/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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 com.sun.jndi.ldap;
-
-import java.net.URLClassLoader;
-import java.net.MalformedURLException;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import sun.misc.SharedSecrets;
-
-final class VersionHelper12 extends VersionHelper {
-
-    // System property to control whether classes may be loaded from an
-    // arbitrary URL code base.
-    private static final String TRUST_URL_CODEBASE_PROPERTY =
-        "com.sun.jndi.ldap.object.trustURLCodebase";
-
-    // Determine whether classes may be loaded from an arbitrary URL code base.
-    private static final String trustURLCodebase =
-        AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
-                public String run() {
-                    return System.getProperty(TRUST_URL_CODEBASE_PROPERTY,
-                            "false");
-                }
-            }
-        );
-
-    VersionHelper12() {} // Disallow external from creating one of these.
-
-    ClassLoader getURLClassLoader(String[] url)
-        throws MalformedURLException {
-            ClassLoader parent = getContextClassLoader();
-            /*
-             * Classes may only be loaded from an arbitrary URL code base when
-             * the system property com.sun.jndi.ldap.object.trustURLCodebase
-             * has been set to "true".
-             */
-            if (url != null && "true".equalsIgnoreCase(trustURLCodebase)) {
-                return URLClassLoader.newInstance(getUrlArray(url), parent);
-            } else {
-                return parent;
-            }
-    }
-
-    Class<?> loadClass(String className) throws ClassNotFoundException {
-        ClassLoader cl = getContextClassLoader();
-        return Class.forName(className, true, cl);
-    }
-
-    private ClassLoader getContextClassLoader() {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<ClassLoader>() {
-                public ClassLoader run() {
-                    return Thread.currentThread().getContextClassLoader();
-                }
-            }
-        );
-    }
-
-    Thread createThread(final Runnable r) {
-        final AccessControlContext acc = AccessController.getContext();
-        // 4290486: doPrivileged is needed to create a thread in
-        // an environment that restricts "modifyThreadGroup".
-        return AccessController.doPrivileged(
-                new PrivilegedAction<Thread>() {
-                    public Thread run() {
-                        return SharedSecrets.getJavaLangAccess()
-                                .newThreadWithAcc(r, acc);
-                    }
-                }
-        );
-    }
-}
--- a/jdk/src/share/classes/com/sun/jndi/ldap/pool/Connections.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/pool/Connections.java	Fri Aug 08 11:36:48 2014 -0700
@@ -254,7 +254,7 @@
     /**
      * Removes PooledConnection from list of connections.
      * The closing of the connection is separate from this method.
-     * This method is called usually when the caller encouters an error
+     * This method is called usually when the caller encounters an error
      * when using the connection and wants it removed from the pool.
      *
      * @return true if conn removed; false if it was not in pool
--- a/jdk/src/share/classes/com/sun/jndi/ldap/pool/Pool.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/pool/Pool.java	Fri Aug 08 11:36:48 2014 -0700
@@ -68,8 +68,8 @@
  * whenever a pooled connection is requested or a call to remove the expired
  * connections is made. The monitoring is done regularly when idle connection
  * timeout is set as the PoolCleaner removes expired connections periodically.
- * As determined by the experiements, cleanup of resources using the
- * ReferenceQueue mechanism is reliable and has immidiate effect than the
+ * As determined by experimentation, cleanup of resources using the
+ * ReferenceQueue mechanism is reliable and has more immediate effect than the
  * finalizer approach.
  *
  * @author Rosanna Lee
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/corba/CorbaUtils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/corba/CorbaUtils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,6 @@
       * Returns the CORBA object reference associated with a Remote
       * object by using the javax.rmi.CORBA package.
       *<p>
-      * Use reflection to avoid hard dependencies on javax.rmi.CORBA package.
       * This method effective does the following:
       *<blockquote><pre>
       * java.lang.Object stub;
@@ -166,6 +165,7 @@
 
         // Get Applet from environment
         if (env != null) {
+            @SuppressWarnings("deprecation")
             Applet applet = (Applet) env.get(Context.APPLET);
             if (applet != null) {
             // Create ORBs using applet and orbProp
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -96,7 +96,7 @@
       * Resolves the nns for 'name' when the named context is acting
       * as an intermediate context.
       *
-      * For a system that supports junctions, this would be equilvalent to
+      * For a system that supports junctions, this would be equivalent to
       *         a_lookup(name, cont);
       * because for junctions, an intermediate slash simply signifies
       * a syntactic separator.
@@ -487,7 +487,7 @@
                 resolve_to_nns_and_continue(name, cont);
                 return null;
             } else {
-                // use COmponentContext
+                // use ComponentContext
                 return super.c_getNameParser_nns(name, cont);
             }
         }
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/ComponentContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/ComponentContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -137,7 +137,7 @@
       * as an intermediate context.
       *
       * For a system that supports only junctions, this would be
-      * equilvalent to
+      * equivalent to
       *         c_lookup(name, cont);
       * because for junctions, an intermediate slash simply signifies
       * a syntactic separator.
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java	Fri Aug 08 11:36:48 2014 -0700
@@ -172,7 +172,7 @@
      *
      * This method is typically called by _nns methods that have been
      * given a name to process. It might process part of that name but
-     * encountered some error. Consequenetly, it would call setErrorNNS()
+     * encountered some error. Consequently, it would call setErrorNNS()
      * with the remaining name. Since the _nns method was expected to
      * operate upon the "nns" of the original name, the remaining name
      * must include the "nns". That's why this method adds a trailing "/".
@@ -219,7 +219,7 @@
      *
      * This method is typically called by methods that have been
      * given a name to process. It might process part of that name but
-     * encountered some error. Consequenetly, it would call setError()
+     * encountered some error. Consequently, it would call setError()
      * with the resolved object and the remaining name.
      *<p>
      * After this method is called, isContinuing() returns false.
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -182,14 +182,14 @@
 
         if (!currentReturned) {
             // returning parent
-            if(debug) {System.out.println("getNextDescedant: simple case");}
+            if(debug) {System.out.println("getNextDescendant: simple case");}
 
             currentReturned = true;
             return currentChild;
 
         } else if (currentChildExpanded && currentChildEnum.hasMore()) {
 
-            if(debug) {System.out.println("getNextDescedant: expanded case");}
+            if(debug) {System.out.println("getNextDescendant: expanded case");}
 
             // if the current child is expanded, use it's enumerator
             return currentChildEnum.next();
@@ -197,7 +197,7 @@
         } else {
 
             // Ready to go onto next child
-            if(debug) {System.out.println("getNextDescedant: next case");}
+            if(debug) {System.out.println("getNextDescendant: next case");}
 
             prepNextChild();
             return getNextDescendant();
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Fri Aug 08 11:36:48 2014 -0700
@@ -881,8 +881,8 @@
     }
 }
 
-    // CompundNames's HashCode() method isn't good enough for many string.
-    // The only prupose of this subclass is to have a more discerning
+    // CompoundNames's HashCode() method isn't good enough for many strings.
+    // The only purpose of this subclass is to have a more discerning
     // hash function. We'll make up for the performance hit by caching
     // the hash value.
 
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -152,7 +152,7 @@
                         } else if (useFactory) {
                             try {
                                 // Give name only if context non-null,
-                                // otherewise, name will be interpreted relative
+                                // otherwise, name will be interpreted relative
                                 // to initial context (not what we want)
                                 Name nm = (context != null ?
                                     new CompositeName(next.getName()) : null);
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -256,7 +256,7 @@
     static final int LESS_MATCH = 4;
 
     /**
-     * A class for dealing wtih atomic filters
+     * A class for dealing with atomic filters
      */
     final class AtomicFilter implements StringFilter {
         private String attrID;
@@ -369,7 +369,7 @@
                     }
                     break;
                 default:
-                    if (debug) {System.out.println("AtomicFilter: unkown " +
+                    if (debug) {System.out.println("AtomicFilter: unknown " +
                                                    "matchType");}
                 }
             }
@@ -434,7 +434,7 @@
 
 
     /**
-      * Creates an LDAP filter as a conjuction of the attributes supplied.
+      * Creates an LDAP filter as a conjunction of the attributes supplied.
       */
     public static String format(Attributes attrs) throws NamingException {
         if (attrs == null || attrs.size() == 0) {
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -168,7 +168,7 @@
             }
         }
 
-        // else 0 or 1 iniitial slashes; start is unchanged
+        // else 0 or 1 initial slashes; start is unchanged
         return url.substring(0, start);
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/url/ldap/ldapURLContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/jndi/url/ldap/ldapURLContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -562,7 +562,7 @@
     }
 
     // Search using the LDAP URL in name.
-    // LDAP URL query components override the search argments.
+    // LDAP URL query components override the search arguments.
     private NamingEnumeration<SearchResult> searchUsingURL(String name)
         throws NamingException {
 
--- a/jdk/src/share/classes/com/sun/management/GcInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/management/GcInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -267,7 +267,7 @@
         return cdata.toString();
     }
 
-    public Collection values() {
+    public Collection<?> values() {
         return cdata.values();
     }
 
--- a/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,8 +28,6 @@
 import java.io.InputStream;
 import java.io.IOException;
 import java.lang.ref.WeakReference;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
@@ -126,52 +124,6 @@
     private static final WeakReference<Object> NO_FACTORY =
             new WeakReference<>(null);
 
-    /**
-     * A class to allow JNDI properties be specified as applet parameters
-     * without creating a static dependency on java.applet.
-     */
-    private static class AppletParameter {
-        private static final Class<?> clazz = getClass("java.applet.Applet");
-        private static final Method getMethod =
-            getMethod(clazz, "getParameter", String.class);
-        private static Class<?> getClass(String name) {
-            try {
-                return Class.forName(name, true, null);
-            } catch (ClassNotFoundException e) {
-                return null;
-            }
-        }
-        private static Method getMethod(Class<?> clazz,
-                                        String name,
-                                        Class<?>... paramTypes)
-        {
-            if (clazz != null) {
-                try {
-                    return clazz.getMethod(name, paramTypes);
-                } catch (NoSuchMethodException e) {
-                    throw new AssertionError(e);
-                }
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         * Returns the value of the applet's named parameter.
-         */
-        static Object get(Object applet, String name) {
-            // if clazz is null then applet cannot be an Applet.
-            if (clazz == null || !clazz.isInstance(applet))
-                throw new ClassCastException(applet.getClass().getName());
-            try {
-                return getMethod.invoke(applet, name);
-            } catch (InvocationTargetException |
-                     IllegalAccessException e) {
-                throw new AssertionError(e);
-            }
-        }
-    }
-
     // There should be no instances of this class.
     private ResourceManager() {
     }
@@ -179,12 +131,11 @@
 
     // ---------- Public methods ----------
 
-    /*
+    /**
      * Given the environment parameter passed to the initial context
      * constructor, returns the full environment for that initial
      * context (never null).  This is based on the environment
-     * parameter, the applet parameters (where appropriate), the
-     * system properties, and all application resource files.
+     * parameter, the system properties, and all application resource files.
      *
      * <p> This method will modify <tt>env</tt> and save
      * a reference to it.  The caller may no longer modify it.
@@ -196,18 +147,16 @@
      *          resource file
      */
     @SuppressWarnings("unchecked")
-    public static Hashtable<?, ?> getInitialEnvironment(
-            Hashtable<?, ?> env)
+    public static Hashtable<?, ?> getInitialEnvironment(Hashtable<?, ?> env)
             throws NamingException
     {
-        String[] props = VersionHelper.PROPS;   // system/applet properties
+        String[] props = VersionHelper.PROPS;   // system properties
         if (env == null) {
             env = new Hashtable<>(11);
         }
-        Object applet = env.get(Context.APPLET);
 
-        // Merge property values from env param, applet params, and system
-        // properties.  The first value wins:  there's no concatenation of
+        // Merge property values from env param, and system properties.
+        // The first value wins: there's no concatenation of
         // colon-separated lists.
         // Read system properties by first trying System.getProperties(),
         // and then trying System.getProperty() if that fails.  The former
@@ -217,18 +166,13 @@
         for (int i = 0; i < props.length; i++) {
             Object val = env.get(props[i]);
             if (val == null) {
-                if (applet != null) {
-                    val = AppletParameter.get(applet, props[i]);
-                }
-                if (val == null) {
-                    // Read system property.
-                    val = (jndiSysProps != null)
+                // Read system property.
+                val = (jndiSysProps != null)
                         ? jndiSysProps[i]
                         : helper.getJndiProperty(i);
-                }
-                if (val != null) {
-                    ((Hashtable<String, Object>)env).put(props[i], val);
-                }
+            }
+            if (val != null) {
+                ((Hashtable<String, Object>)env).put(props[i], val);
             }
         }
 
@@ -248,8 +192,8 @@
     /**
       * Retrieves the property from the environment, or from the provider
       * resource file associated with the given context.  The environment
-      * may in turn contain values that come from applet parameters,
-      * system properties, or application resource files.
+      * may in turn contain values that come from system properties,
+      * or application resource files.
       *
       * If <tt>concat</tt> is true and both the environment and the provider
       * resource file contain the property, the two values are concatenated
@@ -289,7 +233,7 @@
      * property.
      *
      * The property is gotten from the environment and the provider
-     * resource file associated with the given context and concantenated.
+     * resource file associated with the given context and concatenated.
      * See getProperty(). The resulting property value is a list of class names.
      *<p>
      * This method then loads each class using the current thread's context
--- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/naming/internal/VersionHelper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,14 +25,19 @@
 
 package com.sun.naming.internal;
 
+import javax.naming.NamingEnumeration;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import javax.naming.NamingEnumeration;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.*;
 
 /**
  * VersionHelper was used by JNDI to accommodate differences between
@@ -45,10 +50,10 @@
  * @author Scott Seligman
  */
 
-public abstract class VersionHelper {
-    private static VersionHelper helper = null;
+public final class VersionHelper {
+    private static final VersionHelper helper = new VersionHelper();
 
-    final static String[] PROPS = new String[] {
+    final static String[] PROPS = new String[]{
         javax.naming.Context.INITIAL_CONTEXT_FACTORY,
         javax.naming.Context.OBJECT_FACTORIES,
         javax.naming.Context.URL_PKG_PREFIXES,
@@ -67,31 +72,57 @@
     public final static int DNS_URL = 5;
     public final static int CONTROL_FACTORIES = 6;
 
-    VersionHelper() {} // Disallow anyone from creating one of these.
-
-    static {
-        helper = new VersionHelper12();
-    }
+    private VersionHelper() {} // Disallow anyone from creating one of these.
 
     public static VersionHelper getVersionHelper() {
         return helper;
     }
 
-    public abstract Class<?> loadClass(String className)
-        throws ClassNotFoundException;
+    public Class<?> loadClass(String className) throws ClassNotFoundException {
+        return loadClass(className, getContextClassLoader());
+    }
+
+    /**
+     * @param className A non-null fully qualified class name.
+     * @param codebase  A non-null, space-separated list of URL strings.
+     */
+    public Class<?> loadClass(String className, String codebase)
+            throws ClassNotFoundException, MalformedURLException {
+
+        ClassLoader parent = getContextClassLoader();
+        ClassLoader cl =
+                URLClassLoader.newInstance(getUrlArray(codebase), parent);
 
-    abstract Class<?> loadClass(String className, ClassLoader cl)
-        throws ClassNotFoundException;
+        return loadClass(className, cl);
+    }
 
-    public abstract Class<?> loadClass(String className, String codebase)
-        throws ClassNotFoundException, MalformedURLException;
+    /**
+     * Package private.
+     * <p>
+     * This internal method is used with Thread Context Class Loader (TCCL),
+     * please don't expose this method as public.
+     */
+    Class<?> loadClass(String className, ClassLoader cl)
+            throws ClassNotFoundException {
+        Class<?> cls = Class.forName(className, true, cl);
+        return cls;
+    }
 
     /*
-     * Returns a JNDI property from the system properties.  Returns
+     * Returns a JNDI property from the system properties. Returns
      * null if the property is not set, or if there is no permission
      * to read it.
      */
-    abstract String getJndiProperty(int i);
+    String getJndiProperty(int i) {
+        PrivilegedAction<String> act = () -> {
+            try {
+                return System.getProperty(PROPS[i]);
+            } catch (SecurityException e) {
+                return null;
+            }
+        };
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Reads each property in PROPS from the system properties, and
@@ -99,13 +130,33 @@
      * unset property, the corresponding array element is set to null.
      * Returns null if there is no permission to call System.getProperties().
      */
-    abstract String[] getJndiProperties();
+    String[] getJndiProperties() {
+        PrivilegedAction<Properties> act = () -> {
+            try {
+                return System.getProperties();
+            } catch (SecurityException e) {
+                return null;
+            }
+        };
+        Properties sysProps = AccessController.doPrivileged(act);
+        if (sysProps == null) {
+            return null;
+        }
+        String[] jProps = new String[PROPS.length];
+        for (int i = 0; i < PROPS.length; i++) {
+            jProps[i] = sysProps.getProperty(PROPS[i]);
+        }
+        return jProps;
+    }
 
     /*
      * Returns the resource of a given name associated with a particular
      * class (never null), or null if none can be found.
      */
-    abstract InputStream getResourceAsStream(Class<?> c, String name);
+    InputStream getResourceAsStream(Class<?> c, String name) {
+        PrivilegedAction<InputStream> act = () -> c.getResourceAsStream(name);
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Returns an input stream for a file in <java.home>/lib,
@@ -113,7 +164,22 @@
      *
      * @param filename  The file name, sans directory.
      */
-    abstract InputStream getJavaHomeLibStream(String filename);
+    InputStream getJavaHomeLibStream(String filename) {
+        PrivilegedAction<InputStream> act = () -> {
+            try {
+                String javahome = System.getProperty("java.home");
+                if (javahome == null) {
+                    return null;
+                }
+                String pathname = javahome + File.separator +
+                        "lib" + File.separator + filename;
+                return new FileInputStream(pathname);
+            } catch (Exception e) {
+                return null;
+            }
+        };
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Returns an enumeration (never null) of InputStreams of the
@@ -121,29 +187,55 @@
      * loader.  Null represents the bootstrap class loader in some
      * Java implementations.
      */
-    abstract NamingEnumeration<InputStream> getResources(
-            ClassLoader cl, String name)
-        throws IOException;
+    NamingEnumeration<InputStream> getResources(ClassLoader cl,
+                                                String name) throws IOException {
+        Enumeration<URL> urls;
+        PrivilegedExceptionAction<Enumeration<URL>> act = () ->
+                (cl == null)
+                        ? ClassLoader.getSystemResources(name)
+                        : cl.getResources(name);
+        try {
+            urls = AccessController.doPrivileged(act);
+        } catch (PrivilegedActionException e) {
+            throw (IOException) e.getException();
+        }
+        return new InputStreamEnumeration(urls);
+    }
+
 
-    /*
-     * Returns the context class loader associated with the current thread.
-     * Null indicates the bootstrap class loader in some Java implementations.
-     *
-     * @throws SecurityException if the class loader is not accessible.
+    /**
+     * Package private.
+     * <p>
+     * This internal method returns Thread Context Class Loader (TCCL),
+     * if null, returns the system Class Loader.
+     * <p>
+     * Please don't expose this method as public.
+     * @throws SecurityException if the class loader is not accessible
      */
-    abstract ClassLoader getContextClassLoader();
+    ClassLoader getContextClassLoader() {
 
-    static protected URL[] getUrlArray(String codebase)
-        throws MalformedURLException {
+        PrivilegedAction<ClassLoader> act = () -> {
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            if (loader == null) {
+                // Don't use bootstrap class loader directly!
+                loader = ClassLoader.getSystemClassLoader();
+            }
+            return loader;
+        };
+        return AccessController.doPrivileged(act);
+    }
+
+    private static URL[] getUrlArray(String codebase)
+            throws MalformedURLException {
         // Parse codebase into separate URLs
         StringTokenizer parser = new StringTokenizer(codebase);
-        Vector<String> vec = new Vector<>(10);
+        List<String> list = new ArrayList<>();
         while (parser.hasMoreTokens()) {
-            vec.addElement(parser.nextToken());
+            list.add(parser.nextToken());
         }
-        String[] url = new String[vec.size()];
+        String[] url = new String[list.size()];
         for (int i = 0; i < url.length; i++) {
-            url[i] = vec.elementAt(i);
+            url[i] = list.get(i);
         }
 
         URL[] urlArray = new URL[url.length];
@@ -152,4 +244,70 @@
         }
         return urlArray;
     }
+
+    /**
+     * Given an enumeration of URLs, an instance of this class represents
+     * an enumeration of their InputStreams.  Each operation on the URL
+     * enumeration is performed within a doPrivileged block.
+     * This is used to enumerate the resources under a foreign codebase.
+     * This class is not MT-safe.
+     */
+    private class InputStreamEnumeration implements
+            NamingEnumeration<InputStream> {
+
+        private final Enumeration<URL> urls;
+
+        private InputStream nextElement;
+
+        InputStreamEnumeration(Enumeration<URL> urls) {
+            this.urls = urls;
+        }
+
+        /*
+         * Returns the next InputStream, or null if there are no more.
+         * An InputStream that cannot be opened is skipped.
+         */
+        private InputStream getNextElement() {
+            PrivilegedAction<InputStream> act = () -> {
+                while (urls.hasMoreElements()) {
+                    try {
+                        return urls.nextElement().openStream();
+                    } catch (IOException e) {
+                        // skip this URL
+                    }
+                }
+                return null;
+            };
+            return AccessController.doPrivileged(act);
+        }
+
+        public boolean hasMore() {
+            if (nextElement != null) {
+                return true;
+            }
+            nextElement = getNextElement();
+            return (nextElement != null);
+        }
+
+        public boolean hasMoreElements() {
+            return hasMore();
+        }
+
+        public InputStream next() {
+            if (hasMore()) {
+                InputStream res = nextElement;
+                nextElement = null;
+                return res;
+            } else {
+                throw new NoSuchElementException();
+            }
+        }
+
+        public InputStream nextElement() {
+            return next();
+        }
+
+        public void close() {
+        }
+    }
 }
--- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, 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 com.sun.naming.internal;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URLClassLoader;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Properties;
-
-import javax.naming.*;
-
-/**
- * VersionHelper was used by JNDI to accommodate differences between
- * JDK 1.1.x and the Java 2 platform. As this is no longer necessary
- * since JNDI's inclusion in the platform, this class currently
- * serves as a set of utilities for performing system-level things,
- * such as class-loading and reading system properties.
- *
- * @author Rosanna Lee
- * @author Scott Seligman
- */
-
-final class VersionHelper12 extends VersionHelper {
-
-    // Disallow external from creating one of these.
-    VersionHelper12() {
-    }
-
-    public Class<?> loadClass(String className) throws ClassNotFoundException {
-        return loadClass(className, getContextClassLoader());
-    }
-
-    /**
-     * Package private.
-     *
-     * This internal method is used with Thread Context Class Loader (TCCL),
-     * please don't expose this method as public.
-     */
-    Class<?> loadClass(String className, ClassLoader cl)
-        throws ClassNotFoundException {
-        Class<?> cls = Class.forName(className, true, cl);
-        return cls;
-    }
-
-    /**
-     * @param className A non-null fully qualified class name.
-     * @param codebase A non-null, space-separated list of URL strings.
-     */
-    public Class<?> loadClass(String className, String codebase)
-            throws ClassNotFoundException, MalformedURLException {
-
-        ClassLoader parent = getContextClassLoader();
-        ClassLoader cl =
-                 URLClassLoader.newInstance(getUrlArray(codebase), parent);
-
-        return loadClass(className, cl);
-    }
-
-    String getJndiProperty(final int i) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
-                public String run() {
-                    try {
-                        return System.getProperty(PROPS[i]);
-                    } catch (SecurityException e) {
-                        return null;
-                    }
-                }
-            }
-        );
-    }
-
-    String[] getJndiProperties() {
-        Properties sysProps = AccessController.doPrivileged(
-            new PrivilegedAction<Properties>() {
-                public Properties run() {
-                    try {
-                        return System.getProperties();
-                    } catch (SecurityException e) {
-                        return null;
-                    }
-                }
-            }
-        );
-        if (sysProps == null) {
-            return null;
-        }
-        String[] jProps = new String[PROPS.length];
-        for (int i = 0; i < PROPS.length; i++) {
-            jProps[i] = sysProps.getProperty(PROPS[i]);
-        }
-        return jProps;
-    }
-
-    InputStream getResourceAsStream(final Class<?> c, final String name) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<InputStream>() {
-                public InputStream run() {
-                    return c.getResourceAsStream(name);
-                }
-            }
-        );
-    }
-
-    InputStream getJavaHomeLibStream(final String filename) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<InputStream>() {
-                public InputStream run() {
-                    try {
-                        String javahome = System.getProperty("java.home");
-                        if (javahome == null) {
-                            return null;
-                        }
-                        String pathname = javahome + java.io.File.separator +
-                            "lib" + java.io.File.separator + filename;
-                        return new java.io.FileInputStream(pathname);
-                    } catch (Exception e) {
-                        return null;
-                    }
-                }
-            }
-        );
-    }
-
-    NamingEnumeration<InputStream> getResources(final ClassLoader cl,
-            final String name) throws IOException {
-        Enumeration<URL> urls;
-        try {
-            urls = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Enumeration<URL>>() {
-                    public Enumeration<URL> run() throws IOException {
-                        return (cl == null)
-                            ? ClassLoader.getSystemResources(name)
-                            : cl.getResources(name);
-                    }
-                }
-            );
-        } catch (PrivilegedActionException e) {
-            throw (IOException)e.getException();
-        }
-        return new InputStreamEnumeration(urls);
-    }
-
-    /**
-     * Package private.
-     *
-     * This internal method returns Thread Context Class Loader (TCCL),
-     * if null, returns the system Class Loader.
-     *
-     * Please don't expose this method as public.
-     */
-    ClassLoader getContextClassLoader() {
-
-        return AccessController.doPrivileged(
-            new PrivilegedAction<ClassLoader>() {
-                public ClassLoader run() {
-                    ClassLoader loader =
-                            Thread.currentThread().getContextClassLoader();
-                    if (loader == null) {
-                        // Don't use bootstrap class loader directly!
-                        loader = ClassLoader.getSystemClassLoader();
-                    }
-
-                    return loader;
-                }
-            }
-        );
-    }
-
-    /**
-     * Given an enumeration of URLs, an instance of this class represents
-     * an enumeration of their InputStreams.  Each operation on the URL
-     * enumeration is performed within a doPrivileged block.
-     * This is used to enumerate the resources under a foreign codebase.
-     * This class is not MT-safe.
-     */
-    class InputStreamEnumeration implements NamingEnumeration<InputStream> {
-
-        private final Enumeration<URL> urls;
-
-        private InputStream nextElement = null;
-
-        InputStreamEnumeration(Enumeration<URL> urls) {
-            this.urls = urls;
-        }
-
-        /*
-         * Returns the next InputStream, or null if there are no more.
-         * An InputStream that cannot be opened is skipped.
-         */
-        private InputStream getNextElement() {
-            return AccessController.doPrivileged(
-                new PrivilegedAction<InputStream>() {
-                    public InputStream run() {
-                        while (urls.hasMoreElements()) {
-                            try {
-                                return urls.nextElement().openStream();
-                            } catch (IOException e) {
-                                // skip this URL
-                            }
-                        }
-                        return null;
-                    }
-                }
-            );
-        }
-
-        public boolean hasMore() {
-            if (nextElement != null) {
-                return true;
-            }
-            nextElement = getNextElement();
-            return (nextElement != null);
-        }
-
-        public boolean hasMoreElements() {
-            return hasMore();
-        }
-
-        public InputStream next() {
-            if (hasMore()) {
-                InputStream res = nextElement;
-                nextElement = null;
-                return res;
-            } else {
-                throw new NoSuchElementException();
-            }
-        }
-
-        public InputStream nextElement() {
-            return next();
-        }
-
-        public void close() {
-        }
-    }
-}
--- a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,7 +33,10 @@
 import java.util.*;
 
 import javax.security.auth.*;
-import javax.security.auth.kerberos.*;
+import javax.security.auth.kerberos.KerberosTicket;
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KerberosKey;
+import javax.security.auth.kerberos.KeyTab;
 import javax.security.auth.callback.*;
 import javax.security.auth.login.*;
 import javax.security.auth.spi.*;
--- a/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,33 +36,7 @@
 public interface ExtendedGSSContext extends GSSContext {
     /**
      * Return the mechanism-specific attribute associated with {@code type}.
-     * <br><br>
-     * For each supported attribute type, the type for the output are
-     * defined below.
-     * <ol>
-     * <li>{@code KRB5_GET_TKT_FLAGS}:
-     * the returned object is a boolean array for the service ticket flags,
-     * which is long enough to contain all true bits. This means if
-     * the user wants to get the <em>n</em>'th bit but the length of the
-     * returned array is less than <em>n</em>, it is regarded as false.
-     * <li>{@code KRB5_GET_SESSION_KEY}:
-     * the returned object is an instance of {@link java.security.Key},
-     * which has the following properties:
-     *    <ul>
-     *    <li>Algorithm: enctype as a string, where
-     *        enctype is defined in RFC 3961, section 8.
-     *    <li>Format: "RAW"
-     *    <li>Encoded form: the raw key bytes, not in any ASN.1 encoding
-     *    </ul>
-     * <li>{@code KRB5_GET_AUTHZ_DATA}:
-     * the returned object is an array of
-     * {@link com.sun.security.jgss.AuthorizationDataEntry}, or null if the
-     * optional field is missing in the service ticket.
-     * <li>{@code KRB5_GET_AUTHTIME}:
-     * the returned object is a String object in the standard KerberosTime
-     * format defined in RFC 4120 5.2.3
-     * </ol>
-     *
+     * <p>
      * If there is a security manager, an {@link InquireSecContextPermission}
      * with the name {@code type.mech} must be granted. Otherwise, this could
      * result in a {@link SecurityException}.<p>
@@ -97,6 +71,7 @@
      * @throws SecurityException if a security manager exists and a proper
      *   {@link InquireSecContextPermission} is not granted.
      * @see InquireSecContextPermission
+     * @see InquireType
      */
     public Object inquireSecContext(InquireType type)
             throws GSSException;
--- a/jdk/src/share/classes/com/sun/security/jgss/InquireType.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/security/jgss/InquireType.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,13 +32,38 @@
 @jdk.Exported
 public enum InquireType {
     /**
-     * Attribute type for retrieving the session key of an
-     * established Kerberos 5 security context.
+     * Attribute type for retrieving the session key of an established
+     * Kerberos 5 security context. The returned object is an instance of
+     * {@link java.security.Key}, which has the following properties:
+     *    <ul>
+     *    <li>Algorithm: enctype as a string, where
+     *        enctype is defined in RFC 3961, section 8.
+     *    <li>Format: "RAW"
+     *    <li>Encoded form: the raw key bytes, not in any ASN.1 encoding
+     *    </ul>
+     * @deprecated as of 1.9, replaced by {@link #KRB5_GET_SESSION_KEY_EX}
+     * which returns an instance of
+     * {@link sun.security.jgss.krb5.Krb5Context.EncryptionKey}
+     * that implements the {@link javax.crypto.SecretKey} interface and
+     * has similar methods with {@link javax.security.auth.kerberos.KerberosKey}.
      */
+    @Deprecated
     KRB5_GET_SESSION_KEY,
     /**
+     * Attribute type for retrieving the session key of an
+     * established Kerberos 5 security context. The return value is an
+     * instance of {@link javax.security.auth.kerberos.EncryptionKey}.
+     *
+     * @since 1.9
+     */
+    KRB5_GET_SESSION_KEY_EX,
+    /**
      * Attribute type for retrieving the service ticket flags of an
-     * established Kerberos 5 security context.
+     * established Kerberos 5 security context. The returned object is
+     * a boolean array for the service ticket flags, which is long enough
+     * to contain all true bits. This means if the user wants to get the
+     * <em>n</em>'th bit but the length of the returned array is less than
+     * <em>n</em>, it is regarded as false.
      */
     KRB5_GET_TKT_FLAGS,
     /**
@@ -49,7 +74,17 @@
     KRB5_GET_AUTHZ_DATA,
     /**
      * Attribute type for retrieving the authtime in the service ticket
-     * of an established Kerberos 5 security context.
+     * of an established Kerberos 5 security context. The returned object
+     * is a String object in the standard KerberosTime format defined in
+     * RFC 4120 Section 5.2.3.
      */
-    KRB5_GET_AUTHTIME
+    KRB5_GET_AUTHTIME,
+    /**
+     * Attribute type for retrieving the KRB_CRED message that an initiator
+     * is about to send to an acceptor. The return type is an instance of
+     * {@link javax.security.auth.kerberos.KerberosCredMessage}.
+     *
+     * @since 1.9
+     */
+    KRB5_GET_KRB_CRED,
 }
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,18 +33,18 @@
 
 public class ExpressionParser implements ExpressionParserConstants {
 
-  Stack stack = new Stack();
+  Stack<LValue> stack = new Stack<>();
   VirtualMachine vm = null;
   GetFrame frameGetter = null;
   private static GetFrame lastFrameGetter;
   private static LValue lastLValue;
 
   LValue peek() {
-    return (LValue)stack.peek();
+    return stack.peek();
   }
 
   LValue pop() {
-    return (LValue)stack.pop();
+    return stack.pop();
   }
 
   void push(LValue lval) {
@@ -915,7 +915,7 @@
   }
 
   final public void PrimarySuffix() throws ParseException {
- List argList;
+ List<Value> argList;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACKET:
       jj_consume_token(LBRACKET);
@@ -993,8 +993,8 @@
     jj_consume_token(NULL);
   }
 
-  final public List Arguments() throws ParseException {
- List argList = new ArrayList();
+  final public List<Value> Arguments() throws ParseException {
+ List<Value> argList = new ArrayList<>();
     jj_consume_token(LPAREN);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case FALSE:
@@ -1026,7 +1026,7 @@
     throw new Error("Missing return statement in function");
   }
 
-  final public void ArgumentList(List argList) throws ParseException {
+  final public void ArgumentList(List<Value> argList) throws ParseException {
     Expression();
                 argList.add(pop().interiorGetValue());
     label_17:
@@ -1046,7 +1046,7 @@
   }
 
   final public void AllocationExpression() throws ParseException {
- List argList; String className;
+ List<Value> argList; String className;
     if (jj_2_7(2)) {
       jj_consume_token(NEW);
       PrimitiveType();
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -229,9 +229,9 @@
         return name.indexOf('[') != -1;
     }
 
-    public Enumeration getInstances(boolean includeSubclasses) {
+    public Enumeration<JavaHeapObject> getInstances(boolean includeSubclasses) {
         if (includeSubclasses) {
-            Enumeration res = instances.elements();
+            Enumeration<JavaHeapObject> res = instances.elements();
             for (int i = 0; i < subclasses.length; i++) {
                 res = new CompositeEnumeration(res,
                               subclasses[i].getInstances(true));
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -166,11 +166,11 @@
      *
      * @return an Enumeration of JavaHeapObject instances
      */
-    public Enumeration getReferers() {
+    public Enumeration<JavaThing> getReferers() {
         if (referersLen != -1) {
             throw new RuntimeException("not resolved: " + getIdString());
         }
-        return new Enumeration() {
+        return new Enumeration<JavaThing>() {
 
             private int num = 0;
 
@@ -178,7 +178,7 @@
                 return referers != null && num < referers.length;
             }
 
-            public Object nextElement() {
+            public JavaThing nextElement() {
                 return referers[num++];
             }
         };
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,7 @@
 
     private File excludesFile;
     private long lastModified;
-    private Hashtable methods;  // Hashtable<String, String>, used as a bag
+    private Hashtable<String, String> methods;  // Used as a bag
 
     /**
      * Create a new ReachableExcludesImpl over the given file.  The file will be
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -86,7 +86,7 @@
         // Now grab the elements into a vector, and sort it in decreasing size
         JavaThing[] things = new JavaThing[bag.size()];
         int i = 0;
-        for (Enumeration e = bag.elements(); e.hasMoreElements(); ) {
+        for (Enumeration<JavaHeapObject> e = bag.elements(); e.hasMoreElements(); ) {
             things[i++] = (JavaThing) e.nextElement();
         }
         ArraySorter.sort(things, new Comparer() {
@@ -131,7 +131,7 @@
         return usedFields;
     }
 
-    private String[] getElements(Hashtable ht) {
+    private String[] getElements(Hashtable<?, ?> ht) {
         Object[] keys = ht.keySet().toArray();
         int len = keys.length;
         String[] res = new String[len];
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -81,7 +81,7 @@
                  new HashMap<JavaHeapObject, Root>();
 
     // soft cache of finalizeable objects - lazily initialized
-    private SoftReference<Vector> finalizablesCache;
+    private SoftReference<Vector<?>> finalizablesCache;
 
     // represents null reference
     private JavaThing nullThing;
@@ -383,7 +383,7 @@
     /**
      * Return an Iterator of all of the classes in this snapshot.
      **/
-    public Iterator getClasses() {
+    public Iterator<JavaClass> getClasses() {
         // note that because classes is a TreeMap
         // classes are already sorted by name
         return classes.values().iterator();
@@ -395,8 +395,8 @@
         return res;
     }
 
-    public synchronized Enumeration getFinalizerObjects() {
-        Vector obj;
+    public synchronized Enumeration<?> getFinalizerObjects() {
+        Vector<?> obj;
         if (finalizablesCache != null &&
             (obj = finalizablesCache.get()) != null) {
             return obj.elements();
@@ -418,7 +418,7 @@
                 finalizables.add(referent);
             }
         }
-        finalizablesCache = new SoftReference<Vector>(finalizables);
+        finalizablesCache = new SoftReference<Vector<?>>(finalizables);
         return finalizables.elements();
     }
 
@@ -455,7 +455,7 @@
                 // Even though curr is in the rootset, we want to explore its
                 // referers, because they might be more interesting.
             }
-            Enumeration referers = curr.getReferers();
+            Enumeration<JavaThing> referers = curr.getReferers();
             while (referers.hasMoreElements()) {
                 JavaHeapObject t = (JavaHeapObject) referers.nextElement();
                 if (t != null && !visited.containsKey(t)) {
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -51,7 +51,7 @@
 
             // create JavaScript engine
             Method getEngineMethod = managerClass.getMethod("getEngineByName",
-                                new Class[] { String.class });
+                                new Class<?>[] { String.class });
             Object jse = getEngineMethod.invoke(manager, new Object[] {"js"});
             oqlSupported = (jse != null);
         } catch (Exception exp) {
@@ -205,9 +205,9 @@
             }
 
             if (q.className != null) {
-                Enumeration objects = clazz.getInstances(q.isInstanceOf);
+                Enumeration<JavaHeapObject> objects = clazz.getInstances(q.isInstanceOf);
                 while (objects.hasMoreElements()) {
-                    JavaHeapObject obj = (JavaHeapObject) objects.nextElement();
+                    JavaHeapObject obj = objects.nextElement();
                     Object[] args = new Object[] { wrapJavaObject(obj) };
                     boolean b = (whereCode == null);
                     if (!b) {
@@ -265,14 +265,14 @@
 
             // create JavaScript engine
             Method getEngineMethod = managerClass.getMethod("getEngineByName",
-                                new Class[] { String.class });
+                                new Class<?>[] { String.class });
             engine = getEngineMethod.invoke(manager, new Object[] {"js"});
 
             // initialize engine with init file (hat.js)
             InputStream strm = getInitStream();
             Class<?> engineClass = Class.forName("javax.script.ScriptEngine");
             evalMethod = engineClass.getMethod("eval",
-                                new Class[] { Reader.class });
+                                new Class<?>[] { Reader.class });
             evalMethod.invoke(engine, new Object[] {new InputStreamReader(strm)});
 
             // initialize ScriptEngine.eval(String) and
@@ -280,13 +280,13 @@
             Class<?> invocableClass = Class.forName("javax.script.Invocable");
 
             evalMethod = engineClass.getMethod("eval",
-                                  new Class[] { String.class });
+                                  new Class<?>[] { String.class });
             invokeMethod = invocableClass.getMethod("invokeFunction",
-                                  new Class[] { String.class, Object[].class });
+                                  new Class<?>[] { String.class, Object[].class });
 
             // initialize ScriptEngine.put(String, Object) method
             Method putMethod = engineClass.getMethod("put",
-                                  new Class[] { String.class, Object.class });
+                                  new Class<?>[] { String.class, Object.class });
 
             // call ScriptEngine.put to initialize built-in heap object
             putMethod.invoke(engine, new Object[] {
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -58,10 +58,10 @@
             startHtml("All Classes (including platform)");
         }
 
-        Iterator classes = snapshot.getClasses();
+        Iterator<JavaClass> classes = snapshot.getClasses();
         String lastPackage = null;
         while (classes.hasNext()) {
-            JavaClass clazz = (JavaClass) classes.next();
+            JavaClass clazz = classes.next();
             if (excludePlatform && PlatformClasses.isPlatformClass(clazz)) {
                 // skip this..
                 continue;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -151,7 +151,7 @@
         }
         out.println("<h2>References to this object:</h2>");
         out.flush();
-        Enumeration referers = obj.getReferers();
+        Enumeration<JavaThing> referers = obj.getReferers();
         while (referers.hasMoreElements()) {
             JavaHeapObject ref = (JavaHeapObject) referers.nextElement();
             printThing(ref);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,7 +37,7 @@
 
 public class FinalizerObjectsQuery extends QueryHandler {
     public void run() {
-        Enumeration objs = snapshot.getFinalizerObjects();
+        Enumeration<?> objs = snapshot.getFinalizerObjects();
         startHtml("Objects pending finalization");
 
         out.println("<a href='/finalizerSummary/'>Finalizer summary</a>");
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,7 +37,7 @@
 
 public class FinalizerSummaryQuery extends QueryHandler {
     public void run() {
-        Enumeration objs = snapshot.getFinalizerObjects();
+        Enumeration<?> objs = snapshot.getFinalizerObjects();
         startHtml("Finalizer Summary");
 
         out.println("<p align='center'>");
@@ -74,7 +74,7 @@
         private long count;
     }
 
-    private void printFinalizerSummary(Enumeration objs) {
+    private void printFinalizerSummary(Enumeration<?> objs) {
         int count = 0;
         Map<JavaClass, HistogramElement> map = new HashMap<JavaClass, HistogramElement>();
 
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -111,10 +111,10 @@
             }
             out.print("</a> ");
             if (snapshot.getHasNewSet()) {
-                Enumeration objects = clazz.getInstances(false);
+                Enumeration<JavaHeapObject> objects = clazz.getInstances(false);
                 int newInst = 0;
                 while (objects.hasMoreElements()) {
-                    JavaHeapObject obj = (JavaHeapObject)objects.nextElement();
+                    JavaHeapObject obj = objects.nextElement();
                     if (obj.isNew()) {
                         newInst++;
                     }
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -73,11 +73,11 @@
             out.print("<strong>");
             printClass(clazz);
             out.print("</strong><br><br>");
-            Enumeration objects = clazz.getInstances(includeSubclasses);
+            Enumeration<JavaHeapObject> objects = clazz.getInstances(includeSubclasses);
             long totalSize = 0;
             long instances = 0;
             while (objects.hasMoreElements()) {
-                JavaHeapObject obj = (JavaHeapObject) objects.nextElement();
+                JavaHeapObject obj = objects.nextElement();
                 if (newObjects && !obj.isNew())
                     continue;
                 printThing(obj);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,15 +47,15 @@
         } else {
             Map<JavaClass, Long> referrersStat = new HashMap<JavaClass, Long>();
             final Map<JavaClass, Long> refereesStat = new HashMap<JavaClass, Long>();
-            Enumeration instances = clazz.getInstances(false);
+            Enumeration<JavaHeapObject> instances = clazz.getInstances(false);
             while (instances.hasMoreElements()) {
-                JavaHeapObject instance = (JavaHeapObject) instances.nextElement();
+                JavaHeapObject instance = instances.nextElement();
                 if (instance.getId() == -1) {
                     continue;
                 }
-                Enumeration e = instance.getReferers();
+                Enumeration<JavaThing> e = instance.getReferers();
                 while (e.hasMoreElements()) {
-                    JavaHeapObject ref = (JavaHeapObject) e.nextElement();
+                    JavaHeapObject ref = (JavaHeapObject)e.nextElement();
                     JavaClass cl = ref.getClazz();
                     if (cl == null) {
                          System.out.println("null class for " + ref);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -34,12 +34,13 @@
 
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
+import com.sun.tools.hat.internal.model.JavaHeapObject;
 
-public class CompositeEnumeration implements Enumeration {
-    Enumeration e1;
-    Enumeration e2;
+public class CompositeEnumeration implements Enumeration<JavaHeapObject> {
+    Enumeration<JavaHeapObject> e1;
+    Enumeration<JavaHeapObject> e2;
 
-    public CompositeEnumeration(Enumeration e1, Enumeration e2) {
+    public CompositeEnumeration(Enumeration<JavaHeapObject> e1, Enumeration<JavaHeapObject> e2) {
         this.e1 = e1;
         this.e2 = e2;
     }
@@ -48,7 +49,7 @@
         return e1.hasMoreElements() || e2.hasMoreElements();
     }
 
-    public Object nextElement() {
+    public JavaHeapObject nextElement() {
         if (e1.hasMoreElements()) {
             return e1.nextElement();
         }
--- a/jdk/src/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -39,7 +39,7 @@
 // Warnings from List filters and List[] requestLists is  hard to fix.
 // Remove SuppressWarning when we fix the warnings from List filters
 // and List[] requestLists. The generic array is not supported.
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked", "rawtypes"})
 class EventRequestManagerImpl extends MirrorImpl
                                        implements EventRequestManager
 {
--- a/jdk/src/share/classes/java/awt/Color.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Color.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -50,7 +50,7 @@
  * see <A href="http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html">
  * http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html
  * </A>.
- * <p>
+ *
  * @version     10 Feb 1997
  * @author      Sami Shaio
  * @author      Arthur van Hoff
--- a/jdk/src/share/classes/java/awt/Font.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Font.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -542,7 +542,6 @@
      * compatible alternative, then the font system will map the Font
      * instance to "Dialog", such that for example, the family as reported
      * by {@link #getFamily() getFamily} will be "Dialog".
-     * <p>
      *
      * @param name the font name.  This can be a font face name or a font
      * family name, and may represent either a logical font or a physical
--- a/jdk/src/share/classes/java/awt/Graphics.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Graphics.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -151,7 +151,7 @@
      * is specified by the <code>width</code> and <code>height</code>
      * arguments.
      * </ul>
-     * <p>
+     *
      * @param      x   the <i>x</i> coordinate.
      * @param      y   the <i>y</i> coordinate.
      * @param      width   the width of the clipping rectangle.
--- a/jdk/src/share/classes/java/awt/MenuComponent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/MenuComponent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -132,16 +132,24 @@
     static {
         AWTAccessor.setMenuComponentAccessor(
             new AWTAccessor.MenuComponentAccessor() {
+                @Override
                 public AppContext getAppContext(MenuComponent menuComp) {
                     return menuComp.appContext;
                 }
+                @Override
                 public void setAppContext(MenuComponent menuComp,
                                           AppContext appContext) {
                     menuComp.appContext = appContext;
                 }
+                @Override
                 public MenuContainer getParent(MenuComponent menuComp) {
                     return menuComp.parent;
                 }
+                @Override
+                public void setParent(MenuComponent menuComp, MenuContainer menuContainer) {
+                    menuComp.parent = menuContainer;
+                }
+                @Override
                 public Font getFont_NoClientCode(MenuComponent menuComp) {
                     return menuComp.getFont_NoClientCode();
                 }
--- a/jdk/src/share/classes/java/awt/Polygon.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Polygon.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -351,7 +351,7 @@
     /**
      * Determines whether the specified coordinates are inside this
      * <code>Polygon</code>.
-     * <p>
+     *
      * @param x the specified X coordinate to be tested
      * @param y the specified Y coordinate to be tested
      * @return {@code true} if this {@code Polygon} contains
--- a/jdk/src/share/classes/java/awt/Rectangle.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Rectangle.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,14 +41,13 @@
  * <p>
  * <a name="Empty">
  * A {@code Rectangle} whose width or height is exactly zero has location
- * along those axes with zero dimension, but is otherwise considered empty.
+ * along those axes with zero dimension, but is otherwise considered empty.</a>
  * The {@link #isEmpty} method will return true for such a {@code Rectangle}.
  * Methods which test if an empty {@code Rectangle} contains or intersects
  * a point or rectangle will always return false if either dimension is zero.
  * Methods which combine such a {@code Rectangle} with a point or rectangle
  * will include the location of the {@code Rectangle} on that axis in the
  * result as if the {@link #add(Point)} method were being called.
- * </a>
  * <p>
  * <a name="NonExistant">
  * A {@code Rectangle} whose width or height is negative has neither
@@ -422,7 +421,7 @@
      * <code>Rectangle</code> to the specified
      * <code>x</code>, <code>y</code>, <code>width</code>,
      * and <code>height</code>.
-     * <p>
+     *
      * @param x the new X coordinate for the upper-left
      *                    corner of this <code>Rectangle</code>
      * @param y the new Y coordinate for the upper-left
@@ -488,7 +487,7 @@
 
     /**
      * Moves this <code>Rectangle</code> to the specified location.
-     * <p>
+     *
      * @param x the X coordinate of the new location
      * @param y the Y coordinate of the new location
      * @deprecated As of JDK version 1.1,
@@ -629,7 +628,7 @@
     /**
      * Sets the size of this <code>Rectangle</code> to the specified
      * width and height.
-     * <p>
+     *
      * @param width the new width for this <code>Rectangle</code>
      * @param height the new height for this <code>Rectangle</code>
      * @deprecated As of JDK version 1.1,
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1241,10 +1241,9 @@
      * clipboard enables data transfer between Java programs and native
      * applications which use native clipboard facilities.
      * <p>
-     * In addition to any and all formats specified in the flavormap.properties
-     * file, or other file specified by the <code>AWT.DnD.flavorMapFileURL
-     * </code> Toolkit property, text returned by the system Clipboard's <code>
-     * getTransferData()</code> method is available in the following flavors:
+     * In addition to any and all default formats text returned by the system
+     * Clipboard's <code>getTransferData()</code> method is available in the
+     * following flavors:
      * <ul>
      * <li>DataFlavor.stringFlavor</li>
      * <li>DataFlavor.plainTextFlavor (<b>deprecated</b>)</li>
--- a/jdk/src/share/classes/java/awt/color/ColorSpace.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/color/ColorSpace.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -388,7 +388,7 @@
      * convert from CS_CIEXYZ to the output color space.
      * See {@link #toCIEXYZ(float[]) toCIEXYZ} and
      * {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least the number
      *        of components in this ColorSpace
      * @return a float array of length 3
@@ -412,7 +412,7 @@
      * convert from CS_CIEXYZ to the output color space.
      * See {@link #toCIEXYZ(float[]) toCIEXYZ} and
      * {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
-     * <p>
+     *
      * @param rgbvalue a float array with length of at least 3
      * @return a float array with length equal to the number of
      *         components in this ColorSpace
@@ -439,7 +439,7 @@
      * that would be measured using current CIE recommended practices.
      * See the {@link ICC_ColorSpace#toCIEXYZ(float[]) toCIEXYZ} method of
      * <code>ICC_ColorSpace</code> for further information.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least the number
      *        of components in this ColorSpace
      * @return a float array of length 3
@@ -467,7 +467,7 @@
      * relative values before being passed to this method.
      * See the {@link ICC_ColorSpace#fromCIEXYZ(float[]) fromCIEXYZ} method of
      * <code>ICC_ColorSpace</code> for further information.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least 3
      * @return a float array with length equal to the number of
      *         components in this ColorSpace
--- a/jdk/src/share/classes/java/awt/color/ICC_ColorSpace.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/color/ICC_ColorSpace.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -149,7 +149,7 @@
      * convert from CS_CIEXYZ to the output color space.
      * See {@link #toCIEXYZ(float[]) toCIEXYZ} and
      * {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least the number
      *      of components in this ColorSpace.
      * @return a float array of length 3.
@@ -201,7 +201,7 @@
      * convert from CS_CIEXYZ to the output color space.
      * See {@link #toCIEXYZ(float[]) toCIEXYZ} and
      * {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
-     * <p>
+     *
      * @param rgbvalue a float array with length of at least 3.
      * @return a float array with length equal to the number of
      *       components in this ColorSpace.
@@ -336,7 +336,7 @@
      * will result in a measured device XYZ value of D65.  This will not
      * be the same as the media white point tag XYZ value in the ICC
      * profile for an sRGB device.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least the number
      *        of components in this ColorSpace.
      * @return a float array of length 3.
@@ -480,7 +480,7 @@
      * will result in a measured device XYZ value of D65.  This will not
      * be the same as the media white point tag XYZ value in the ICC
      * profile for an sRGB device.
-     * <p>
+     *
      * @param colorvalue a float array with length of at least 3.
      * @return a float array with length equal to the number of
      *         components in this ColorSpace.
--- a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,8 @@
 
 import java.awt.Toolkit;
 
+import java.io.BufferedInputStream;
+import java.io.InputStream;
 import java.lang.ref.SoftReference;
 
 import java.io.BufferedReader;
@@ -38,6 +40,7 @@
 import java.net.MalformedURLException;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -45,6 +48,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Properties;
 import java.util.Set;
 
 import sun.awt.AppContext;
@@ -210,193 +214,48 @@
     }
 
     /**
-     * Initializes a SystemFlavorMap by reading flavormap.properties and
-     * AWT.DnD.flavorMapFileURL.
+     * Initializes a SystemFlavorMap by reading flavormap.properties
      * For thread-safety must be called under lock on this.
      */
     private void initSystemFlavorMap() {
         if (isMapInitialized) {
             return;
         }
-
         isMapInitialized = true;
-        BufferedReader flavormapDotProperties =
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<BufferedReader>() {
-                    public BufferedReader run() {
-                        String fileName =
-                            System.getProperty("java.home") +
-                            File.separator +
-                            "lib" +
-                            File.separator +
-                            "flavormap.properties";
-                        try {
-                            return new BufferedReader
-                                (new InputStreamReader
-                                    (new File(fileName).toURI().toURL().openStream(), "ISO-8859-1"));
-                        } catch (MalformedURLException e) {
-                            System.err.println("MalformedURLException:" + e + " while loading default flavormap.properties file:" + fileName);
-                        } catch (IOException e) {
-                            System.err.println("IOException:" + e + " while loading default flavormap.properties file:" + fileName);
-                        }
-                        return null;
-                    }
-                });
 
-        String url =
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<String>() {
-                    public String run() {
-                        return Toolkit.getProperty("AWT.DnD.flavorMapFileURL", null);
-                    }
-                });
-
-        if (flavormapDotProperties != null) {
-            try {
-                parseAndStoreReader(flavormapDotProperties);
-            } catch (IOException e) {
-                System.err.println("IOException:" + e + " while parsing default flavormap.properties file");
-            }
-        }
-
-        BufferedReader flavormapURL = null;
-        if (url != null) {
-            try {
-                flavormapURL = new BufferedReader(new InputStreamReader(new URL(url).openStream(), "ISO-8859-1"));
-            } catch (MalformedURLException e) {
-                System.err.println("MalformedURLException:" + e + " while reading AWT.DnD.flavorMapFileURL:" + url);
-            } catch (IOException e) {
-                System.err.println("IOException:" + e + " while reading AWT.DnD.flavorMapFileURL:" + url);
-            } catch (SecurityException e) {
-                // ignored
-            }
+        InputStream is = SystemFlavorMap.class.getResourceAsStream("/sun/awt/datatransfer/flavormap.properties");
+        if (is == null) {
+            throw new InternalError("Default flavor mapping not found");
         }
 
-        if (flavormapURL != null) {
-            try {
-                parseAndStoreReader(flavormapURL);
-            } catch (IOException e) {
-                System.err.println("IOException:" + e + " while parsing AWT.DnD.flavorMapFileURL");
-            }
-        }
-    }
-    /**
-     * Copied code from java.util.Properties. Parsing the data ourselves is the
-     * only way to handle duplicate keys and values.
-     */
-    private void parseAndStoreReader(BufferedReader in) throws IOException {
-        while (true) {
-            // Get next line
-            String line = in.readLine();
-            if (line == null) {
-                return;
-            }
-
-            if (line.length() > 0) {
-                // Continue lines that end in slashes if they are not comments
-                char firstChar = line.charAt(0);
-                if (firstChar != '#' && firstChar != '!') {
-                    while (continueLine(line)) {
-                        String nextLine = in.readLine();
-                        if (nextLine == null) {
-                            nextLine = "";
-                        }
-                        String loppedLine =
-                            line.substring(0, line.length() - 1);
-                        // Advance beyond whitespace on new line
-                        int startIndex = 0;
-                        for(; startIndex < nextLine.length(); startIndex++) {
-                            if (whiteSpaceChars.
-                                    indexOf(nextLine.charAt(startIndex)) == -1)
-                            {
-                                break;
-                            }
-                        }
-                        nextLine = nextLine.substring(startIndex,
-                                                      nextLine.length());
-                        line = loppedLine+nextLine;
-                    }
-
-                    // Find start of key
-                    int len = line.length();
-                    int keyStart = 0;
-                    for(; keyStart < len; keyStart++) {
-                        if(whiteSpaceChars.
-                               indexOf(line.charAt(keyStart)) == -1) {
-                            break;
-                        }
-                    }
-
-                    // Blank lines are ignored
-                    if (keyStart == len) {
-                        continue;
-                    }
-
-                    // Find separation between key and value
-                    int separatorIndex = keyStart;
-                    for(; separatorIndex < len; separatorIndex++) {
-                        char currentChar = line.charAt(separatorIndex);
-                        if (currentChar == '\\') {
-                            separatorIndex++;
-                        } else if (keyValueSeparators.
-                                       indexOf(currentChar) != -1) {
-                            break;
-                        }
-                    }
-
-                    // Skip over whitespace after key if any
-                    int valueIndex = separatorIndex;
-                    for (; valueIndex < len; valueIndex++) {
-                        if (whiteSpaceChars.
-                                indexOf(line.charAt(valueIndex)) == -1) {
-                            break;
-                        }
-                    }
-
-                    // Skip over one non whitespace key value separators if any
-                    if (valueIndex < len) {
-                        if (strictKeyValueSeparators.
-                                indexOf(line.charAt(valueIndex)) != -1) {
-                            valueIndex++;
-                        }
-                    }
-
-                    // Skip over white space after other separators if any
-                    while (valueIndex < len) {
-                        if (whiteSpaceChars.
-                                indexOf(line.charAt(valueIndex)) == -1) {
-                            break;
-                        }
-                        valueIndex++;
-                    }
-
-                    String key = line.substring(keyStart, separatorIndex);
-                    String value = (separatorIndex < len)
-                        ? line.substring(valueIndex, len)
-                        : "";
-
-                    // Convert then store key and value
-                    key = loadConvert(key);
-                    value = loadConvert(value);
-
+        try (InputStreamReader isr = new InputStreamReader(is);
+             BufferedReader reader = new BufferedReader(isr)) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                line = line.trim();
+                if (line.startsWith("#") || line.isEmpty()) continue;
+                while (line.endsWith("\\")) {
+                    line = line.substring(0, line.length() - 1) + reader.readLine().trim();
+                }
+                int delimiterPosition = line.indexOf('=');
+                String key = line.substring(0, delimiterPosition).replace("\\ ", " ");
+                String[] values = line.substring(delimiterPosition + 1, line.length()).split(",");
+                for (String value : values) {
                     try {
                         MimeType mime = new MimeType(value);
                         if ("text".equals(mime.getPrimaryType())) {
                             String charset = mime.getParameter("charset");
-                            if (DataTransferer.doesSubtypeSupportCharset
-                                    (mime.getSubType(), charset))
+                            if (DataTransferer.doesSubtypeSupportCharset(mime.getSubType(), charset))
                             {
                                 // We need to store the charset and eoln
                                 // parameters, if any, so that the
                                 // DataTransferer will have this information
                                 // for conversion into the native format.
-                                DataTransferer transferer =
-                                    DataTransferer.getInstance();
+                                DataTransferer transferer = DataTransferer.getInstance();
                                 if (transferer != null) {
-                                    transferer.registerTextFlavorProperties
-                                        (key, charset,
-                                         mime.getParameter("eoln"),
-                                         mime.getParameter("terminators"));
+                                    transferer.registerTextFlavorProperties(key, charset,
+                                            mime.getParameter("eoln"),
+                                            mime.getParameter("terminators"));
                                 }
                             }
 
@@ -441,78 +300,9 @@
                     }
                 }
             }
-        }
-    }
-
-    /**
-     * Copied from java.util.Properties.
-     */
-    private boolean continueLine (String line) {
-        int slashCount = 0;
-        int index = line.length() - 1;
-        while((index >= 0) && (line.charAt(index--) == '\\')) {
-            slashCount++;
+        } catch (IOException e) {
+            throw new InternalError("Error reading default flavor mapping", e);
         }
-        return (slashCount % 2 == 1);
-    }
-
-    /**
-     * Copied from java.util.Properties.
-     */
-    private String loadConvert(String theString) {
-        char aChar;
-        int len = theString.length();
-        StringBuilder outBuffer = new StringBuilder(len);
-
-        for (int x = 0; x < len; ) {
-            aChar = theString.charAt(x++);
-            if (aChar == '\\') {
-                aChar = theString.charAt(x++);
-                if (aChar == 'u') {
-                    // Read the xxxx
-                    int value = 0;
-                    for (int i = 0; i < 4; i++) {
-                        aChar = theString.charAt(x++);
-                        switch (aChar) {
-                          case '0': case '1': case '2': case '3': case '4':
-                          case '5': case '6': case '7': case '8': case '9': {
-                             value = (value << 4) + aChar - '0';
-                             break;
-                          }
-                          case 'a': case 'b': case 'c':
-                          case 'd': case 'e': case 'f': {
-                             value = (value << 4) + 10 + aChar - 'a';
-                             break;
-                          }
-                          case 'A': case 'B': case 'C':
-                          case 'D': case 'E': case 'F': {
-                             value = (value << 4) + 10 + aChar - 'A';
-                             break;
-                          }
-                          default: {
-                              throw new IllegalArgumentException(
-                                           "Malformed \\uxxxx encoding.");
-                          }
-                        }
-                    }
-                    outBuffer.append((char)value);
-                } else {
-                    if (aChar == 't') {
-                        aChar = '\t';
-                    } else if (aChar == 'r') {
-                        aChar = '\r';
-                    } else if (aChar == 'n') {
-                        aChar = '\n';
-                    } else if (aChar == 'f') {
-                        aChar = '\f';
-                    }
-                    outBuffer.append(aChar);
-                }
-            } else {
-                outBuffer.append(aChar);
-            }
-        }
-        return outBuffer.toString();
     }
 
     /**
--- a/jdk/src/share/classes/java/awt/font/TextAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/font/TextAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -96,7 +96,7 @@
  * </UL>
  *
  * <h4>Summary of attributes</h4>
- * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
+ * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="95%"
  *     summary="Key, value type, principal constants, and default value
  *     behavior of all TextAttributes">
  * <tr style="background-color:#ccccff">
--- a/jdk/src/share/classes/java/awt/geom/Arc2D.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/geom/Arc2D.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -35,8 +35,8 @@
  * <p>
  * <a name="inscribes">
  * The arc is a partial section of a full ellipse which
- * inscribes the framing rectangle of its parent {@link RectangularShape}.
- * </a>
+ * inscribes the framing rectangle of its parent</a> {@link RectangularShape}.
+ *
  * <a name="angles">
  * The angles are specified relative to the non-square
  * framing rectangle such that 45 degrees always falls on the line from
--- a/jdk/src/share/classes/java/awt/image/AffineTransformOp.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/image/AffineTransformOp.java	Fri Aug 08 11:36:48 2014 -0700
@@ -324,7 +324,7 @@
      * this part of the rectangle is not drawn.  If the coordinates
      * of the rectangle are positive then the filtered image is drawn at
      * that position in the destination <code>Raster</code>.
-     * <p>
+     *
      * @param src The <CODE>Raster</CODE> to transform.
      * @param dst The <CODE>Raster</CODE> in which to store the results of the
      * transformation.
--- a/jdk/src/share/classes/java/awt/image/BufferedImageFilter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/image/BufferedImageFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -85,7 +85,7 @@
      * an image should avoid calling this method directly since that
      * operation could result in problems with retrieving the requested
      * pixels.
-     * <p>
+     *
      * @param width the width to which to set the width of this
      *        <code>BufferedImageFilter</code>
      * @param height the height to which to set the height of this
--- a/jdk/src/share/classes/java/awt/image/ImageFilter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/image/ImageFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -225,7 +225,7 @@
      *
      * <li>
      * Override the method to simply send the data.
-     * This is appropriate if the filter can handle the request itself &#151;
+     * This is appropriate if the filter can handle the request itself &#8212;
      * for example,
      * if the generated pixels have been saved in some sort of buffer.
      *
--- a/jdk/src/share/classes/java/awt/image/WritableRaster.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/image/WritableRaster.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -394,7 +394,7 @@
      * is first converted to a 32-bit int (if necessary), using the above
      * rules for integral types, and then the int is cast to float or
      * double.
-     * <p>
+     *
      * @param srcRaster  The  Raster from which to copy pixels.
      *
      * @throws NullPointerException if srcRaster is null.
--- a/jdk/src/share/classes/java/awt/image/renderable/ParameterBlock.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/image/renderable/ParameterBlock.java	Fri Aug 08 11:36:48 2014 -0700
@@ -370,7 +370,7 @@
      *         the specified parameter.
      */
     public ParameterBlock add(int i) {
-        return add(new Integer(i));
+        return add(i);
     }
 
     /**
@@ -489,7 +489,7 @@
      *        the specified parameter.
      */
     public ParameterBlock set(int i, int index) {
-        return set(new Integer(i), index);
+        return set(i, index);
     }
 
     /**
--- a/jdk/src/share/classes/java/awt/print/PrinterJob.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/awt/print/PrinterJob.java	Fri Aug 08 11:36:48 2014 -0700
@@ -546,7 +546,6 @@
      * user settings returned from
      * <code>printDialog(PrintRequestAttributeSet attributes</code> to
      * this print() method.
-     * <p>
      *
      * @param attributes a set of attributes for the job
      * @exception PrinterException an error in the print system
--- a/jdk/src/share/classes/java/beans/EventHandler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/beans/EventHandler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -437,7 +437,7 @@
         if (method.getDeclaringClass() == Object.class)  {
             // Handle the Object public methods.
             if (methodName.equals("hashCode"))  {
-                return new Integer(System.identityHashCode(proxy));
+                return System.identityHashCode(proxy);
             } else if (methodName.equals("equals")) {
                 return (proxy == arguments[0] ? Boolean.TRUE : Boolean.FALSE);
             } else if (methodName.equals("toString")) {
--- a/jdk/src/share/classes/java/beans/MetaData.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/beans/MetaData.java	Fri Aug 08 11:36:48 2014 -0700
@@ -123,13 +123,13 @@
         Class<?> oldClass = oldInstance.getClass();
         return new Expression(oldInstance, Array.class, "newInstance",
                    new Object[]{oldClass.getComponentType(),
-                                new Integer(Array.getLength(oldInstance))});
+                                Array.getLength(oldInstance)});
         }
 
     protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
         int n = Array.getLength(oldInstance);
         for (int i = 0; i < n; i++) {
-            Object index = new Integer(i);
+            Object index = i;
             // Expression oldGetExp = new Expression(Array.class, "get", new Object[]{oldInstance, index});
             // Expression newGetExp = new Expression(Array.class, "get", new Object[]{newInstance, index});
             Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
@@ -635,7 +635,7 @@
             newSize = 0;
         }
         for (int i = 0; i < newSize; i++) {
-            Object index = new Integer(i);
+            Object index = i;
 
             Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
             Expression newGetExp = new Expression(newInstance, "get", new Object[]{index});
@@ -892,7 +892,7 @@
     protected Expression instantiate(Object oldInstance, Encoder out) {
         java.awt.MenuShortcut m = (java.awt.MenuShortcut)oldInstance;
         return new Expression(oldInstance, m.getClass(), "new",
-                   new Object[]{new Integer(m.getKey()), Boolean.valueOf(m.usesShiftModifier())});
+                   new Object[]{m.getKey(), Boolean.valueOf(m.usesShiftModifier())});
     }
 }
 
--- a/jdk/src/share/classes/java/beans/NameGenerator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/beans/NameGenerator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -107,7 +107,7 @@
 
             Integer size = nameToCount.get(className);
             int instanceNumber = (size == null) ? 0 : (size).intValue() + 1;
-            nameToCount.put(className, new Integer(instanceNumber));
+            nameToCount.put(className, instanceNumber);
 
             result = className + instanceNumber;
             valueToName.put(instance, result);
--- a/jdk/src/share/classes/java/lang/Integer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/Integer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -26,6 +26,7 @@
 package java.lang;
 
 import java.lang.annotation.Native;
+import java.util.Objects;
 
 /**
  * The {@code Integer} class wraps a value of the primitive type
@@ -319,24 +320,27 @@
     }
 
     /**
-     * Format a long (treated as unsigned) into a character buffer.
+     * Format an {@code int} (treated as unsigned) into a character buffer. If
+     * {@code len} exceeds the formatted ASCII representation of {@code val},
+     * {@code buf} will be padded with leading zeroes.
+     *
      * @param val the unsigned int to format
      * @param shift the log2 of the base to format in (4 for hex, 3 for octal, 1 for binary)
      * @param buf the character buffer to write to
      * @param offset the offset in the destination buffer to start at
      * @param len the number of characters to write
-     * @return the lowest character  location used
      */
-     static int formatUnsignedInt(int val, int shift, char[] buf, int offset, int len) {
-        int charPos = len;
+     static void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len) {
+        // assert shift > 0 && shift <=5 : "Illegal shift value";
+        // assert offset >= 0 && offset < buf.length : "illegal offset";
+        // assert len > 0 && (offset + len) <= buf.length : "illegal length";
+        int charPos = offset + len;
         int radix = 1 << shift;
         int mask = radix - 1;
         do {
-            buf[offset + --charPos] = Integer.digits[val & mask];
+            buf[--charPos] = Integer.digits[val & mask];
             val >>>= shift;
-        } while (val != 0 && charPos > 0);
-
-        return charPos;
+        } while (charPos > offset);
     }
 
     final static char [] DigitTens = {
@@ -549,12 +553,9 @@
                                             " greater than Character.MAX_RADIX");
         }
 
-        int result = 0;
         boolean negative = false;
         int i = 0, len = s.length();
         int limit = -Integer.MAX_VALUE;
-        int multmin;
-        int digit;
 
         if (len > 0) {
             char firstChar = s.charAt(0);
@@ -562,21 +563,21 @@
                 if (firstChar == '-') {
                     negative = true;
                     limit = Integer.MIN_VALUE;
-                } else if (firstChar != '+')
+                } else if (firstChar != '+') {
                     throw NumberFormatException.forInputString(s);
+                }
 
-                if (len == 1) // Cannot have lone "+" or "-"
+                if (len == 1) { // Cannot have lone "+" or "-"
                     throw NumberFormatException.forInputString(s);
+                }
                 i++;
             }
-            multmin = limit / radix;
+            int multmin = limit / radix;
+            int result = 0;
             while (i < len) {
                 // Accumulating negatively avoids surprises near MAX_VALUE
-                digit = Character.digit(s.charAt(i++),radix);
-                if (digit < 0) {
-                    throw NumberFormatException.forInputString(s);
-                }
-                if (result < multmin) {
+                int digit = Character.digit(s.charAt(i++), radix);
+                if (digit < 0 || result < multmin) {
                     throw NumberFormatException.forInputString(s);
                 }
                 result *= radix;
@@ -585,10 +586,126 @@
                 }
                 result -= digit;
             }
+            return negative ? result : -result;
         } else {
             throw NumberFormatException.forInputString(s);
         }
-        return negative ? result : -result;
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as a signed {@code int} in the
+     * specified {@code radix}, beginning at the specified {@code beginIndex}
+     * and extending to the end of the sequence.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the {@code int}
+     *                  representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @return     the signed {@code int} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable {@code int} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static int parseInt(CharSequence s, int radix, int beginIndex)
+                throws NumberFormatException {
+        // forces an implicit null check of s
+        return parseInt(s, radix, beginIndex, s.length());
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as a signed {@code int} in the
+     * specified {@code radix}, beginning at the specified {@code beginIndex}
+     * and extending to {@code endIndex - 1}.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the {@code int}
+     *                  representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @param      endIndex     the ending index, exclusive.
+     * @return     the signed {@code int} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code endIndex} or if {@code endIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable {@code int} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static int parseInt(CharSequence s, int radix, int beginIndex, int endIndex)
+                throws NumberFormatException {
+        s = Objects.requireNonNull(s);
+
+        if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length()) {
+            throw new IndexOutOfBoundsException();
+        }
+        if (radix < Character.MIN_RADIX) {
+            throw new NumberFormatException("radix " + radix +
+                                            " less than Character.MIN_RADIX");
+        }
+        if (radix > Character.MAX_RADIX) {
+            throw new NumberFormatException("radix " + radix +
+                                            " greater than Character.MAX_RADIX");
+        }
+
+        boolean negative = false;
+        int i = beginIndex;
+        int limit = -Integer.MAX_VALUE;
+
+        if (i < endIndex) {
+            char firstChar = s.charAt(i);
+            if (firstChar < '0') { // Possible leading "+" or "-"
+                if (firstChar == '-') {
+                    negative = true;
+                    limit = Integer.MIN_VALUE;
+                } else if (firstChar != '+') {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                i++;
+                if (i == endIndex) { // Cannot have lone "+" or "-"
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+            }
+            int multmin = limit / radix;
+            int result = 0;
+            while (i < endIndex) {
+                // Accumulating negatively avoids surprises near MAX_VALUE
+                int digit = Character.digit(s.charAt(i++), radix);
+                if (digit < 0 || result < multmin) {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                result *= radix;
+                if (result < limit + digit) {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                result -= digit;
+            }
+            return negative ? result : -result;
+        } else {
+            throw NumberFormatException.forInputString("");
+        }
     }
 
     /**
@@ -689,6 +806,99 @@
     }
 
     /**
+     * Parses the {@link CharSequence} argument as an unsigned {@code int} in
+     * the specified {@code radix}, beginning at the specified
+     * {@code beginIndex} and extending to the end of the sequence.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the unsigned
+     *                 {@code int} representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @return     the unsigned {@code int} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable unsigned {@code int} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static int parseUnsignedInt(CharSequence s, int radix, int beginIndex)
+                throws NumberFormatException {
+        // forces an implicit null check of s
+        return parseUnsignedInt(s, radix, beginIndex, s.length());
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as an unsigned {@code int} in
+     * the specified {@code radix}, beginning at the specified
+     * {@code beginIndex} and extending to {@code endIndex - 1}.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the unsigned
+     *                 {@code int} representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @param      endIndex     the ending index, exclusive.
+     * @return     the unsigned {@code int} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code endIndex} or if {@code endIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable unsigned {@code int} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static int parseUnsignedInt(CharSequence s, int radix, int beginIndex, int endIndex)
+                throws NumberFormatException {
+        s = Objects.requireNonNull(s);
+
+        if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length()) {
+            throw new IndexOutOfBoundsException();
+        }
+        int start = beginIndex, len = endIndex - beginIndex;
+
+        if (len > 0) {
+            char firstChar = s.charAt(start);
+            if (firstChar == '-') {
+                throw new
+                    NumberFormatException(String.format("Illegal leading minus sign " +
+                                                       "on unsigned string %s.", s));
+            } else {
+                if (len <= 5 || // Integer.MAX_VALUE in Character.MAX_RADIX is 6 digits
+                        (radix == 10 && len <= 9)) { // Integer.MAX_VALUE in base 10 is 10 digits
+                    return parseInt(s, radix, start, start + len);
+                } else {
+                    long ell = Long.parseLong(s, radix, start, start + len);
+                    if ((ell & 0xffff_ffff_0000_0000L) == 0) {
+                        return (int) ell;
+                    } else {
+                        throw new
+                            NumberFormatException(String.format("String value %s exceeds " +
+                                                                "range of unsigned int.", s));
+                    }
+                }
+            }
+        } else {
+            throw new NumberFormatException("");
+        }
+    }
+
+    /**
      * Parses the string argument as an unsigned decimal integer. The
      * characters in the string must all be decimal digits, except
      * that the first character may be an an ASCII plus sign {@code
--- a/jdk/src/share/classes/java/lang/Long.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/Long.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,7 @@
 
 import java.lang.annotation.Native;
 import java.math.*;
+import java.util.Objects;
 
 
 /**
@@ -360,24 +361,27 @@
     }
 
     /**
-     * Format a long (treated as unsigned) into a character buffer.
+     * Format a long (treated as unsigned) into a character buffer. If
+     * {@code len} exceeds the formatted ASCII representation of {@code val},
+     * {@code buf} will be padded with leading zeroes.
+     *
      * @param val the unsigned long to format
      * @param shift the log2 of the base to format in (4 for hex, 3 for octal, 1 for binary)
      * @param buf the character buffer to write to
      * @param offset the offset in the destination buffer to start at
      * @param len the number of characters to write
-     * @return the lowest character location used
      */
-     static int formatUnsignedLong(long val, int shift, char[] buf, int offset, int len) {
-        int charPos = len;
+     static void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len) {
+        // assert shift > 0 && shift <=5 : "Illegal shift value";
+        // assert offset >= 0 && offset < buf.length : "illegal offset";
+        // assert len > 0 && (offset + len) <= buf.length : "illegal length";
+        int charPos = offset + len;
         int radix = 1 << shift;
         int mask = radix - 1;
         do {
-            buf[offset + --charPos] = Integer.digits[((int) val) & mask];
+            buf[--charPos] = Integer.digits[((int) val) & mask];
             val >>>= shift;
-        } while (val != 0 && charPos > 0);
-
-        return charPos;
+        } while (charPos > offset);
     }
 
     /**
@@ -561,12 +565,9 @@
                                             " greater than Character.MAX_RADIX");
         }
 
-        long result = 0;
         boolean negative = false;
         int i = 0, len = s.length();
         long limit = -Long.MAX_VALUE;
-        long multmin;
-        int digit;
 
         if (len > 0) {
             char firstChar = s.charAt(0);
@@ -574,21 +575,21 @@
                 if (firstChar == '-') {
                     negative = true;
                     limit = Long.MIN_VALUE;
-                } else if (firstChar != '+')
+                } else if (firstChar != '+') {
                     throw NumberFormatException.forInputString(s);
+                }
 
-                if (len == 1) // Cannot have lone "+" or "-"
+                if (len == 1) { // Cannot have lone "+" or "-"
                     throw NumberFormatException.forInputString(s);
+                }
                 i++;
             }
-            multmin = limit / radix;
+            long multmin = limit / radix;
+            long result = 0;
             while (i < len) {
                 // Accumulating negatively avoids surprises near MAX_VALUE
-                digit = Character.digit(s.charAt(i++),radix);
-                if (digit < 0) {
-                    throw NumberFormatException.forInputString(s);
-                }
-                if (result < multmin) {
+                int digit = Character.digit(s.charAt(i++),radix);
+                if (digit < 0 || result < multmin) {
                     throw NumberFormatException.forInputString(s);
                 }
                 result *= radix;
@@ -597,10 +598,126 @@
                 }
                 result -= digit;
             }
+            return negative ? result : -result;
         } else {
             throw NumberFormatException.forInputString(s);
         }
-        return negative ? result : -result;
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as a signed {@code long} in
+     * the specified {@code radix}, beginning at the specified {@code beginIndex}
+     * and extending to the end of the sequence.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the {@code long}
+     *                  representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @return     the signed {@code long} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable {@code long} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static long parseLong(CharSequence s, int radix, int beginIndex)
+            throws NumberFormatException {
+        // forces a null check of s
+        return parseLong(s, radix, beginIndex, s.length());
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as a signed {@code long} in
+     * the specified {@code radix}, beginning at the specified
+     * {@code beginIndex} and extending to {@code endIndex - 1}.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the {@code long}
+     *                  representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @param      endIndex     the ending index, exclusive.
+     * @return     the signed {@code long} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code endIndex} or if {@code endIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable {@code int} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static long parseLong(CharSequence s, int radix, int beginIndex, int endIndex)
+                throws NumberFormatException {
+        s = Objects.requireNonNull(s);
+
+        if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length()) {
+            throw new IndexOutOfBoundsException();
+        }
+        if (radix < Character.MIN_RADIX) {
+            throw new NumberFormatException("radix " + radix +
+                    " less than Character.MIN_RADIX");
+        }
+        if (radix > Character.MAX_RADIX) {
+            throw new NumberFormatException("radix " + radix +
+                    " greater than Character.MAX_RADIX");
+        }
+
+        boolean negative = false;
+        int i = beginIndex;
+        long limit = -Long.MAX_VALUE;
+
+        if (i < endIndex) {
+            char firstChar = s.charAt(i);
+            if (firstChar < '0') { // Possible leading "+" or "-"
+                if (firstChar == '-') {
+                    negative = true;
+                    limit = Long.MIN_VALUE;
+                } else if (firstChar != '+') {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                i++;
+            }
+            if (i >= endIndex) { // Cannot have lone "+", "-" or ""
+                throw NumberFormatException.forCharSequence(s, beginIndex,
+                        endIndex, i);
+            }
+            long multmin = limit / radix;
+            long result = 0;
+            while (i < endIndex) {
+                // Accumulating negatively avoids surprises near MAX_VALUE
+                int digit = Character.digit(s.charAt(i++), radix);
+                if (digit < 0 || result < multmin) {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                result *= radix;
+                if (result < limit + digit) {
+                    throw NumberFormatException.forCharSequence(s, beginIndex,
+                            endIndex, i);
+                }
+                result -= digit;
+            }
+            return negative ? result : -result;
+        } else {
+            throw new NumberFormatException("");
+        }
     }
 
     /**
@@ -694,7 +811,7 @@
                 }
 
                 // No need for range checks on len due to testing above.
-                long first = parseLong(s.substring(0, len - 1), radix);
+                long first = parseLong(s, radix, 0, len - 1);
                 int second = Character.digit(s.charAt(len - 1), radix);
                 if (second < 0) {
                     throw new NumberFormatException("Bad digit at end of " + s);
@@ -764,6 +881,155 @@
     }
 
     /**
+     * Parses the {@link CharSequence} argument as an unsigned {@code long} in
+     * the specified {@code radix}, beginning at the specified
+     * {@code beginIndex} and extending to the end of the sequence.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the unsigned
+     *                 {@code long} representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @return     the unsigned {@code long} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable unsigned {@code long} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static long parseUnsignedLong(CharSequence s, int radix, int beginIndex)
+                throws NumberFormatException {
+        // forces a null check of s
+        return parseUnsignedLong(s, radix, beginIndex, s.length());
+    }
+
+    /**
+     * Parses the {@link CharSequence} argument as an unsigned {@code long} in
+     * the specified {@code radix}, beginning at the specified
+     * {@code beginIndex} and extending to {@code endIndex - 1}.
+     *
+     * <p>The method does not take steps to guard against the
+     * {@code CharSequence} being mutated while parsing.
+     *
+     * @param      s   the {@code CharSequence} containing the unsigned
+     *                 {@code long} representation to be parsed
+     * @param      radix   the radix to be used while parsing {@code s}.
+     * @param      beginIndex   the beginning index, inclusive.
+     * @param      endIndex     the ending index, exclusive.
+     * @return     the unsigned {@code long} represented by the subsequence in
+     *             the specified radix.
+     * @throws     NullPointerException  if {@code s} is null.
+     * @throws     IndexOutOfBoundsException  if {@code beginIndex} is
+     *             negative, or if {@code beginIndex} is greater than
+     *             {@code endIndex} or if {@code endIndex} is greater than
+     *             {@code s.length()}.
+     * @throws     NumberFormatException  if the {@code CharSequence} does not
+     *             contain a parsable unsigned {@code long} in the specified
+     *             {@code radix}, or if {@code radix} is either smaller than
+     *             {@link java.lang.Character#MIN_RADIX} or larger than
+     *             {@link java.lang.Character#MAX_RADIX}.
+     * @since  1.9
+     */
+    public static long parseUnsignedLong(CharSequence s, int radix, int beginIndex, int endIndex)
+                throws NumberFormatException {
+        s = Objects.requireNonNull(s);
+
+        if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length()) {
+            throw new IndexOutOfBoundsException();
+        }
+        int start = beginIndex, len = endIndex - beginIndex;
+
+        if (len > 0) {
+            char firstChar = s.charAt(start);
+            if (firstChar == '-') {
+                throw new NumberFormatException(String.format("Illegal leading minus sign " +
+                        "on unsigned string %s.", s.subSequence(start, start + len)));
+            } else {
+                if (len <= 12 || // Long.MAX_VALUE in Character.MAX_RADIX is 13 digits
+                    (radix == 10 && len <= 18) ) { // Long.MAX_VALUE in base 10 is 19 digits
+                    return parseLong(s, radix, start, start + len);
+                }
+
+                // No need for range checks on end due to testing above.
+                long first = parseLong(s, radix, start, start + len - 1);
+                int second = Character.digit(s.charAt(start + len - 1), radix);
+                if (second < 0) {
+                    throw new NumberFormatException("Bad digit at end of " +
+                            s.subSequence(start, start + len));
+                }
+                long result = first * radix + second;
+
+                /*
+                 * Test leftmost bits of multiprecision extension of first*radix
+                 * for overflow. The number of bits needed is defined by
+                 * GUARD_BIT = ceil(log2(Character.MAX_RADIX)) + 1 = 7. Then
+                 * int guard = radix*(int)(first >>> (64 - GUARD_BIT)) and
+                 * overflow is tested by splitting guard in the ranges
+                 * guard < 92, 92 <= guard < 128, and 128 <= guard, where
+                 * 92 = 128 - Character.MAX_RADIX. Note that guard cannot take
+                 * on a value which does not include a prime factor in the legal
+                 * radix range.
+                 */
+                int guard = radix * (int) (first >>> 57);
+                if (guard >= 128 ||
+                        (result >= 0 && guard >= 128 - Character.MAX_RADIX)) {
+                    /*
+                     * For purposes of exposition, the programmatic statements
+                     * below should be taken to be multi-precision, i.e., not
+                     * subject to overflow.
+                     *
+                     * A) Condition guard >= 128:
+                     * If guard >= 128 then first*radix >= 2^7 * 2^57 = 2^64
+                     * hence always overflow.
+                     *
+                     * B) Condition guard < 92:
+                     * Define left7 = first >>> 57.
+                     * Given first = (left7 * 2^57) + (first & (2^57 - 1)) then
+                     * result <= (radix*left7)*2^57 + radix*(2^57 - 1) + second.
+                     * Thus if radix*left7 < 92, radix <= 36, and second < 36,
+                     * then result < 92*2^57 + 36*(2^57 - 1) + 36 = 2^64 hence
+                     * never overflow.
+                     *
+                     * C) Condition 92 <= guard < 128:
+                     * first*radix + second >= radix*left7*2^57 + second
+                     * so that first*radix + second >= 92*2^57 + 0 > 2^63
+                     *
+                     * D) Condition guard < 128:
+                     * radix*first <= (radix*left7) * 2^57 + radix*(2^57 - 1)
+                     * so
+                     * radix*first + second <= (radix*left7) * 2^57 + radix*(2^57 - 1) + 36
+                     * thus
+                     * radix*first + second < 128 * 2^57 + 36*2^57 - radix + 36
+                     * whence
+                     * radix*first + second < 2^64 + 2^6*2^57 = 2^64 + 2^63
+                     *
+                     * E) Conditions C, D, and result >= 0:
+                     * C and D combined imply the mathematical result
+                     * 2^63 < first*radix + second < 2^64 + 2^63. The lower
+                     * bound is therefore negative as a signed long, but the
+                     * upper bound is too small to overflow again after the
+                     * signed long overflows to positive above 2^64 - 1. Hence
+                     * result >= 0 implies overflow given C and D.
+                     */
+                    throw new NumberFormatException(String.format("String value %s exceeds " +
+                            "range of unsigned long.", s.subSequence(start, start + len)));
+                }
+                return result;
+            }
+        } else {
+            throw NumberFormatException.forInputString("");
+        }
+    }
+
+    /**
      * Parses the string argument as an unsigned decimal {@code long}. The
      * characters in the string must all be decimal digits, except
      * that the first character may be an an ASCII plus sign {@code
--- a/jdk/src/share/classes/java/lang/NumberFormatException.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/NumberFormatException.java	Fri Aug 08 11:36:48 2014 -0700
@@ -56,7 +56,7 @@
     }
 
     /**
-     * Factory method for making a <code>NumberFormatException</code>
+     * Factory method for making a {@code NumberFormatException}
      * given the specified input which caused the error.
      *
      * @param   s   the input causing the error
@@ -64,4 +64,20 @@
     static NumberFormatException forInputString(String s) {
         return new NumberFormatException("For input string: \"" + s + "\"");
     }
+
+    /**
+     * Factory method for making a {@code NumberFormatException}
+     * given the specified input which caused the error.
+     *
+     * @param   s   the input causing the error
+     * @param   beginIndex   the beginning index, inclusive.
+     * @param   endIndex     the ending index, exclusive.
+     * @param   errorIndex   the index of the first error in s
+     */
+    static NumberFormatException forCharSequence(CharSequence s,
+            int beginIndex, int endIndex, int errorIndex) {
+        return new NumberFormatException("Error at index "
+                + (errorIndex - beginIndex) + " in: \""
+                + s.subSequence(beginIndex, endIndex) + "\"");
+    }
 }
--- a/jdk/src/share/classes/java/lang/String.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/String.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2580,7 +2580,8 @@
         }
         for (int i = first; i < len; i++) {
             int cp = (int)value[i];
-            if (cp == '\u03A3') {                       // GREEK CAPITAL LETTER SIGMA
+            if (cp == '\u03A3' ||                       // GREEK CAPITAL LETTER SIGMA
+                Character.isSurrogate((char)cp)) {
                 return toLowerCaseEx(result, i, locale, false);
             }
             if (cp == '\u0130') {                       // LATIN CAPITAL LETTER I WITH DOT ABOVE
@@ -2742,7 +2743,11 @@
             return toUpperCaseEx(result, first, locale, false);
         }
         for (int i = first; i < len; i++) {
-            int cp = Character.toUpperCaseEx((int)value[i]);
+            int cp = (int)value[i];
+            if (Character.isSurrogate((char)cp)) {
+                return toUpperCaseEx(result, i, locale, false);
+            }
+            cp = Character.toUpperCaseEx(cp);
             if (!Character.isBmpCodePoint(cp)) {    // Character.ERROR is not bmp
                 return toUpperCaseEx(result, i, locale, false);
             }
--- a/jdk/src/share/classes/java/lang/System.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/System.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1263,6 +1263,12 @@
             public void invokeFinalize(Object o) throws Throwable {
                 o.finalize();
             }
+            public void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len) {
+                Long.formatUnsignedLong(val, shift, buf, offset, len);
+            }
+            public void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len) {
+                Integer.formatUnsignedInt(val, shift, buf, offset, len);
+            }
         });
     }
 }
--- a/jdk/src/share/classes/java/lang/reflect/Modifier.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/Modifier.java	Fri Aug 08 11:36:48 2014 -0700
@@ -26,6 +26,7 @@
 package java.lang.reflect;
 
 import java.security.AccessController;
+import java.util.StringJoiner;
 import sun.reflect.LangReflectAccess;
 import sun.reflect.ReflectionFactory;
 
@@ -232,27 +233,24 @@
      * represented by {@code mod}
      */
     public static String toString(int mod) {
-        StringBuilder sb = new StringBuilder();
-        int len;
+        StringJoiner sj = new StringJoiner(" ");
 
-        if ((mod & PUBLIC) != 0)        sb.append("public ");
-        if ((mod & PROTECTED) != 0)     sb.append("protected ");
-        if ((mod & PRIVATE) != 0)       sb.append("private ");
+        if ((mod & PUBLIC) != 0)        sj.add("public");
+        if ((mod & PROTECTED) != 0)     sj.add("protected");
+        if ((mod & PRIVATE) != 0)       sj.add("private");
 
         /* Canonical order */
-        if ((mod & ABSTRACT) != 0)      sb.append("abstract ");
-        if ((mod & STATIC) != 0)        sb.append("static ");
-        if ((mod & FINAL) != 0)         sb.append("final ");
-        if ((mod & TRANSIENT) != 0)     sb.append("transient ");
-        if ((mod & VOLATILE) != 0)      sb.append("volatile ");
-        if ((mod & SYNCHRONIZED) != 0)  sb.append("synchronized ");
-        if ((mod & NATIVE) != 0)        sb.append("native ");
-        if ((mod & STRICT) != 0)        sb.append("strictfp ");
-        if ((mod & INTERFACE) != 0)     sb.append("interface ");
+        if ((mod & ABSTRACT) != 0)      sj.add("abstract");
+        if ((mod & STATIC) != 0)        sj.add("static");
+        if ((mod & FINAL) != 0)         sj.add("final");
+        if ((mod & TRANSIENT) != 0)     sj.add("transient");
+        if ((mod & VOLATILE) != 0)      sj.add("volatile");
+        if ((mod & SYNCHRONIZED) != 0)  sj.add("synchronized");
+        if ((mod & NATIVE) != 0)        sj.add("native");
+        if ((mod & STRICT) != 0)        sj.add("strictfp");
+        if ((mod & INTERFACE) != 0)     sj.add("interface");
 
-        if ((len = sb.length()) > 0)    /* trim trailing space */
-            return sb.toString().substring(0, len-1);
-        return "";
+        return sj.toString();
     }
 
     /*
--- a/jdk/src/share/classes/java/nio/StringCharBuffer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/nio/StringCharBuffer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -100,7 +100,7 @@
     }
 
     final String toString(int start, int end) {
-        return str.toString().substring(start + offset, end + offset);
+        return str.subSequence(start + offset, end + offset).toString();
     }
 
     public final CharBuffer subSequence(int start, int end) {
--- a/jdk/src/share/classes/java/time/chrono/JapaneseEra.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseEra.java	Fri Aug 08 11:36:48 2014 -0700
@@ -127,7 +127,7 @@
 
     // the number of defined JapaneseEra constants.
     // There could be an extra era defined in its configuration.
-    private static final int N_ERA_CONSTANTS = HEISEI.getValue() + ERA_OFFSET + 1;
+    private static final int N_ERA_CONSTANTS = HEISEI.getValue() + ERA_OFFSET;
 
     /**
      * Serialization version.
@@ -148,7 +148,7 @@
         for (int i = N_ERA_CONSTANTS; i < ERA_CONFIG.length; i++) {
             CalendarDate date = ERA_CONFIG[i].getSinceDate();
             LocalDate isoDate = LocalDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth());
-            KNOWN_ERAS[i] = new JapaneseEra(i - ERA_OFFSET, isoDate);
+            KNOWN_ERAS[i] = new JapaneseEra(i - ERA_OFFSET + 1, isoDate);
         }
     };
 
@@ -195,7 +195,7 @@
      * @throws DateTimeException if the value is invalid
      */
     public static JapaneseEra of(int japaneseEra) {
-        if (japaneseEra < MEIJI.eraValue || japaneseEra + ERA_OFFSET - 1 >= KNOWN_ERAS.length) {
+        if (japaneseEra < MEIJI.eraValue || japaneseEra + ERA_OFFSET > KNOWN_ERAS.length) {
             throw new DateTimeException("Invalid era: " + japaneseEra);
         }
         return KNOWN_ERAS[ordinal(japaneseEra)];
--- a/jdk/src/share/classes/java/util/Collections.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/util/Collections.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2342,7 +2342,7 @@
 
         public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
             synchronized (mutex) {
-                return new SynchronizedNavigableSet<>(ns.tailSet(fromElement, inclusive));
+                return new SynchronizedNavigableSet<>(ns.tailSet(fromElement, inclusive), mutex);
             }
         }
     }
@@ -3486,6 +3486,7 @@
          */
         @Override
         public void replaceAll(UnaryOperator<E> operator) {
+            Objects.requireNonNull(operator);
             list.replaceAll(e -> typeCheck(operator.apply(e)));
         }
 
--- a/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -129,9 +129,6 @@
      * Returns the sum of values recorded, or zero if no values have been
      * recorded.
      *
-     * If any recorded value is a NaN or the sum is at any point a NaN
-     * then the sum will be NaN.
-     *
      * <p> The value of a floating-point sum is a function both of the
      * input values as well as the order of addition operations. The
      * order of addition operations of this method is intentionally
@@ -143,6 +140,44 @@
      * numerical sum compared to a simple summation of {@code double}
      * values.
      *
+     * Because of the unspecified order of operations and the
+     * possibility of using differing summation schemes, the output of
+     * this method may vary on the same input values.
+     *
+     * <p>Various conditions can result in a non-finite sum being
+     * computed. This can occur even if the all the recorded values
+     * being summed are finite. If any recorded value is non-finite,
+     * the sum will be non-finite:
+     *
+     * <ul>
+     *
+     * <li>If any recorded value is a NaN, then the final sum will be
+     * NaN.
+     *
+     * <li>If the recorded values contain one or more infinities, the
+     * sum will be infinite or NaN.
+     *
+     * <ul>
+     *
+     * <li>If the recorded values contain infinities of opposite sign,
+     * the sum will be NaN.
+     *
+     * <li>If the recorded values contain infinities of one sign and
+     * an intermediate sum overflows to an infinity of the opposite
+     * sign, the sum may be NaN.
+     *
+     * </ul>
+     *
+     * </ul>
+     *
+     * It is possible for intermediate sums of finite values to
+     * overflow into opposite-signed infinities; if that occurs, the
+     * final sum will be NaN even if the recorded values are all
+     * finite.
+     *
+     * If all the recorded values are zero, the sign of zero is
+     * <em>not</em> guaranteed to be preserved in the final sum.
+     *
      * @apiNote Values sorted by increasing absolute magnitude tend to yield
      * more accurate results.
      *
@@ -193,15 +228,9 @@
      * Returns the arithmetic mean of values recorded, or zero if no
      * values have been recorded.
      *
-     * If any recorded value is a NaN or the sum is at any point a NaN
-     * then the average will be code NaN.
-     *
-     * <p>The average returned can vary depending upon the order in
-     * which values are recorded.
-     *
-     * This method may be implemented using compensated summation or
-     * other technique to reduce the error bound in the {@link #getSum
-     * numerical sum} used to compute the average.
+     * <p> The computed average can vary numerically and have the
+     * special case behavior as computing the sum; see {@link #getSum}
+     * for details.
      *
      * @apiNote Values sorted by increasing absolute magnitude tend to yield
      * more accurate results.
--- a/jdk/src/share/classes/java/util/UUID.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/util/UUID.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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,9 @@
 
 import java.security.*;
 
+import sun.misc.JavaLangAccess;
+import sun.misc.SharedSecrets;
+
 /**
  * A class that represents an immutable universally unique identifier (UUID).
  * A UUID represents a 128-bit value.
@@ -88,6 +91,8 @@
      */
     private final long leastSigBits;
 
+    private static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
     /*
      * The random number generator used by this class to create random
      * based UUIDs. In a holder class to defer initialization until needed.
@@ -189,21 +194,35 @@
      *
      */
     public static UUID fromString(String name) {
-        String[] components = name.split("-");
-        if (components.length != 5)
-            throw new IllegalArgumentException("Invalid UUID string: "+name);
-        for (int i=0; i<5; i++)
-            components[i] = "0x"+components[i];
+        if (name.length() > 36) {
+            throw new IllegalArgumentException("UUID string too large");
+        }
+
+        int dash1 = name.indexOf('-', 0);
+        int dash2 = name.indexOf('-', dash1 + 1);
+        int dash3 = name.indexOf('-', dash2 + 1);
+        int dash4 = name.indexOf('-', dash3 + 1);
+        int dash5 = name.indexOf('-', dash4 + 1);
 
-        long mostSigBits = Long.decode(components[0]).longValue();
+        // For any valid input, dash1 through dash4 will be positive and dash5
+        // negative, but it's enough to check dash4 and dash5:
+        // - if dash1 is -1, dash4 will be -1
+        // - if dash1 is positive but dash2 is -1, dash4 will be -1
+        // - if dash1 and dash2 is positive, dash3 will be -1, dash4 will be
+        //   positive, but so will dash5
+        if (dash4 < 0 || dash5 >= 0) {
+            throw new IllegalArgumentException("Invalid UUID string: " + name);
+        }
+
+        long mostSigBits = Long.parseLong(name, 16, 0, dash1) & 0xffffffffL;
         mostSigBits <<= 16;
-        mostSigBits |= Long.decode(components[1]).longValue();
+        mostSigBits |= Long.parseLong(name, 16, dash1 + 1, dash2) & 0xffffL;
         mostSigBits <<= 16;
-        mostSigBits |= Long.decode(components[2]).longValue();
+        mostSigBits |= Long.parseLong(name, 16, dash2 + 1, dash3) & 0xffffL;
 
-        long leastSigBits = Long.decode(components[3]).longValue();
+        long leastSigBits = Long.parseLong(name, 16, dash3 + 1, dash4) & 0xffffL;
         leastSigBits <<= 48;
-        leastSigBits |= Long.decode(components[4]).longValue();
+        leastSigBits |= Long.parseLong(name, 16, dash4 + 1) & 0xffffffffffffL;
 
         return new UUID(mostSigBits, leastSigBits);
     }
@@ -373,17 +392,17 @@
      * @return  A string representation of this {@code UUID}
      */
     public String toString() {
-        return (digits(mostSigBits >> 32, 8) + "-" +
-                digits(mostSigBits >> 16, 4) + "-" +
-                digits(mostSigBits, 4) + "-" +
-                digits(leastSigBits >> 48, 4) + "-" +
-                digits(leastSigBits, 12));
-    }
-
-    /** Returns val represented by the specified number of hex digits. */
-    private static String digits(long val, int digits) {
-        long hi = 1L << (digits * 4);
-        return Long.toHexString(hi | (val & (hi - 1))).substring(1);
+        char[] chars = new char[36];
+        jla.formatUnsignedLong(mostSigBits >> 32, 4, chars, 0, 8);
+        chars[8] = '-';
+        jla.formatUnsignedLong(mostSigBits >> 16, 4, chars, 9, 4);
+        chars[13] = '-';
+        jla.formatUnsignedLong(mostSigBits, 4, chars, 14, 4);
+        chars[18] = '-';
+        jla.formatUnsignedLong(leastSigBits >> 48, 4, chars, 19, 4);
+        chars[23] = '-';
+        jla.formatUnsignedLong(leastSigBits, 4, chars, 24, 12);
+        return jla.newStringUnsafe(chars);
     }
 
     /**
--- a/jdk/src/share/classes/java/util/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/util/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
 <h2>Related Documentation</h2>
 For overviews, tutorials, examples, guides, and tool documentation, please see:
 <ul>
-    <li><a href="http://www.java.sun.com/docs/books/tutorial/collections/">
+    <li><a href="http://docs.oracle.com/javase/tutorial/collections/index.html">
        <b>Collections Framework Tutorial</b></a>
     <li><a
     href="../../../technotes/guides/collections/designfaq.html"><b>Collections
--- a/jdk/src/share/classes/java/util/stream/DoubleStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/java/util/stream/DoubleStream.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -470,10 +470,7 @@
      * code is not necessarily equivalent to the summation computation
      * done by this method.
      *
-     * <p>If any stream element is a NaN or the sum is at any point a NaN
-     * then the sum will be NaN.
-     *
-     * The value of a floating-point sum is a function both
+     * <p>The value of a floating-point sum is a function both
      * of the input values as well as the order of addition
      * operations. The order of addition operations of this method is
      * intentionally not defined to allow for implementation
@@ -485,6 +482,44 @@
      * numerical sum compared to a simple summation of {@code double}
      * values.
      *
+     * Because of the unspecified order of operations and the
+     * possibility of using differing summation schemes, the output of
+     * this method may vary on the same input elements.
+     *
+     * <p>Various conditions can result in a non-finite sum being
+     * computed. This can occur even if the all the elements
+     * being summed are finite. If any element is non-finite,
+     * the sum will be non-finite:
+     *
+     * <ul>
+     *
+     * <li>If any element is a NaN, then the final sum will be
+     * NaN.
+     *
+     * <li>If the elements contain one or more infinities, the
+     * sum will be infinite or NaN.
+     *
+     * <ul>
+     *
+     * <li>If the elements contain infinities of opposite sign,
+     * the sum will be NaN.
+     *
+     * <li>If the elements contain infinities of one sign and
+     * an intermediate sum overflows to an infinity of the opposite
+     * sign, the sum may be NaN.
+     *
+     * </ul>
+     *
+     * </ul>
+     *
+     * It is possible for intermediate sums of finite values to
+     * overflow into opposite-signed infinities; if that occurs, the
+     * final sum will be NaN even if the elements are all
+     * finite.
+     *
+     * If all the elements are zero, the sign of zero is
+     * <em>not</em> guaranteed to be preserved in the final sum.
+     *
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
@@ -555,15 +590,9 @@
      * mean of elements of this stream, or an empty optional if this
      * stream is empty.
      *
-     * If any recorded value is a NaN or the sum is at any point a NaN
-     * then the average will be NaN.
-     *
-     * <p>The average returned can vary depending upon the order in
-     * which values are recorded.
-     *
-     * This method may be implemented using compensated summation or
-     * other technique to reduce the error bound in the {@link #sum
-     * numerical sum} used to compute the average.
+     * <p>The computed average can vary numerically and have the
+     * special case behavior as computing the sum; see {@link #sum}
+     * for details.
      *
      *  <p>The average is a special case of a <a
      *  href="package-summary.html#Reduction">reduction</a>.
--- a/jdk/src/share/classes/javax/imageio/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/imageio/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -131,8 +131,8 @@
 <li>the number of bands is 1;
 <li>the number of bits per sample is not greater than 8;
 <li>the size of a color component is not greater than 8;
-</ul> </p>
- 
+</ul>
+
 <p>
  By default the GIF writer plug-in creates version "89a" images. This can be
  changed to "87a" by explicitly setting the version in the
--- a/jdk/src/share/classes/javax/imageio/spi/PartiallyOrderedSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/imageio/spi/PartiallyOrderedSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -170,7 +170,7 @@
         while (iter.hasNext()) {
             DigraphNode<E> node = iter.next();
             int inDegree = node.getInDegree();
-            inDegrees.put(node, new Integer(inDegree));
+            inDegrees.put(node, inDegree);
 
             // Add nodes with zero in-degree to the zero list
             if (inDegree == 0) {
@@ -191,7 +191,7 @@
         while (outNodes.hasNext()) {
             DigraphNode<E> node = outNodes.next();
             int inDegree = inDegrees.get(node).intValue() - 1;
-            inDegrees.put(node, new Integer(inDegree));
+            inDegrees.put(node, inDegree);
 
             // If the in-degree has fallen to 0, place the node on the list
             if (inDegree == 0) {
--- a/jdk/src/share/classes/javax/naming/Context.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/Context.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -203,9 +203,7 @@
  * <h2>Application Resource Files</h2>
  *
  * When an application is deployed, it will generally have several
- * codebase directories and JARs in its classpath.  Similarly, when an
- * applet is deployed, it will have a codebase and archives specifying
- * where to find the applet's classes.  JNDI locates (using
+ * codebase directories and JARs in its classpath. JNDI locates (using
  * {@link ClassLoader#getResources <tt>ClassLoader.getResources()</tt>})
  * all <em>application resource files</em> named <tt>jndi.properties</tt>
  * in the classpath.
@@ -236,7 +234,7 @@
  *
  * When JNDI constructs an initial context, the context's environment
  * is initialized with properties defined in the environment parameter
- * passed to the constructor, the system properties, the applet parameters,
+ * passed to the constructor, the system properties,
  * and the application resource files.  See
  * <a href=InitialContext.html#ENVIRONMENT><tt>InitialContext</tt></a>
  * for details.
@@ -268,8 +266,8 @@
  * <p>
  * In this way, each service provider developer can specify a list of
  * factories to use with that service provider. These can be modified by
- * the application resources specified by the deployer of the application
- * or applet, which in turn can be modified by the user.
+ * the application resources specified by the deployer of the application,
+ * which in turn can be modified by the user.
  *
  * @author Rosanna Lee
  * @author Scott Seligman
@@ -822,7 +820,7 @@
      * of the property should be the fully qualified class name
      * of the factory class that will create an initial context.
      * This property may be specified in the environment parameter
-     * passed to the initial context constructor, an applet parameter,
+     * passed to the initial context constructor,
      * a system property, or an application resource file.
      * If it is not specified in any of these sources,
      * <tt>NoInitialContextException</tt> is thrown when an initial
@@ -837,7 +835,6 @@
      * @see NoInitialContextException
      * @see #addToEnvironment(String, Object)
      * @see #removeFromEnvironment(String)
-     * @see #APPLET
      */
     String INITIAL_CONTEXT_FACTORY = "java.naming.factory.initial";
 
@@ -847,8 +844,8 @@
      * of the property should be a colon-separated list of the fully
      * qualified class names of factory classes that will create an object
      * given information about the object.
-     * This property may be specified in the environment, an applet
-     * parameter, a system property, or one or more resource files.
+     * This property may be specified in the environment, a system property,
+     * or one or more resource files.
      *
      * <p> The value of this constant is "java.naming.factory.object".
      *
@@ -856,7 +853,6 @@
      * @see javax.naming.spi.ObjectFactory
      * @see #addToEnvironment(String, Object)
      * @see #removeFromEnvironment(String)
-     * @see #APPLET
      */
     String OBJECT_FACTORIES = "java.naming.factory.object";
 
@@ -866,8 +862,8 @@
      * of the property should be a colon-separated list of the fully
      * qualified class names of state factory classes that will be used
      * to get an object's state given the object itself.
-     * This property may be specified in the environment, an applet
-     * parameter, a system property, or one or more resource files.
+     * This property may be specified in the environment, a system property,
+     * or one or more resource files.
      *
      * <p> The value of this constant is "java.naming.factory.state".
      *
@@ -875,7 +871,6 @@
      * @see javax.naming.spi.StateFactory
      * @see #addToEnvironment(String, Object)
      * @see #removeFromEnvironment(String)
-     * @see #APPLET
      * @since 1.3
      */
     String STATE_FACTORIES = "java.naming.factory.state";
@@ -887,9 +882,8 @@
      * of the property should be a colon-separated list of package
      * prefixes for the class name of the factory class that will create
      * a URL context factory.
-     * This property may be specified in the environment,
-     * an applet parameter, a system property, or one or more
-     * resource files.
+     * This property may be specified in the environment, a system property,
+     * or one or more resource files.
      * The prefix <tt>com.sun.jndi.url</tt> is always appended to
      * the possibly empty list of package prefixes.
      *
@@ -900,8 +894,7 @@
      * @see javax.naming.spi.ObjectFactory
      * @see #addToEnvironment(String, Object)
      * @see #removeFromEnvironment(String)
-     * @see #APPLET
-      */
+     */
     String URL_PKG_PREFIXES = "java.naming.factory.url.pkgs";
 
     /**
@@ -909,8 +902,8 @@
      * for specifying configuration information for the service provider
      * to use. The value of the property should contain a URL string
      * (e.g. "ldap://somehost:389").
-     * This property may be specified in the environment,
-     * an applet parameter, a system property, or a resource file.
+     * This property may be specified in the environment, a system property,
+     * or a resource file.
      * If it is not specified in any of these sources,
      * the default configuration is determined by the service provider.
      *
@@ -918,7 +911,6 @@
      *
      * @see #addToEnvironment(String, Object)
      * @see #removeFromEnvironment(String)
-     * @see #APPLET
      */
     String PROVIDER_URL = "java.naming.provider.url";
 
@@ -926,8 +918,8 @@
      * Constant that holds the name of the environment property
      * for specifying the DNS host and domain names to use for the
      * JNDI URL context (for example, "dns://somehost/wiz.com").
-     * This property may be specified in the environment,
-     * an applet parameter, a system property, or a resource file.
+     * This property may be specified in the environment, a system property,
+     * or a resource file.
      * If it is not specified in any of these sources
      * and the program attempts to use a JNDI URL containing a DNS name,
      * a <tt>ConfigurationException</tt> will be thrown.
@@ -1073,27 +1065,25 @@
     String LANGUAGE = "java.naming.language";
 
     /**
-     * Constant that holds the name of the environment property for
-     * specifying an applet for the initial context constructor to use
-     * when searching for other properties.
-     * The value of this property is the
-     * <tt>java.applet.Applet</tt> instance that is being executed.
-     * This property may be specified in the environment parameter
-     * passed to the initial context constructor.
-     * When this property is set, each property that the initial context
-     * constructor looks for in the system properties is first looked for
-     * in the applet's parameter list.
-     * If this property is unspecified, the initial context constructor
-     * will search for properties only in the environment parameter
-     * passed to it, the system properties, and application resource files.
+     * @deprecated An environment property with this name is ignored
+     *             while constructing an initial context.
+     * This constant was originally used as a property name to specify an
+     * {@code Applet} to retrieve parameters from, when creating an initial
+     * context. Currently any applet properties that need to be passed to an
+     * initial context should be copied into the environment hashtable:
+     * <pre>{@code
+     *     Hashtable env = new Hashtable();
+     *     env.put(Context.INITIAL_CONTEXT_FACTORY,
+     *       ((Applet) this).getParameter(Context.INITIAL_CONTEXT_FACTORY));
+     *     env.put(Context.PROVIDER_URL,
+     *       ((Applet) this).getParameter(Context.PROVIDER_URL));
+     *     // ... other properties ...
      *
-     * <p> The value of this constant is "java.naming.applet".
-     *
-     * @see #addToEnvironment(String, Object)
-     * @see #removeFromEnvironment(String)
-     * @see InitialContext
+     *     Context ctx = new InitialContext(env);
+     * }</pre>
      *
      * @since 1.3
      */
+    @Deprecated
     String APPLET = "java.naming.applet";
 };
--- a/jdk/src/share/classes/javax/naming/InitialContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/InitialContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,21 +41,13 @@
  * is initialized with properties defined in the environment parameter
  * passed to the constructor, and in any
  * <a href=Context.html#RESOURCEFILES>application resource files</a>.
- * In addition, a small number of standard JNDI properties may
- * be specified as system properties or as applet parameters
- * (through the use of {@link Context#APPLET}).
- * These special properties are listed in the field detail sections of the
- * <a href=Context.html#field_detail><tt>Context</tt></a> and
- * <a href=ldap/LdapContext.html#field_detail><tt>LdapContext</tt></a>
- * interface documentation.
  *<p>
  * JNDI determines each property's value by merging
  * the values from the following two sources, in order:
  * <ol>
  * <li>
  * The first occurrence of the property from the constructor's
- * environment parameter and (for appropriate properties) the applet
- * parameters and system properties.
+ * environment parameter and system properties.
  * <li>
  * The application resource files (<tt>jndi.properties</tt>).
  * </ol>
--- a/jdk/src/share/classes/javax/naming/directory/DirContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/directory/DirContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -723,7 +723,7 @@
      * specified set of attributes.
      * This method returns all the attributes of such objects.
      * It is equivalent to supplying null as
-     * the <tt>atributesToReturn</tt> parameter to the method
+     * the <tt>attributesToReturn</tt> parameter to the method
      * <code>search(Name, Attributes, String[])</code>.
      * <br>
      * See {@link #search(Name, Attributes, String[])} for a full description.
--- a/jdk/src/share/classes/javax/naming/ldap/LdapContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/ldap/LdapContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -334,8 +334,8 @@
      * qualified class names of factory classes that will create a control
      * given another control. See
      * <tt>ControlFactory.getControlInstance()</tt> for details.
-     * This property may be specified in the environment, an applet
-     * parameter, a system property, or one or more resource files.
+     * This property may be specified in the environment, a system property,
+     * or one or more resource files.
      *<p>
      * The value of this constant is "java.naming.factory.control".
      *
--- a/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Fri Aug 08 11:36:48 2014 -0700
@@ -421,7 +421,7 @@
         private String type;
         private Object value;
 
-        // If non-null, a cannonical representation of the value suitable
+        // If non-null, a canonical representation of the value suitable
         // for comparison using String.compareTo()
         private String comparable = null;
 
@@ -571,10 +571,10 @@
     }
 
     /**
-     * Given an attribute value string formated according to the rules
+     * Given an attribute value string formatted according to the rules
      * specified in
      * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>,
-     * returns the unformated value.  Escapes and quotes are
+     * returns the unformatted value.  Escapes and quotes are
      * stripped away, and hex-encoded UTF-8 is converted to equivalent
      * UTF-16 characters. Returns a string value as a String, and a
      * binary value as a byte array.
--- a/jdk/src/share/classes/javax/naming/ldap/SortControl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/ldap/SortControl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -188,7 +188,7 @@
     /*
      * Encodes the sort control's value using ASN.1 BER.
      * The result includes the BER tag and length for the control's value but
-     * does not include the control's object identifer and criticality setting.
+     * does not include the control's object identifier and criticality setting.
      *
      * @param   sortKeys    A non-null list of keys to sort by.
      * @return A possibly null byte array representing the ASN.1 BER encoded
--- a/jdk/src/share/classes/javax/naming/spi/NamingManager.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/naming/spi/NamingManager.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -491,7 +491,7 @@
      * (e.g. "ftpURLContextFactory" for the "ftp" scheme-id),
      * in the package specified as follows.
      * The <tt>Context.URL_PKG_PREFIXES</tt> environment property (which
-     * may contain values taken from applet parameters, system properties,
+     * may contain values taken from system properties,
      * or application resource files)
      * contains a colon-separated list of package prefixes.
      * Each package prefix in
@@ -661,8 +661,7 @@
             if (className == null) {
                 NoInitialContextException ne = new NoInitialContextException(
                     "Need to specify class name in environment or system " +
-                    "property, or as an applet parameter, or in an " +
-                    "application resource file:  " +
+                    "property, or in an application resource file: " +
                     Context.INITIAL_CONTEXT_FACTORY);
                 throw ne;
             }
--- a/jdk/src/share/classes/javax/print/Doc.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/Doc.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -168,7 +168,7 @@
      * from the print data representation object.
      * However, if the print data representation object is itself a Reader,
      * then the print data representation object is simply returned.
-     * <P>
+     *
      * @return  Reader for reading the print data characters from this doc.
      *          If a reader cannot be provided because this doc does not meet
      *          the criteria stated above, null is returned.
@@ -192,7 +192,7 @@
      * object as a stream of bytes is created and returned. However, if the
      * print data representation object is itself an input stream, then the
      * print data representation object is simply returned.
-     * <P>
+     *
      * @return  Input stream for reading the print data bytes from this doc. If
      *          an input stream cannot be provided because this doc does not
      *          meet the criteria stated above, null is returned.
--- a/jdk/src/share/classes/javax/print/DocFlavor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -381,7 +381,6 @@
  * <LI>
  * A line feed (LF) character standing by itself means
  * "go to column 1 of the next line."
- * <LI>
  * </UL>
  * <P>
  * The client must itself perform all plain text print data formatting not
@@ -436,7 +435,6 @@
  * Java Print Service instance supports without having
  * to load the representation classes, which may be problematic for
  * limited-resource clients.
- * <P>
  *
  * @author  Alan Kaminsky
  */
@@ -536,7 +534,7 @@
      * The charset for text types is a commonly useful example.
      * This convenience method will return the value of the specified
      * parameter if one was specified in the mime type for this flavor.
-     * <p>
+     *
      * @param paramName the name of the paramater. This name is internally
      * converted to the canonical lower case format before performing
      * the match.
@@ -638,7 +636,6 @@
      * Class DocFlavor.BYTE_ARRAY provides predefined static constant
      * DocFlavor objects for example doc flavors using a byte array
      * (<CODE>byte[]</CODE>) as the print data representation class.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
@@ -836,7 +833,6 @@
      * DocFlavor objects for example doc flavors using a byte stream ({@link
      * java.io.InputStream java.io.InputStream}) as the print
      * data representation class.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
@@ -1038,8 +1034,7 @@
      * objects.
      * For example doc flavors using a Uniform Resource Locator ({@link
      * java.net.URL java.net.URL}) as the print data
-     * representation  class.
-     * <P>
+     * representation class.
      *
      * @author  Alan Kaminsky
      */
@@ -1229,7 +1224,6 @@
      * DocFlavor objects for example doc flavors using a character array
      * (<CODE>char[]</CODE>) as the print data representation class. As such,
      * the character set is Unicode.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
@@ -1279,7 +1273,6 @@
      * objects for example doc flavors using a string ({@link java.lang.String
      * java.lang.String}) as the print data representation class.
      * As such, the character set is Unicode.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
@@ -1327,7 +1320,6 @@
      * objects for example doc flavors using a character stream ({@link
      * java.io.Reader java.io.Reader}) as the print data
      * representation class. As such, the character set is Unicode.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
@@ -1376,7 +1368,6 @@
      * Class DocFlavor.SERVICE_FORMATTED provides predefined static constant
      * DocFlavor objects for example doc flavors for service formatted print
      * data.
-     * <P>
      *
      * @author  Alan Kaminsky
      */
--- a/jdk/src/share/classes/javax/print/PrintService.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/PrintService.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -327,7 +327,6 @@
      * that indicates bounds on the legal values -- used, for example, by an
      * integer-valued attribute that must lie within a certain range.
      * </UL>
-     * <P>
      *
      * @param  category    Printing attribute category to test. It must be a
      *                        {@link java.lang.Class Class} that implements
--- a/jdk/src/share/classes/javax/print/PrintServiceLookup.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/PrintServiceLookup.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -199,7 +199,6 @@
      * available that is not part of the installation.
      * If the lookup service is already registered, or cannot be registered,
      * the method returns false.
-     * <p>
      *
      * @param sp an implementation of a lookup service.
      * @return <code>true</code> if the new lookup service is newly
@@ -305,7 +304,6 @@
     * <p>
     * Locates MultiDoc print services which can be positively confirmed
     * to support the combination of attributes and DocFlavors specified.
-    * <p>
     *
     * @param flavors of documents required. If null or empty it is ignored.
     * @param attributes required to be supported. If null this
--- a/jdk/src/share/classes/javax/print/ServiceUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/ServiceUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -131,8 +131,7 @@
      *    }
      * }
      * }</pre>
-     * <p>
-
+     *
      * @param gc used to select screen. null means primary or default screen.
      * @param x location of dialog including border in screen coordinates
      * @param y location of dialog including border in screen coordinates
--- a/jdk/src/share/classes/javax/print/ServiceUIFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/ServiceUIFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -111,7 +111,7 @@
     /**
      * Get a UI object which may be cast to the requested UI type
      * by the application and used in its user interface.
-     * <P>
+     *
      * @param role requested. Must be one of the standard roles or
      * a private role supported by this factory.
      * @param ui type in which the role is requested.
--- a/jdk/src/share/classes/javax/print/SimpleDoc.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/SimpleDoc.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -176,7 +176,7 @@
      * However, if the print data representation object is itself a
      * <code>Reader</code> then the print data representation object is
      * simply returned.
-     * <P>
+     *
      * @return  a <code>Reader</code> for reading the print data
      *          characters from this doc.
      *          If a reader cannot be provided because this doc does not meet
@@ -224,7 +224,7 @@
      * However, if the print data representation object is itself an
      * input stream then the print data representation object is simply
      * returned.
-     * <P>
+     *
      * @return  an <code>InputStream</code> for reading the print data
      *          bytes from this doc.  If an input stream cannot be
      *          provided because this doc does not meet
--- a/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -95,7 +95,7 @@
      * Although null is an acceptable value to use in the lookup of stream
      * printing services, it's typical to search for a particular
      * desired format, such as Postscript(TM).
-     * <p>
+     *
      * @param flavor of the input document type - null means match all
      * types.
      * @param outputMimeType representing the required output format, used to
@@ -153,7 +153,7 @@
      * Implementations which allocate resources on construction should examine
      * the stream and may wish to only allocate resources if the stream is
      * non-null.
-     * <p>
+     *
      * @param out destination stream for generated output.
      * @return a PrintService which will generate the format specified by the
      * DocFlavor supported by this Factory.
--- a/jdk/src/share/classes/javax/print/attribute/Attribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/Attribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +31,6 @@
  * Interface Attribute is the base interface implemented by any and every
  * printing attribute class to indicate that the class represents a
  * printing attribute. All printing attributes are serializable.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/DateTimeSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/DateTimeSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,6 @@
  * rather than a <code>java.util.Calendar</code> because it typically takes
  * less memory to store and less time to compare a <code>java.util.Date</code>
  * than a <code>java.util.Calendar</code>.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/DocAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/DocAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -36,7 +36,6 @@
  * PrintRequestAttribute} as well as DocAttribute, the client may include the
  * attribute in a attribute set which specifies a print job
  * to specify a characteristic for all the docs in that job.
- * <P>
  *
  * @see DocAttributeSet
  * @see PrintRequestAttributeSet
--- a/jdk/src/share/classes/javax/print/attribute/DocAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/DocAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -40,7 +40,6 @@
  * The {@link #add(Attribute) add(Attribute)}, and
  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  * are respecified below to guarantee this additional invariant.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/EnumSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/EnumSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -102,7 +102,6 @@
  * uses some of the same integer values as the superclass. However, the
  * application in which the enumeration class and subclass are used may need to
  * have distinct integer values in the superclass and subclass.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/HashAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/HashAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,7 +34,6 @@
 /**
  * Class HashAttributeSet provides an <code>AttributeSet</code>
  * implementation with characteristics of a hash map.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/HashDocAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/HashDocAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +33,6 @@
  * inherits its implementation from class {@link HashAttributeSet
  * HashAttributeSet} and enforces the semantic restrictions of interface {@link
  * DocAttributeSet DocAttributeSet}.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/HashPrintJobAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/HashPrintJobAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +33,6 @@
  * which inherits its implementation from class {@link HashAttributeSet
  * HashAttributeSet} and enforces the semantic restrictions of interface
  * {@link PrintJobAttributeSet PrintJobAttributeSet}.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/HashPrintRequestAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/HashPrintRequestAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +33,6 @@
  * class {@link HashAttributeSet HashAttributeSet} and enforces the
  * semantic restrictions of interface
  * {@link PrintRequestAttributeSet PrintRequestAttributeSet}.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/HashPrintServiceAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/HashPrintServiceAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +32,6 @@
  * which inherits its implementation from class {@link HashAttributeSet
  * HashAttributeSet} and enforces the semantic restrictions of interface
  * {@link PrintServiceAttributeSet PrintServiceAttributeSet}.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/IntegerSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/IntegerSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +37,6 @@
  * established when it is constructed (see {@link #IntegerSyntax(int)
  * IntegerSyntax(int)}). Once constructed, an integer attribute's
  * value is immutable.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/PrintJobAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintJobAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -34,7 +34,6 @@
  * PrintRequestAttribute PrintRequestAttribute} as well as PrintJobAttribute,
  * the client may include the attribute in a attribute set to
  * specify the attribute's value for the Print Job.
- * <P>
  *
  * @see PrintRequestAttributeSet
  * @see PrintJobAttributeSet
--- a/jdk/src/share/classes/javax/print/attribute/PrintJobAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintJobAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -39,7 +39,6 @@
  * The {@link #add(Attribute) add(Attribute)}, and
  * {@link #addAll(AttributeSet) >addAll(AttributeSet)} operations
  * are respecified below to guarantee this additional invariant.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/PrintRequestAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintRequestAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -39,7 +39,6 @@
  * as well as PrintRequestAttribute, the client may include the
  * attribute in a <code>Doc</code>}'s attribute set to specify
  * a job setting which pertains just to that doc.
- * <P>
  *
  * @see DocAttributeSet
  * @see PrintRequestAttributeSet
--- a/jdk/src/share/classes/javax/print/attribute/PrintRequestAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintRequestAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -40,7 +40,6 @@
  * The {@link #add(Attribute) add(Attribute)}, and
  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  * are respecified below to guarantee this additional invariant.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/PrintServiceAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintServiceAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +31,6 @@
  * of a Print Service or some other characteristic of a Print Service. A Print
  * Service instance adds a number of PrintServiceAttributes to a Print
  * service's attribute set to report the Print Service's status.
- * <P>
  *
  * @see PrintServiceAttributeSet
  *
--- a/jdk/src/share/classes/javax/print/attribute/PrintServiceAttributeSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/PrintServiceAttributeSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * The {@link #add(Attribute) add(Attribute)}, and
  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  * are respecified below to guarantee this additional invariant.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/ResolutionSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/ResolutionSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -78,7 +78,6 @@
  * mind, there is no guarantee that the conversion factor for the client's units
  * will be an exact integer. If the conversion factor isn't an exact integer,
  * resolution values in the client's units won't be stored precisely.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -75,7 +75,6 @@
  * Class SetOfIntegerSyntax has operations to return the set's members in
  * canonical array form, to test whether a given integer is a member of the
  * set, and to iterate through the members of the set.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/Size2DSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/Size2DSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -77,7 +77,6 @@
  * client's units will be an exact integer. If the conversion factor isn't an
  * exact integer, resolution values in the client's units won't be stored
  * precisely.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/SupportedValuesAttribute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/SupportedValuesAttribute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -36,7 +36,6 @@
  * which is a SupportedValuesAttribute giving the legal values a client may
  * specify for the {@link javax.print.attribute.standard.Copies Copies}
  * attribute.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/TextSyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/TextSyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -35,7 +35,6 @@
  * includes a locale to indicate the natural language. Thus, a text attribute
  * always represents a localized string. Once constructed, a text attribute's
  * value is immutable.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/URISyntax.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/URISyntax.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +33,6 @@
  * Class URISyntax is an abstract base class providing the common
  * implementation of all attributes whose value is a Uniform Resource
  * Identifier (URI). Once constructed, a URI attribute's value is immutable.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -3,7 +3,7 @@
 <head>
 <title>javax.print.attribute package</title>
 <!--
-Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2014, 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
@@ -398,7 +398,7 @@
 in a run time exception either immediately or at some later time.
 IllegalArgumentException and NullPointerException are examples of
 typical and acceptable run time exceptions for such cases.
-<P>
+
 @since 1.4
 </body>
 </html>
--- a/jdk/src/share/classes/javax/print/attribute/standard/ColorSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/ColorSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -52,7 +52,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/Compression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Compression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,7 +40,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/CopiesSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/CopiesSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -40,7 +40,6 @@
  * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
  * explanation of canonical array form. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtCompleted.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtCompleted.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * "date-time-at-completed" attribute can be obtained as described above. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtCreation.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtCreation.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * "date-time-at-creation" attribute can be obtained as described above. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtProcessing.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/DateTimeAtProcessing.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * "date-time-at-processing" attribute can be obtained as described above. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/Destination.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Destination.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -50,7 +50,6 @@
  * cause.
  * <P>
  * <B>IPP Compatibility:</B> Destination is not an IPP attribute.
- * <P>
  *
  * @author  Phil Race.
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/DialogTypeSelection.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/DialogTypeSelection.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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,9 +46,8 @@
  * or even printer specific options.
  * <P>
  * <B>IPP Compatibility:</B> This is not an IPP attribute.
- * <P>
+ *
  * @since 1.7
- *
  */
 public final class DialogTypeSelection extends EnumSyntax
         implements PrintRequestAttribute {
--- a/jdk/src/share/classes/javax/print/attribute/standard/DocumentName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/DocumentName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -43,7 +43,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobHoldUntil.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobHoldUntil.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -78,7 +78,6 @@
  * for example, a JobHoldUntil value with today's date and 9:00pm local time
  * might be converted to the standard IPP keyword "night". The category name
  * returned by <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobImpressions.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobImpressions.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -65,7 +65,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobImpressionsSupported
  * @see JobImpressionsCompleted
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobImpressionsCompleted.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobImpressionsCompleted.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobImpressions
  * @see JobImpressionsSupported
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobImpressionsSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobImpressionsSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
  * explanation of canonical array form. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -117,7 +117,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobKOctetsSupported
  * @see JobKOctetsProcessed
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobKOctetsProcessed.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobKOctetsProcessed.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -59,7 +59,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobKOctets
  * @see JobKOctetsSupported
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobKOctetsSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobKOctetsSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
  * explanation of canonical array form. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheets.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheets.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -57,7 +57,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobMediaSheetsSupported
  * @see JobMediaSheetsCompleted
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheetsCompleted.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheetsCompleted.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @see JobMediaSheets
  * @see JobMediaSheetsSupported
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheetsSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobMediaSheetsSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
  * explanation of canonical array form. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobMessageFromOperator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobMessageFromOperator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -48,7 +48,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobOriginatingUserName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobOriginatingUserName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,7 +47,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobPriority.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobPriority.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobPrioritySupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobPrioritySupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -44,7 +44,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value.
  * The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobSheets.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobSheets.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,6 @@
  * <code>toString()</code> method returns the IPP string representation of
  * the attribute value. For a subclass, the attribute value must be
  * localized to give the IPP name and natural language values.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobState.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobState.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReason.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReason.java	Fri Aug 08 11:36:48 2014 -0700
@@ -51,7 +51,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,6 @@
  * JobStateReason JobStateReason} object's <CODE>toString()</CODE> method gives
  * the IPP keyword value. The category name returned by <CODE>getName()</CODE>
  * gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/Media.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Media.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -52,7 +52,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author Phil Race
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +46,6 @@
  * to find the physical dimensions of the MediaSizeName instances
  * enumerated in this API. This is useful for clients which need this
  * information to format {@literal &} paginate printing.
- * <P>
  *
  * @author  Phil Race, Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/NumberOfDocuments.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/NumberOfDocuments.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +37,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/NumberOfInterveningJobs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/NumberOfInterveningJobs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +37,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value.
  * The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/NumberUpSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/NumberUpSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -38,7 +38,6 @@
  * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an
  * explanation of canonical array form. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/OrientationRequested.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/OrientationRequested.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -58,7 +58,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/OutputDeviceAssigned.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/OutputDeviceAssigned.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -43,7 +43,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PDLOverrideSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PDLOverrideSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PagesPerMinute.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PagesPerMinute.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -39,7 +39,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PagesPerMinuteColor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PagesPerMinuteColor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -50,7 +50,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  * name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PresentationDirection.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PresentationDirection.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -45,7 +45,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Phil Race.
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrintQuality.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrintQuality.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterIsAcceptingJobs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterIsAcceptingJobs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -43,7 +43,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterLocation.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterLocation.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -38,7 +38,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMakeAndModel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMakeAndModel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -36,7 +36,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMessageFromOperator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMessageFromOperator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -51,7 +51,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfo.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfo.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -49,7 +49,6 @@
  * <CODE>toString()</CODE>  gives the IPP uri value.
  * The category name returned by <CODE>getName()</CODE>
  * gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -49,7 +49,6 @@
  * <CODE>toString()</CODE> gives the IPP uri value.
  * The category name returned by <CODE>getName()</CODE>
  * gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +41,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -64,7 +64,6 @@
  * <CODE>"printer-resolution"</CODE> attribute can be obtained by calling
  * methods on the PrinterResolution object. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  David Mendenhall
  * @author  Alan Kaminsky
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterState.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterState.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -42,7 +42,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,6 @@
  * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
  * The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -77,7 +77,6 @@
  * together with a hyphen (<CODE>"-"</CODE>) in between, gives the IPP keyword
  * value. The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterURI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterURI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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,7 +41,6 @@
  * <CODE>toString()</CODE>  gives the IPP printer-uri value.
  * The category name returned by <CODE>getName()</CODE>
  * gives the IPP attribute name.
- * <P>
  *
  * @author  Robert Herriot
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/QueuedJobCount.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/QueuedJobCount.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -36,7 +36,6 @@
  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value.
  * The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/ReferenceUriSchemesSupported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -55,7 +55,6 @@
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/RequestingUserName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/RequestingUserName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -48,7 +48,6 @@
  * <B>IPP Compatibility:</B> The string value gives the IPP name value. The
  * locale gives the IPP natural language. The category name returned by
  * <CODE>getName()</CODE> gives the IPP attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/Severity.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Severity.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -58,7 +58,6 @@
  * between, gives the IPP keyword value for a {@link PrinterStateReasons}.
  * The category name returned by <CODE>getName()</CODE> gives the IPP
  * attribute name.
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -149,7 +149,6 @@
  * </UL>
  * <P>
  * <B>IPP Compatibility:</B> SheetCollate is not an IPP attribute at present.
- * <P>
  *
  * @see  MultipleDocumentHandling
  *
--- a/jdk/src/share/classes/javax/print/attribute/standard/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/attribute/standard/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -3,7 +3,7 @@
 <head>
 <title>javax.print.attribute.standard package</title>
 <!--
-Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2014, 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
@@ -286,7 +286,7 @@
 in a run time exception either immediately or at some later time.
 IllegalArgumentException and NullPointerException are examples of
 typical and acceptable run time exceptions for such cases.
-<P>
+
 @since 1.4
 </body>
 </html>
--- a/jdk/src/share/classes/javax/print/event/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/event/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -3,7 +3,7 @@
 <head>
 <title>javax.print.event package</title>
 <!--
-Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2014, 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
@@ -39,7 +39,7 @@
 in a run time exception either immediately or at some later time.
 IllegalArgumentException and NullPointerException are examples of
 typical and acceptable run time exceptions for such cases.
-<P>
+
 @since 1.4
 </body>
 </html>
--- a/jdk/src/share/classes/javax/print/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/print/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -3,7 +3,7 @@
 <head>
 <title>javax.print package</title>
 <!--
-Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2014, 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
@@ -141,7 +141,7 @@
 in a run time exception either immediately or at some later time.
 IllegalArgumentException and NullPointerException are examples of
 typical and acceptable run time exceptions for such cases.
-<P>
+
 @since 1.4
 </body>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/EncryptionKey.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2014, 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 javax.security.auth.kerberos;
+
+import java.util.Arrays;
+import java.util.Objects;
+import javax.crypto.SecretKey;
+import javax.security.auth.DestroyFailedException;
+
+/**
+ * This class encapsulates an EncryptionKey used in Kerberos.<p>
+ *
+ * An EncryptionKey is defined in Section 4.2.9 of the Kerberos Protocol
+ * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
+ * <pre>
+ *     EncryptionKey   ::= SEQUENCE {
+ *             keytype         [0] Int32 -- actually encryption type --,
+ *             keyvalue        [1] OCTET STRING
+ *     }
+ * </pre>
+ * The key material of an {@code EncryptionKey} is defined as the value
+ * of the {@code keyValue} above.<p>
+ *
+ * @since 1.9
+ */
+public final class EncryptionKey implements SecretKey {
+
+    private static final long serialVersionUID = 9L;
+
+   /**
+    * {@code KeyImpl} is serialized by writing out the ASN.1 encoded bytes
+    * of the encryption key.
+    *
+    * @serial
+    */
+    final private KeyImpl key;
+
+    private transient boolean destroyed = false;
+
+    /**
+     * Constructs a {@code EncryptionKey} from the given bytes and
+     * the key type.
+     * <p>
+     * The contents of the byte array are copied; subsequent modification of
+     * the byte array does not affect the newly created key.
+     *
+     * @param keyBytes the key material for the key
+     * @param keyType the key type for the key as defined by the
+     *                Kerberos protocol specification.
+     * @throws NullPointerException if keyBytes is null
+     */
+    public EncryptionKey(byte[] keyBytes, int keyType) {
+        key = new KeyImpl(Objects.requireNonNull(keyBytes), keyType);
+    }
+
+    /**
+     * Returns the key type for this key.
+     *
+     * @return the key type.
+     * @throws IllegalStateException if the key is destroyed
+     */
+    public int getKeyType() {
+        // KeyImpl already checked if destroyed
+        return key.getKeyType();
+    }
+
+    /*
+     * Methods from java.security.Key
+     */
+
+    /**
+     * Returns the standard algorithm name for this key. The algorithm names
+     * are the encryption type string defined on the IANA
+     * <a href="https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-1">Kerberos Encryption Type Numbers</a>
+     * page.
+     * <p>
+     * This method can return the following value not defined on the IANA page:
+     * <ol>
+     *     <li>none: for etype equal to 0</li>
+     *     <li>unknown: for etype greater than 0 but unsupported by
+     *         the implementation</li>
+     *     <li>private: for etype smaller than 0</li>
+     * </ol>
+     *
+     * @return the name of the algorithm associated with this key.
+     * @throws IllegalStateException if the key is destroyed
+     */
+    @Override
+    public String getAlgorithm() {
+        // KeyImpl already checked if destroyed
+        return key.getAlgorithm();
+    }
+
+    /**
+     * Returns the name of the encoding format for this key.
+     *
+     * @return the String "RAW"
+     * @throws IllegalStateException if the key is destroyed
+     */
+    @Override
+    public String getFormat() {
+        // KeyImpl already checked if destroyed
+        return key.getFormat();
+    }
+
+    /**
+     * Returns the key material of this key.
+     *
+     * @return a newly allocated byte array that contains the key material
+     * @throws IllegalStateException if the key is destroyed
+     */
+    @Override
+    public byte[] getEncoded() {
+        // KeyImpl already checked if destroyed
+        return key.getEncoded();
+    }
+
+    /**
+     * Destroys this key by clearing out the key material of this key.
+     *
+     * @throws DestroyFailedException if some error occurs while destorying
+     * this key.
+     */
+    @Override
+    public void destroy() throws DestroyFailedException {
+        if (!destroyed) {
+            key.destroy();
+            destroyed = true;
+        }
+    }
+
+
+    @Override
+    public boolean isDestroyed() {
+        return destroyed;
+    }
+
+    @Override
+    public String toString() {
+        if (destroyed) {
+            return "Destroyed EncryptionKey";
+        }
+        return "key "  + key.toString();
+    }
+
+    @Override
+    public int hashCode() {
+        int result = 17;
+        if (isDestroyed()) {
+            return result;
+        }
+        result = 37 * result + Arrays.hashCode(getEncoded());
+        return 37 * result + getKeyType();
+    }
+
+    /**
+     * Compares the specified Object with this key for equality.
+     * Returns true if the given object is also a
+     * {@code EncryptionKey} and the two
+     * {@code EncryptionKey} instances are equivalent.
+     *
+     * @param other the Object to compare to
+     * @return true if the specified object is equal to this EncryptionKey,
+     * false otherwise. NOTE: Returns false if either of the EncryptionKey
+     * objects has been destroyed.
+     */
+    @Override
+    public boolean equals(Object other) {
+
+        if (other == this)
+            return true;
+
+        if (! (other instanceof EncryptionKey)) {
+            return false;
+        }
+
+        EncryptionKey otherKey = ((EncryptionKey) other);
+        if (isDestroyed() || otherKey.isDestroyed()) {
+            return false;
+        }
+
+        return getKeyType() == otherKey.getKeyType()
+                && Arrays.equals(getEncoded(), otherKey.getEncoded());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosCredMessage.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2014, 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 javax.security.auth.kerberos;
+
+import javax.security.auth.Destroyable;
+import java.util.Arrays;
+import java.util.Base64;
+import java.util.Objects;
+
+/**
+ * This class encapsulates a Kerberos 5 KRB_CRED message which can be used to
+ * send Kerberos credentials from one principal to another.<p>
+ *
+ * A KRB_CRED message is defined in Section 5.8.1 of the Kerberos Protocol
+ * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
+ * <pre>
+ *    KRB-CRED        ::= [APPLICATION 22] SEQUENCE {
+ *            pvno            [0] INTEGER (5),
+ *            msg-type        [1] INTEGER (22),
+ *            tickets         [2] SEQUENCE OF Ticket,
+ *            enc-part        [3] EncryptedData -- EncKrbCredPart
+ *    }
+ * </pre><p>
+ *
+ * @since 1.9
+ */
+public final class KerberosCredMessage implements Destroyable {
+
+    final private KerberosPrincipal sender;
+    final private KerberosPrincipal recipient;
+    final private byte[] message;
+
+    private boolean destroyed = false;
+
+    /**
+     * Constructs a {@code KerberosCredMessage} object.
+     * <p>
+     * The contents of the {@code message} argument are copied; subsequent
+     * modification of the byte array does not affect the newly created object.
+     *
+     * @param sender the sender of the message
+     * @param recipient the recipient of the message
+     * @param message the DER encoded KRB_CRED message
+     * @throws NullPointerException if any of sender, recipient
+     *                              or message is null
+     */
+    public KerberosCredMessage(KerberosPrincipal sender,
+                               KerberosPrincipal recipient,
+                               byte[] message) {
+        this.sender = Objects.requireNonNull(sender);
+        this.recipient = Objects.requireNonNull(recipient);
+        this.message = Objects.requireNonNull(message).clone();
+    }
+
+    /**
+     * Returns the DER encoded form of the KRB_CRED message.
+     *
+     * @return a newly allocated byte array that contains the encoded form
+     * @throws IllegalStateException if the object is destroyed
+     */
+    public byte[] getEncoded() {
+        if (destroyed) {
+            throw new IllegalStateException("This object is no longer valid");
+        }
+        return message.clone();
+    }
+
+    /**
+     * Returns the sender of this message.
+     *
+     * @return the sender
+     * @throws IllegalStateException if the object is destroyed
+     */
+    public KerberosPrincipal getSender() {
+        if (destroyed) {
+            throw new IllegalStateException("This object is no longer valid");
+        }
+        return sender;
+    }
+
+    /**
+     * Returns the recipient of this message.
+     *
+     * @return the recipient
+     * @throws IllegalStateException if the object is destroyed
+     */
+    public KerberosPrincipal getRecipient() {
+        if (destroyed) {
+            throw new IllegalStateException("This object is no longer valid");
+        }
+        return recipient;
+    }
+
+    /**
+     * Destroys this object by clearing out the message.
+     */
+    @Override
+    public void destroy() {
+        if (!destroyed) {
+            Arrays.fill(message, (byte)0);
+            destroyed = true;
+        }
+    }
+
+    @Override
+    public boolean isDestroyed() {
+        return destroyed;
+    }
+
+    @Override
+    public String toString() {
+        if (destroyed) {
+            return "Destroyed KerberosCredMessage";
+        } else {
+            return "KRB_CRED from " + sender + " to " + recipient + ":\n"
+                    + Base64.getUrlEncoder().encodeToString(message);
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        if (isDestroyed()) {
+            return -1;
+        } else {
+            return Objects.hash(sender, recipient, Arrays.hashCode(message));
+        }
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+
+        if (! (other instanceof KerberosCredMessage)) {
+            return false;
+        }
+
+        KerberosCredMessage otherMessage = ((KerberosCredMessage) other);
+        if (isDestroyed() || otherMessage.isDestroyed()) {
+            return false;
+        }
+
+        return Objects.equals(sender, otherMessage.sender)
+                && Objects.equals(recipient, otherMessage.recipient)
+                && Arrays.equals(message, otherMessage.message);
+    }
+}
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,13 +27,27 @@
 
 import java.util.Arrays;
 import javax.crypto.SecretKey;
-import javax.security.auth.Destroyable;
 import javax.security.auth.DestroyFailedException;
 
 /**
  * This class encapsulates a long term secret key for a Kerberos
  * principal.<p>
  *
+ * A {@code KerberosKey} object includes an EncryptionKey, a
+ * {@link KerberosPrincipal} as its owner, and the version number
+ * of the key.<p>
+ *
+ * An EncryptionKey is defined in Section 4.2.9 of the Kerberos Protocol
+ * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
+ * <pre>
+ *     EncryptionKey   ::= SEQUENCE {
+ *             keytype         [0] Int32 -- actually encryption type --,
+ *             keyvalue        [1] OCTET STRING
+ *     }
+ * </pre>
+ * The key material of a {@code KerberosKey} is defined as the value
+ * of the {@code keyValue} above.<p>
+ *
  * All Kerberos JAAS login modules that obtain a principal's password and
  * generate the secret key from it should use this class.
  * Sometimes, such as when authenticating a server in
@@ -70,7 +84,7 @@
  * @author Mayank Upadhyay
  * @since 1.4
  */
-public class KerberosKey implements SecretKey, Destroyable {
+public class KerberosKey implements SecretKey {
 
     private static final long serialVersionUID = -4625402278148246993L;
 
@@ -89,15 +103,8 @@
     private final int versionNum;
 
    /**
-    * {@code KeyImpl} is serialized by writing out the ASN1 Encoded bytes
+    * {@code KeyImpl} is serialized by writing out the ASN.1 encoded bytes
     * of the encryption key.
-    * The ASN1 encoding is defined in RFC4120 and as  follows:
-    * <pre>
-    * EncryptionKey   ::= SEQUENCE {
-    *           keytype   [0] Int32 -- actually encryption type --,
-    *           keyvalue  [1] OCTET STRING
-    * }
-    * </pre>
     *
     * @serial
     */
@@ -111,7 +118,7 @@
      * key information from a Kerberos "keytab".
      *
      * @param principal the principal that this secret key belongs to
-     * @param keyBytes the raw bytes for the secret key
+     * @param keyBytes the key material for the secret key
      * @param keyType the key type for the secret key as defined by the
      * Kerberos protocol specification.
      * @param versionNum the version number of this secret key
@@ -153,10 +160,12 @@
      * Returns the principal that this key belongs to.
      *
      * @return the principal this key belongs to.
+     * @throws IllegalStateException if the key is destroyed
      */
     public final KerberosPrincipal getPrincipal() {
-        if (destroyed)
+        if (destroyed) {
             throw new IllegalStateException("This key is no longer valid");
+        }
         return principal;
     }
 
@@ -164,10 +173,12 @@
      * Returns the key version number.
      *
      * @return the key version number.
+     * @throws IllegalStateException if the key is destroyed
      */
     public final int getVersionNumber() {
-        if (destroyed)
+        if (destroyed) {
             throw new IllegalStateException("This key is no longer valid");
+        }
         return versionNum;
     }
 
@@ -175,10 +186,10 @@
      * Returns the key type for this long-term key.
      *
      * @return the key type.
+     * @throws IllegalStateException if the key is destroyed
      */
     public final int getKeyType() {
-        if (destroyed)
-            throw new IllegalStateException("This key is no longer valid");
+        // KeyImpl already checked if destroyed
         return key.getKeyType();
     }
 
@@ -201,10 +212,10 @@
      * </ol>
      *
      * @return the name of the algorithm associated with this key.
+     * @throws IllegalStateException if the key is destroyed
      */
     public final String getAlgorithm() {
-        if (destroyed)
-            throw new IllegalStateException("This key is no longer valid");
+        // KeyImpl already checked if destroyed
         return key.getAlgorithm();
     }
 
@@ -212,10 +223,10 @@
      * Returns the name of the encoding format for this secret key.
      *
      * @return the String "RAW"
+     * @throws IllegalStateException if the key is destroyed
      */
     public final String getFormat() {
-        if (destroyed)
-            throw new IllegalStateException("This key is no longer valid");
+        // KeyImpl already checked if destroyed
         return key.getFormat();
     }
 
@@ -223,16 +234,15 @@
      * Returns the key material of this secret key.
      *
      * @return the key material
+     * @throws IllegalStateException if the key is destroyed
      */
     public final byte[] getEncoded() {
-        if (destroyed)
-            throw new IllegalStateException("This key is no longer valid");
+        // KeyImpl already checked if destroyed
         return key.getEncoded();
     }
 
     /**
-     * Destroys this key. A call to any of its other methods after this
-     * will cause an  IllegalStateException to be thrown.
+     * Destroys this key by clearing out the key material of this secret key.
      *
      * @throws DestroyFailedException if some error occurs while destorying
      * this key.
@@ -253,9 +263,9 @@
 
     public String toString() {
         if (destroyed) {
-            return "Destroyed Principal";
+            return "Destroyed KerberosKey";
         }
-        return "Kerberos Principal " + principal.toString() +
+        return "Kerberos Principal " + principal +
                 "Key Version " + versionNum +
                 "key "  + key.toString();
     }
@@ -293,8 +303,9 @@
      */
     public boolean equals(Object other) {
 
-        if (other == this)
+        if (other == this) {
             return true;
+        }
 
         if (! (other instanceof KerberosKey)) {
             return false;
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,9 +35,6 @@
 import javax.security.auth.RefreshFailedException;
 import javax.security.auth.DestroyFailedException;
 import sun.misc.HexDumpEncoder;
-import sun.security.krb5.EncryptionKey;
-import sun.security.krb5.Asn1Exception;
-import sun.security.util.*;
 
 /**
  * This class encapsulates a Kerberos ticket and associated
@@ -253,9 +250,10 @@
                          Date endTime,
                          Date renewTill,
                          InetAddress[] clientAddresses) {
-        if (sessionKey == null)
-           throw new IllegalArgumentException("Session key for ticket"
-                                              + " cannot be null");
+        if (sessionKey == null) {
+            throw new IllegalArgumentException("Session key for ticket"
+                    + " cannot be null");
+        }
         init(asn1Encoding, client, server,
              new KeyImpl(sessionKey, keyType), flags, authTime,
              startTime, endTime, renewTill, clientAddresses);
@@ -271,41 +269,46 @@
                          Date endTime,
                          Date renewTill,
                          InetAddress[] clientAddresses) {
-        if (asn1Encoding == null)
-           throw new IllegalArgumentException("ASN.1 encoding of ticket"
-                                              + " cannot be null");
+        if (asn1Encoding == null) {
+            throw new IllegalArgumentException("ASN.1 encoding of ticket"
+                    + " cannot be null");
+        }
         this.asn1Encoding = asn1Encoding.clone();
 
-        if (client == null)
-           throw new IllegalArgumentException("Client name in ticket"
-                                              + " cannot be null");
+        if (client == null) {
+            throw new IllegalArgumentException("Client name in ticket"
+                    + " cannot be null");
+        }
         this.client = client;
 
-        if (server == null)
-           throw new IllegalArgumentException("Server name in ticket"
-                                              + " cannot be null");
+        if (server == null) {
+            throw new IllegalArgumentException("Server name in ticket"
+                    + " cannot be null");
+        }
         this.server = server;
 
         // Caller needs to make sure `sessionKey` will not be null
         this.sessionKey = sessionKey;
 
         if (flags != null) {
-           if (flags.length >= NUM_FLAGS)
-                this.flags = flags.clone();
-           else {
+           if (flags.length >= NUM_FLAGS) {
+               this.flags = flags.clone();
+           } else {
                 this.flags = new boolean[NUM_FLAGS];
                 // Fill in whatever we have
-                for (int i = 0; i < flags.length; i++)
+                for (int i = 0; i < flags.length; i++) {
                     this.flags[i] = flags[i];
+                }
            }
-        } else
-           this.flags = new boolean[NUM_FLAGS];
+        } else {
+            this.flags = new boolean[NUM_FLAGS];
+        }
 
         if (this.flags[RENEWABLE_TICKET_FLAG]) {
-           if (renewTill == null)
-                throw new IllegalArgumentException("The renewable period "
+           if (renewTill == null) {
+               throw new IllegalArgumentException("The renewable period "
                        + "end time cannot be null for renewable tickets.");
-
+           }
            this.renewTill = new Date(renewTill.getTime());
         }
 
@@ -318,13 +321,15 @@
             this.startTime = this.authTime;
         }
 
-        if (endTime == null)
-           throw new IllegalArgumentException("End time for ticket validity"
-                                              + " cannot be null");
+        if (endTime == null) {
+            throw new IllegalArgumentException("End time for ticket validity"
+                    + " cannot be null");
+        }
         this.endTime = new Date(endTime.getTime());
 
-        if (clientAddresses != null)
-           this.clientAddresses = clientAddresses.clone();
+        if (clientAddresses != null) {
+            this.clientAddresses = clientAddresses.clone();
+        }
     }
 
     /**
@@ -346,14 +351,17 @@
     }
 
     /**
-     * Returns the session key associated with this ticket.
+     * Returns the session key associated with this ticket. The return value
+     * is always a {@link EncryptionKey} object.
      *
      * @return the session key.
      */
     public final SecretKey getSessionKey() {
-        if (destroyed)
+        if (destroyed) {
             throw new IllegalStateException("This ticket is no longer valid");
-        return sessionKey;
+        }
+        return new EncryptionKey(
+                sessionKey.getEncoded(), sessionKey.getKeyType());
     }
 
     /**
@@ -366,8 +374,9 @@
      * @see #getSessionKey()
      */
     public final int getSessionKeyType() {
-        if (destroyed)
+        if (destroyed) {
             throw new IllegalStateException("This ticket is no longer valid");
+        }
         return sessionKey.getKeyType();
     }
 
@@ -508,8 +517,9 @@
      * @return an ASN.1 encoding of the entire ticket.
      */
     public final byte[] getEncoded() {
-        if (destroyed)
+        if (destroyed) {
             throw new IllegalStateException("This ticket is no longer valid");
+        }
         return asn1Encoding.clone();
     }
 
@@ -539,16 +549,17 @@
      */
     public void refresh() throws RefreshFailedException {
 
-        if (destroyed)
+        if (destroyed) {
             throw new RefreshFailedException("A destroyed ticket "
-                                             + "cannot be renewd.");
-
-        if (!isRenewable())
+                    + "cannot be renewd.");
+        }
+        if (!isRenewable()) {
             throw new RefreshFailedException("This ticket is not renewable");
-
-        if (System.currentTimeMillis() > getRenewTill().getTime())
+        }
+        if (System.currentTimeMillis() > getRenewTill().getTime()) {
             throw new RefreshFailedException("This ticket is past "
-                                             + "its last renewal time.");
+                                           + "its last renewal time.");
+        }
         Throwable e = null;
         sun.security.krb5.Credentials krb5Creds = null;
 
@@ -634,8 +645,9 @@
     }
 
     public String toString() {
-        if (destroyed)
-            throw new IllegalStateException("This ticket is no longer valid");
+        if (destroyed) {
+            return "Destroyed KerberosTicket";
+        }
         StringBuilder caddrString = new StringBuilder();
         if (clientAddresses != null) {
             for (int i = 0; i < clientAddresses.length; i++) {
@@ -715,8 +727,9 @@
      */
     public boolean equals(Object other) {
 
-        if (other == this)
+        if (other == this) {
             return true;
+        }
 
         if (! (other instanceof KerberosTicket)) {
             return false;
@@ -731,7 +744,7 @@
                 !endTime.equals(otherTicket.getEndTime()) ||
                 !server.equals(otherTicket.getServer()) ||
                 !client.equals(otherTicket.getClient()) ||
-                !sessionKey.equals(otherTicket.getSessionKey()) ||
+                !sessionKey.equals(otherTicket.sessionKey) ||
                 !Arrays.equals(clientAddresses, otherTicket.getClientAddresses()) ||
                 !Arrays.equals(flags, otherTicket.getFlags())) {
             return false;
@@ -739,35 +752,41 @@
 
         // authTime may be null
         if (authTime == null) {
-            if (otherTicket.getAuthTime() != null)
+            if (otherTicket.getAuthTime() != null) {
                 return false;
+            }
         } else {
-            if (!authTime.equals(otherTicket.getAuthTime()))
+            if (!authTime.equals(otherTicket.getAuthTime())) {
                 return false;
+            }
         }
 
         // startTime may be null
         if (startTime == null) {
-            if (otherTicket.getStartTime() != null)
+            if (otherTicket.getStartTime() != null) {
                 return false;
+            }
         } else {
-            if (!startTime.equals(otherTicket.getStartTime()))
+            if (!startTime.equals(otherTicket.getStartTime())) {
                 return false;
+            }
         }
 
         if (renewTill == null) {
-            if (otherTicket.getRenewTill() != null)
+            if (otherTicket.getRenewTill() != null) {
                 return false;
+            }
         } else {
-            if (!renewTill.equals(otherTicket.getRenewTill()))
+            if (!renewTill.equals(otherTicket.getRenewTill())) {
                 return false;
+            }
         }
 
         return true;
     }
 
     private void readObject(ObjectInputStream s)
-        throws IOException, ClassNotFoundException {
+            throws IOException, ClassNotFoundException {
         s.defaultReadObject();
         if (sessionKey == null) {
            throw new InvalidObjectException("Session key cannot be null");
--- a/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Fri Aug 08 11:36:48 2014 -0700
@@ -914,7 +914,7 @@
             MidiFileWriter writer = providers.get(i);
             int[] types = writer.getMidiFileTypes();
             for (int j = 0; j < types.length; j++ ) {
-                allTypes.add(new Integer(types[j]));
+                allTypes.add(types[j]);
             }
         }
         int resultTypes[] = new int[allTypes.size()];
@@ -968,7 +968,7 @@
             MidiFileWriter writer = providers.get(i);
             int[] types = writer.getMidiFileTypes(sequence);
             for (int j = 0; j < types.length; j++ ) {
-                allTypes.add(new Integer(types[j]));
+                allTypes.add(types[j]);
             }
         }
         int resultTypes[] = new int[allTypes.size()];
--- a/jdk/src/share/classes/javax/swing/AbstractAction.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/AbstractAction.java	Fri Aug 08 11:36:48 2014 -0700
@@ -269,6 +269,10 @@
      * when a bound property has changed and it will send the appropriate
      * <code>PropertyChangeEvent</code> to any registered
      * <code>PropertyChangeListeners</code>.
+     *
+     * @param propertyName  the name of the property that has changed
+     * @param oldValue  the old value of the property
+     * @param newValue  the new value of the property
      */
     protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
         if (changeSupport == null ||
--- a/jdk/src/share/classes/javax/swing/CellRendererPane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/CellRendererPane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -120,6 +120,18 @@
      * The Container p is the component we're actually drawing on, typically it's
      * equal to this.getParent(). If shouldValidate is true the component c will be
      * validated before painted.
+     *
+     * @param g  the {@code Graphics} object to draw on
+     * @param c  the {@code Component} to draw
+     * @param p  the {@code Container} component actually drawn on
+     * @param x  an int specifying the left side of the area draw in, in pixels,
+     *           measured from the left edge of the graphics context
+     * @param y  an int specifying the top of the area to draw in, in pixels
+     *           measured down from the top edge of the graphics context
+     * @param w  an int specifying the width of the area draw in, in pixels
+     * @param h  an int specifying the height of the area draw in, in pixels
+     * @param shouldValidate  if true, component {@code c} will be validated
+     *                        before being painted
      */
     public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate) {
         if (c == null) {
@@ -166,6 +178,16 @@
 
     /**
      * Calls this.paintComponent(g, c, p, x, y, w, h, false).
+     *
+     * @param g  the {@code Graphics} object to draw on
+     * @param c  the {@code Component} to draw
+     * @param p  the {@code Container} component actually drawn on
+     * @param x  an int specifying the left side of the area draw in, in pixels,
+     *           measured from the left edge of the graphics context
+     * @param y  an int specifying the top of the area to draw in, in pixels
+     *           measured down from the top edge of the graphics context
+     * @param w  an int specifying the width of the area draw in, in pixels
+     * @param h  an int specifying the height of the area draw in, in pixels
      */
     public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) {
         paintComponent(g, c, p, x, y, w, h, false);
@@ -174,6 +196,11 @@
 
     /**
      * Calls this.paintComponent() with the rectangles x,y,width,height fields.
+     *
+     * @param g  the {@code Graphics} object to draw on
+     * @param c  the {@code Component} to draw
+     * @param p  the {@code Container} component actually drawn on
+     * @param r  the {@code Rectangle} to draw in
      */
     public void paintComponent(Graphics g, Component c, Container p, Rectangle r) {
         paintComponent(g, c, p, r.x, r.y, r.width, r.height);
--- a/jdk/src/share/classes/javax/swing/DebugGraphics.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/DebugGraphics.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -139,6 +139,8 @@
 
     /**
      * Sets the Color used to flash drawing operations.
+     *
+     * @param flashColor the Color used to flash drawing operations
      */
     public static void setFlashColor(Color flashColor) {
         info().flashColor = flashColor;
@@ -146,6 +148,8 @@
 
     /**
      * Returns the Color used to flash drawing operations.
+     *
+     * @return the Color used to flash drawing operations
      * @see #setFlashColor
      */
     public static Color flashColor() {
@@ -154,6 +158,8 @@
 
     /**
      * Sets the time delay of drawing operation flashing.
+     *
+     * @param flashTime the time delay of drawing operation flashing
      */
     public static void setFlashTime(int flashTime) {
         info().flashTime = flashTime;
@@ -161,6 +167,8 @@
 
     /**
      * Returns the time delay of drawing operation flashing.
+     *
+     * @return the time delay of drawing operation flashing
      * @see #setFlashTime
      */
     public static int flashTime() {
@@ -169,27 +177,38 @@
 
     /**
      * Sets the number of times that drawing operations will flash.
+     *
+     * @param flashCount number of times that drawing operations will flash
      */
     public static void setFlashCount(int flashCount) {
         info().flashCount = flashCount;
     }
 
-    /** Returns the number of times that drawing operations will flash.
-      * @see #setFlashCount
-      */
+    /**
+     * Returns the number of times that drawing operations will flash.
+     *
+     * @return the number of times that drawing operations will flash
+     * @see #setFlashCount
+     */
     public static int flashCount() {
         return info().flashCount;
     }
 
-    /** Sets the stream to which the DebugGraphics logs drawing operations.
-      */
+    /**
+     * Sets the stream to which the DebugGraphics logs drawing operations.
+     *
+     * @param stream the stream to which the DebugGraphics logs drawing operations
+     */
     public static void setLogStream(java.io.PrintStream stream) {
         info().stream = stream;
     }
 
-    /** Returns the stream to which the DebugGraphics logs drawing operations.
-      * @see #setLogStream
-      */
+    /**
+     * Returns the stream to which the DebugGraphics logs drawing operations.
+     *
+     * @return the stream to which the DebugGraphics logs drawing operations
+     * @see #setLogStream
+     */
     public static java.io.PrintStream logStream() {
         return info().stream;
     }
@@ -1337,6 +1356,8 @@
       * creates a new Frame that shows each operation on an
       * offscreen buffer. The value of <b>options</b> is bitwise OR'd into
       * the current value. To disable debugging use NONE_OPTION.
+      *
+      * @param options indicates how diagnostic information should be displayed
       */
     public void setDebugOptions(int options) {
         if (options != 0) {
@@ -1356,9 +1377,12 @@
         }
     }
 
-    /** Returns the current debugging options for this DebugGraphics.
-      * @see #setDebugOptions
-      */
+    /**
+     * Returns the current debugging options for this DebugGraphics.
+     *
+     * @return the current debugging options for this DebugGraphics
+     * @see #setDebugOptions
+     */
     public int getDebugOptions() {
         return debugOptions;
     }
--- a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -88,6 +88,11 @@
      * <pre>
      * min &lt;= value &lt;= value+extent &lt;= max
      * </pre>
+     *
+     * @param value  an int giving the current value
+     * @param extent the length of the inner range that begins at the model's value
+     * @param min    an int giving the minimum value
+     * @param max    an int giving the maximum value
      */
     public DefaultBoundedRangeModel(int value, int extent, int min, int max)
     {
@@ -403,6 +408,7 @@
      * If no such listeners exist,
      * this method returns an empty array.
      *
+     * @param <T> the type of {@code EventListener} class being requested
      * @param listenerType  the type of listeners requested;
      *          this parameter should specify an interface
      *          that descends from <code>java.util.EventListener</code>
--- a/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java	Fri Aug 08 11:36:48 2014 -0700
@@ -71,7 +71,7 @@
     private transient boolean didDrag;
 
     /** Normally this method will not be called. If it is, it
-      * try to determine the appropriate parent from the desktopIcon of the frame.
+      * tries to determine the appropriate parent from the desktopIcon of the frame.
       * Will remove the desktopIcon from its parent if it successfully adds the frame.
       */
     public void openFrame(JInternalFrame f) {
--- a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -155,6 +155,7 @@
      * If no such listeners exist,
      * this method returns an empty array.
      *
+     * @param <T>  the type of {@code EventListener} class being requested
      * @param listenerType  the type of listeners requested;
      *          this parameter should specify an interface
      *          that descends from <code>java.util.EventListener</code>
--- a/jdk/src/share/classes/javax/swing/DesktopManager.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/DesktopManager.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,73 +47,136 @@
   */
 public interface DesktopManager
 {
-    /** If possible, display this frame in an appropriate location.
-      * Normally, this is not called, as the creator of the JInternalFrame
-      * will add the frame to the appropriate parent.
-      */
+    /**
+     * If possible, display this frame in an appropriate location.
+     * Normally, this is not called, as the creator of the JInternalFrame
+     * will add the frame to the appropriate parent.
+     *
+     * @param f  the {@code JInternalFrame} to be displayed
+     */
     void openFrame(JInternalFrame f);
 
-    /** Generally, this call should remove the frame from it's parent. */
+    /**
+     * Generally, this call should remove the frame from its parent.
+     *
+     * @param f  the {@code JInternalFrame} to be removed
+     */
     void closeFrame(JInternalFrame f);
 
-    /** Generally, the frame should be resized to match it's parents bounds. */
+    /**
+     * Generally, the frame should be resized to match its parents bounds.
+     *
+     * @param f  the {@code JInternalFrame} to be resized
+     */
     void maximizeFrame(JInternalFrame f);
-    /** Generally, this indicates that the frame should be restored to it's
-      * size and position prior to a maximizeFrame() call.
-      */
+
+    /**
+     * Generally, this indicates that the frame should be restored to its
+     * size and position prior to a maximizeFrame() call.
+     *
+     * @param f  the {@code JInternalFrame} to be restored
+     */
     void minimizeFrame(JInternalFrame f);
-    /** Generally, remove this frame from it's parent and add an iconic representation. */
+
+    /**
+     * Generally, remove this frame from its parent and add an iconic representation.
+     *
+     * @param f  the {@code JInternalFrame} to be iconified
+     */
     void iconifyFrame(JInternalFrame f);
-    /** Generally, remove any iconic representation that is present and restore the
-      * frame to it's original size and location.
-      */
+
+    /**
+     * Generally, remove any iconic representation that is present and restore the
+     * frame to it's original size and location.
+     *
+     * @param f  the {@code JInternalFrame} to be de-iconified
+     */
     void deiconifyFrame(JInternalFrame f);
 
     /**
      * Generally, indicate that this frame has focus. This is usually called after
      * the JInternalFrame's IS_SELECTED_PROPERTY has been set to true.
+     *
+     * @param f  the {@code JInternalFrame} to be activated
      */
     void activateFrame(JInternalFrame f);
 
     /**
      * Generally, indicate that this frame has lost focus. This is usually called
      * after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.
+     *
+     * @param f  the {@code JInternalFrame} to be deactivated
      */
     void deactivateFrame(JInternalFrame f);
 
-    /** This method is normally called when the user has indicated that
-      * they will begin dragging a component around. This method should be called
-      * prior to any dragFrame() calls to allow the DesktopManager to prepare any
-      * necessary state. Normally <b>f</b> will be a JInternalFrame.
-      */
+    /**
+     * This method is normally called when the user has indicated that
+     * they will begin dragging a component around. This method should be called
+     * prior to any dragFrame() calls to allow the DesktopManager to prepare any
+     * necessary state. Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being dragged
+     */
     void beginDraggingFrame(JComponent f);
 
-    /** The user has moved the frame. Calls to this method will be preceded by calls
-      * to beginDraggingFrame().
-      *  Normally <b>f</b> will be a JInternalFrame.
-      */
+    /**
+     * The user has moved the frame. Calls to this method will be preceded by calls
+     * to beginDraggingFrame().
+     * Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being dragged
+     * @param newX  the new x-coordinate
+     * @param newY  the new y-coordinate
+     */
     void dragFrame(JComponent f, int newX, int newY);
-    /** This method signals the end of the dragging session. Any state maintained by
-      * the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
-      */
+
+    /**
+     * This method signals the end of the dragging session. Any state maintained by
+     * the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being dragged
+     */
     void endDraggingFrame(JComponent f);
 
-    /** This methods is normally called when the user has indicated that
-      * they will begin resizing the frame. This method should be called
-      * prior to any resizeFrame() calls to allow the DesktopManager to prepare any
-      * necessary state.  Normally <b>f</b> will be a JInternalFrame.
-      */
+    /**
+     * This method is normally called when the user has indicated that
+     * they will begin resizing the frame. This method should be called
+     * prior to any resizeFrame() calls to allow the DesktopManager to prepare any
+     * necessary state.  Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being resized
+     */
     void beginResizingFrame(JComponent f, int direction);
-    /** The user has resized the component. Calls to this method will be preceded by calls
-      * to beginResizingFrame().
-      *  Normally <b>f</b> will be a JInternalFrame.
-      */
+
+    /**
+     * The user has resized the component. Calls to this method will be preceded by calls
+     * to beginResizingFrame().
+     * Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being resized
+     * @param newX  the new x-coordinate
+     * @param newY  the new y-coordinate
+     * @param newWidth  the new width
+     * @param newHeight  the new height
+     */
     void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight);
-    /** This method signals the end of the resize session. Any state maintained by
-      * the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
-      */
+
+    /**
+     * This method signals the end of the resize session. Any state maintained by
+     * the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
+     *
+     * @param f  the {@code JComponent} being resized
+     */
     void endResizingFrame(JComponent f);
 
-    /** This is a primitive reshape method.*/
+    /**
+     * This is a primitive reshape method.
+     *
+     * @param f  the {@code JComponent} being moved or resized
+     * @param newX  the new x-coordinate
+     * @param newY  the new y-coordinate
+     * @param newWidth  the new width
+     * @param newHeight  the new height
+     */
     void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight);
 }
--- a/jdk/src/share/classes/javax/swing/GrayFilter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/GrayFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -44,6 +44,9 @@
 
     /**
      * Creates a disabled image
+     *
+     * @param i  an {@code Image} to be created as disabled
+     * @return  the new grayscale image created from {@code i}
      */
     public static Image createDisabledImage (Image i) {
         GrayFilter filter = new GrayFilter(true, 50);
--- a/jdk/src/share/classes/javax/swing/Icon.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/Icon.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,11 @@
      * Draw the icon at the specified location.  Icon implementations
      * may use the Component argument to get properties useful for
      * painting, e.g. the foreground or background color.
+     *
+     * @param c  a {@code Component} to get properties useful for painting
+     * @param g  the graphics context
+     * @param x  the X coordinate of the icon's top-left corner
+     * @param y  the Y coordinate of the icon's top-left corner
      */
     void paintIcon(Component c, Graphics g, int x, int y);
 
--- a/jdk/src/share/classes/javax/swing/JApplet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JApplet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -157,8 +157,11 @@
         enableEvents(AWTEvent.KEY_EVENT_MASK);
     }
 
-
-    /** Called by the constructor methods to create the default rootPane. */
+    /**
+     * Called by the constructor methods to create the default rootPane.
+     *
+     * @return  a new {@code JRootPane}
+     */
     protected JRootPane createRootPane() {
         JRootPane rp = new JRootPane();
         // NOTE: this uses setOpaque vs LookAndFeel.installProperty as there
@@ -247,6 +250,7 @@
    /**
     * Returns the menubar set on this applet.
     *
+    * @return the menubar set on this applet
     * @see #setJMenuBar
     */
     public JMenuBar getJMenuBar() {
@@ -542,6 +546,9 @@
 // Accessibility support
 ////////////////
 
+    /**
+     * {@code AccessibleContext} associated with this {@code JApplet}
+     */
     protected AccessibleContext accessibleContext = null;
 
     /**
--- a/jdk/src/share/classes/javax/swing/JComponent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JComponent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -496,6 +496,7 @@
     /**
      * Returns true if the JPopupMenu should be inherited from the parent.
      *
+     * @return true if the JPopupMenu should be inherited from the parent
      * @see #setComponentPopupMenu
      * @since 1.5
      */
@@ -1302,6 +1303,7 @@
      * <code>SortingFocusTraversalPolicy</code> from considering descendants
      * of this JComponent when computing a focus traversal cycle.
      *
+     * @return false
      * @see java.awt.Component#setFocusTraversalKeys
      * @see SortingFocusTraversalPolicy
      * @deprecated As of 1.4, replaced by
@@ -2213,6 +2215,13 @@
      * This method is now obsolete, please use a combination of
      * <code>getActionMap()</code> and <code>getInputMap()</code> for
      * similar behavior.
+     *
+     * @param anAction  action to be registered to given keystroke and condition
+     * @param aKeyStroke  a {@code KeyStroke}
+     * @param aCondition  the condition to be associated with given keystroke
+     *                    and action
+     * @see #getActionMap
+     * @see #getInputMap(int)
      */
     public void registerKeyboardAction(ActionListener anAction,KeyStroke aKeyStroke,int aCondition) {
         registerKeyboardAction(anAction,null,aKeyStroke,aCondition);
@@ -2231,6 +2240,9 @@
      * Unregisters a keyboard action.
      * This will remove the binding from the <code>ActionMap</code>
      * (if it exists) as well as the <code>InputMap</code>s.
+     *
+     * @param aKeyStroke  the keystroke for which to unregister its
+     *                    keyboard action
      */
     public void unregisterKeyboardAction(KeyStroke aKeyStroke) {
         ActionMap am = getActionMap(false);
@@ -2286,6 +2298,8 @@
      * conditions <code>WHEN_FOCUSED</code> and
      * <code>WHEN_IN_FOCUSED_WINDOW</code> condition.
      *
+     * @param aKeyStroke  the keystroke for which to request an
+     *                    action-keystroke condition
      * @return the action-keystroke condition
      */
     public int getConditionForKeyStroke(KeyStroke aKeyStroke) {
@@ -2302,6 +2316,7 @@
      * Returns the object that will perform the action registered for a
      * given keystroke.
      *
+     * @param aKeyStroke  the keystroke for which to return a listener
      * @return the <code>ActionListener</code>
      *          object invoked when the keystroke occurs
      */
@@ -2610,6 +2625,8 @@
      * <code>FocusTraversalPolicy</code> of this <code>JComponent</code>'s
      * focus-cycle-root ancestor is used.
      *
+     * @return true if this component can request to get the input focus,
+     *              false if it can not
      * @see java.awt.FocusTraversalPolicy#getDefaultComponent
      * @deprecated As of 1.4, replaced by
      * <code>FocusTraversalPolicy.getDefaultComponent(Container).requestFocus()</code>
@@ -2821,6 +2838,8 @@
      * normally override this method if they process some
      * key events themselves.  If the event is processed,
      * it should be consumed.
+     *
+     * @param e the event to be processed
      */
     protected void processComponentKeyEvent(KeyEvent e) {
     }
@@ -3032,6 +3051,10 @@
      * <code>setToolTipText</code>.  If a component provides
      * more extensive API to support differing tooltips at different locations,
      * this method should be overridden.
+     *
+     * @param event the {@code MouseEvent} that initiated the
+     *              {@code ToolTip} display
+     * @return a string containing the  tooltip
      */
     public String getToolTipText(MouseEvent event) {
         return getToolTipText();
@@ -3774,6 +3797,10 @@
          * but not very pretty outside borders in compound border situations.
          * It's rather arbitrary, but hopefully decent UI programmers will
          * not create multiple titled borders for the same component.
+         *
+         * @param b  the {@code Border} for which to retrieve its title
+         * @return the border's title as a {@code String}, null if it has
+         *         no title
          */
         protected String getBorderTitle(Border b) {
             String s;
@@ -4198,6 +4225,7 @@
      * Returns true if this component is lightweight, that is, if it doesn't
      * have a native window system peer.
      *
+     * @param c  the {@code Component} to be checked
      * @return true if this component is lightweight
      */
     @SuppressWarnings("deprecation")
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -208,8 +208,11 @@
      }
 
     /**
-     * Returns the <code>DesktopManger</code> that handles
+     * Returns the {@code DesktopManger} that handles
      * desktop-specific UI actions.
+     *
+     * @return the {@code DesktopManger} that handles desktop-specific
+     *         UI actions
      */
     public DesktopManager getDesktopManager() {
         return desktopManager;
--- a/jdk/src/share/classes/javax/swing/JDialog.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JDialog.java	Fri Aug 08 11:36:48 2014 -0700
@@ -664,6 +664,8 @@
     /**
      * Called by the constructor methods to create the default
      * {@code rootPane}.
+     *
+     * @return  a new {@code JRootPane}
      */
     protected JRootPane createRootPane() {
         JRootPane rp = new JRootPane();
@@ -854,6 +856,7 @@
    /**
     * Returns the menubar set on this dialog.
     *
+    * @return the menubar set on this dialog
     * @see #setJMenuBar
     */
     public JMenuBar getJMenuBar() {
@@ -1225,6 +1228,9 @@
 // Accessibility support
 ////////////////
 
+    /**
+     * {@code AccessibleContext} associated with this {@code JDialog}
+     */
     protected AccessibleContext accessibleContext = null;
 
     /**
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,7 @@
 import javax.swing.event.*;
 import javax.swing.text.html.*;
 import javax.accessibility.*;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * A text component to edit various kinds of content.
@@ -1193,12 +1194,12 @@
             try {
                 Class<?> c;
                 if (loader != null) {
+                    ReflectUtil.checkPackageAccess(classname);
                     c = loader.loadClass(classname);
                 } else {
                     // Will only happen if developer has invoked
                     // registerEditorKitForContentType(type, class, null).
-                    c = Class.forName(classname, true, Thread.currentThread().
-                                      getContextClassLoader());
+                    c = SwingUtilities.loadSystemClass(classname);
                 }
                 k = (EditorKit) c.newInstance();
                 kitRegistry.put(type, k);
--- a/jdk/src/share/classes/javax/swing/JInternalFrame.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JInternalFrame.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2107,7 +2107,7 @@
             if (n == null) {
                 return false;
             }
-            setLayer(new Integer(n.intValue()));
+            setLayer(Integer.valueOf(n.intValue()));
             return true;
         }
 
--- a/jdk/src/share/classes/javax/swing/JLabel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JLabel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -128,6 +128,10 @@
     private int horizontalTextPosition = TRAILING;
     private int iconTextGap = 4;
 
+    /**
+     * The Component this label is for; null if the label
+     * is not the label for a component
+     */
     protected Component labelFor = null;
 
     /**
@@ -310,6 +314,7 @@
      * <p>
      * This is a JavaBeans bound property.
      *
+     * @param text  the single line of text this component will display
      * @see #setVerticalTextPosition
      * @see #setHorizontalTextPosition
      * @see #setIcon
@@ -366,6 +371,7 @@
      * <p>
      * This is a JavaBeans bound property.
      *
+     * @param icon  the default icon this component will display
      * @see #setVerticalTextPosition
      * @see #setHorizontalTextPosition
      * @see #getIcon
@@ -476,6 +482,7 @@
      * call the requestFocus method of the component specified by the
      * labelFor property when the mnemonic is activated.
      *
+     * @param key  a keycode that indicates a mnemonic key
      * @see #getLabelFor
      * @see #setLabelFor
      * @beaninfo
@@ -592,6 +599,8 @@
      *
      * @param key the property value to check
      * @param message the IllegalArgumentException detail message
+     * @return the key value if {@code key} is a a legal value for the
+     *         horizontalAlignment properties
      * @exception IllegalArgumentException if key isn't LEFT, CENTER, RIGHT,
      * LEADING or TRAILING.
      * @see #setHorizontalTextPosition
@@ -617,6 +626,8 @@
      *
      * @param key the property value to check
      * @param message the IllegalArgumentException detail message
+     * @return the key value if {@code key} is a legal value for the
+     *         verticalAlignment or verticalTextPosition properties
      * @exception IllegalArgumentException if key isn't TOP, CENTER, or BOTTOM.
      * @see #setVerticalAlignment
      * @see #setVerticalTextPosition
@@ -652,6 +663,7 @@
      * <p>
      * This is a JavaBeans bound property.
      *
+     * @param iconTextGap  the space between the icon and text properties
      * @see #getIconTextGap
      * @beaninfo
      *        bound: true
--- a/jdk/src/share/classes/javax/swing/JLayeredPane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JLayeredPane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -159,15 +159,15 @@
 public class JLayeredPane extends JComponent implements Accessible {
     /// Watch the values in getObjectForLayer()
     /** Convenience object defining the Default layer. Equivalent to new Integer(0).*/
-    public final static Integer DEFAULT_LAYER = new Integer(0);
+    public final static Integer DEFAULT_LAYER = 0;
     /** Convenience object defining the Palette layer. Equivalent to new Integer(100).*/
-    public final static Integer PALETTE_LAYER = new Integer(100);
+    public final static Integer PALETTE_LAYER = 100;
     /** Convenience object defining the Modal layer. Equivalent to new Integer(200).*/
-    public final static Integer MODAL_LAYER = new Integer(200);
+    public final static Integer MODAL_LAYER = 200;
     /** Convenience object defining the Popup layer. Equivalent to new Integer(300).*/
-    public final static Integer POPUP_LAYER = new Integer(300);
+    public final static Integer POPUP_LAYER = 300;
     /** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
-    public final static Integer DRAG_LAYER = new Integer(400);
+    public final static Integer DRAG_LAYER = 400;
     /** Convenience object defining the Frame Content layer.
       * This layer is normally only use to position the contentPane and menuBar
       * components of JFrame.
@@ -294,10 +294,7 @@
       */
     public static void putLayer(JComponent c, int layer) {
         /// MAKE SURE THIS AND setLayer(Component c, int layer, int position)  are SYNCED
-        Integer layerObj;
-
-        layerObj = new Integer(layer);
-        c.putClientProperty(LAYER_PROPERTY, layerObj);
+        c.putClientProperty(LAYER_PROPERTY, layer);
     }
 
     /** Gets the layer property for a JComponent, it
@@ -609,27 +606,20 @@
      * @return an Integer object for that layer
      */
     protected Integer getObjectForLayer(int layer) {
-        Integer layerObj;
         switch(layer) {
         case 0:
-            layerObj = DEFAULT_LAYER;
-            break;
+            return DEFAULT_LAYER;
         case 100:
-            layerObj = PALETTE_LAYER;
-            break;
+            return PALETTE_LAYER;
         case 200:
-            layerObj = MODAL_LAYER;
-            break;
+            return MODAL_LAYER;
         case 300:
-            layerObj = POPUP_LAYER;
-            break;
+            return POPUP_LAYER;
         case 400:
-            layerObj = DRAG_LAYER;
-            break;
+            return DRAG_LAYER;
         default:
-            layerObj = new Integer(layer);
+            return layer;
         }
-        return layerObj;
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java	Fri Aug 08 11:36:48 2014 -0700
@@ -298,6 +298,7 @@
      * it to the end of this menu.
      *
      * @param s the string for the menu item to be added
+     * @return a new {@code JMenuItem} created using {@code s}
      */
     public JMenuItem add(String s) {
         return add(new JMenuItem(s));
@@ -452,6 +453,9 @@
     /**
      * Returns a properly configured <code>PropertyChangeListener</code>
      * which updates the control as changes to the <code>Action</code> occur.
+     *
+     * @param b the menu item for which to create a listener
+     * @return a properly configured {@code PropertyChangeListener}
      */
     protected PropertyChangeListener createActionChangeListener(JMenuItem b) {
         return b.createActionPropertyChangeListener0(b.getAction());
@@ -1530,6 +1534,9 @@
     @SuppressWarnings("serial")
     static public class Separator extends JSeparator
     {
+        /**
+         * Constructs a popup menu-specific Separator.
+         */
         public Separator( )
         {
             super( JSeparator.HORIZONTAL );
@@ -1553,6 +1560,7 @@
      * Returns true if the <code>MouseEvent</code> is considered a popup trigger
      * by the <code>JPopupMenu</code>'s currently installed UI.
      *
+     * @param e a {@code MouseEvent}
      * @return true if the mouse event is a popup trigger
      * @since 1.3
      */
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java	Fri Aug 08 11:36:48 2014 -0700
@@ -341,7 +341,7 @@
         if (accessibleContext != null) {
             accessibleContext.firePropertyChange(
                     AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
-                    oldValue, new Integer(model.getValue()));
+                    oldValue, model.getValue());
         }
     }
 
@@ -952,7 +952,7 @@
          */
         public Number getMaximumAccessibleValue() {
             // TIGER - 4422362
-            return new Integer(model.getMaximum() - model.getExtent());
+            return model.getMaximum() - model.getExtent();
         }
 
     } // AccessibleJScrollBar
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1102,6 +1102,7 @@
      * <code>setColumnHeaderView</code>
      * to add a column header component and its viewport to the scroll pane.
      *
+     * @param columnHeader  a {@code JViewport} which is the new column header
      * @see #getColumnHeader
      * @see #setColumnHeaderView
      *
@@ -1299,6 +1300,7 @@
      * Indicates whether or not scrolling will take place in response to the
      * mouse wheel.  Wheel scrolling is enabled by default.
      *
+     * @return true if mouse wheel scrolling is enabled, false otherwise
      * @see #setWheelScrollingEnabled
      * @since 1.4
      * @beaninfo
@@ -1448,9 +1450,12 @@
     protected class AccessibleJScrollPane extends AccessibleJComponent
         implements ChangeListener, PropertyChangeListener {
 
+        /**
+         * this {@code JScrollPane}'s current {@code JViewport}
+         */
         protected JViewport viewPort = null;
 
-        /*
+        /**
          * Resets the viewport ChangeListener and PropertyChangeListener
          */
         public void resetViewPort() {
--- a/jdk/src/share/classes/javax/swing/JSpinner.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java	Fri Aug 08 11:36:48 2014 -0700
@@ -149,6 +149,7 @@
      * a set of previous/next buttons, and an editor appropriate
      * for the model.
      *
+     * @param model  a model for the new spinner
      * @throws NullPointerException if the model is {@code null}
      */
     public JSpinner(SpinnerModel model) {
@@ -328,6 +329,7 @@
      * getModel().getValue()
      * </pre>
      *
+     * @return the current value of the model
      * @see #setValue
      * @see SpinnerModel#getValue
      */
@@ -349,6 +351,7 @@
      * getModel().setValue(value)
      * </pre>
      *
+     * @param value  new value for the spinner
      * @throws IllegalArgumentException if <code>value</code> isn't allowed
      * @see #getValue
      * @see SpinnerModel#setValue
--- a/jdk/src/share/classes/javax/swing/JTextField.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JTextField.java	Fri Aug 08 11:36:48 2014 -0700
@@ -675,6 +675,9 @@
      * that of the <code>Action</code>.
      *
      * @param a the textfield's action
+     * @return a {@code PropertyChangeListener} that is responsible for
+     *         listening for changes from the specified {@code Action} and
+     *         updating the appropriate properties
      * @since 1.3
      * @see Action
      * @see #setAction
--- a/jdk/src/share/classes/javax/swing/JWindow.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JWindow.java	Fri Aug 08 11:36:48 2014 -0700
@@ -272,6 +272,8 @@
     /**
      * Called by the constructor methods to create the default
      * <code>rootPane</code>.
+     *
+     * @return a new {@code JRootPane}
      */
     protected JRootPane createRootPane() {
         JRootPane rp = new JRootPane();
--- a/jdk/src/share/classes/javax/swing/LookAndFeel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/LookAndFeel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -465,7 +465,7 @@
      * @see Class#getResourceAsStream(String)
      */
     public static Object makeIcon(final Class<?> baseClass, final String gifFile) {
-        return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile);
+        return SwingUtilities2.makeIcon_Unprivileged(baseClass, baseClass, gifFile);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -369,6 +369,8 @@
 
     /**
      * Returns true if the user hits the Cancel button in the progress dialog.
+     *
+     * @return true if the user hits the Cancel button in the progress dialog
      */
     public boolean isCanceled() {
         if (pane == null) return false;
@@ -396,6 +398,8 @@
      * Returns the amount of time this object waits before deciding whether
      * or not to popup a progress monitor.
      *
+     * @return the amount of time in milliseconds this object waits before
+     *         deciding whether or not to popup a progress monitor
      * @see #setMillisToDecideToPopup
      */
     public int getMillisToDecideToPopup() {
@@ -419,6 +423,8 @@
     /**
      * Returns the amount of time it will take for the popup to appear.
      *
+     * @return the amont of time in milliseconds it will take for the
+     *         popup to appear
      * @see #setMillisToPopup
      */
     public int getMillisToPopup() {
--- a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Fri Aug 08 11:36:48 2014 -0700
@@ -109,11 +109,12 @@
             AccessController.doPrivileged(new PrivilegedAction<Method>() {
                 public Method run() {
                     try {
-                        Class c = Class.forName("java.util.Arrays");
-                        Method m = c.getDeclaredMethod("legacyMergeSort", new Class[]{Object[].class, Comparator.class});
+                        Method m = java.util.Arrays.class.getDeclaredMethod("legacyMergeSort",
+                                                                            new Class<?>[]{Object[].class,
+                                                                                    Comparator.class});
                         m.setAccessible(true);
                         return m;
-                    } catch (ClassNotFoundException | NoSuchMethodException e) {
+                    } catch (NoSuchMethodException e) {
                         // using default sorting algo
                         return null;
                     }
--- a/jdk/src/share/classes/javax/swing/SpinnerModel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/SpinnerModel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -88,6 +88,7 @@
      * that case, <code>model.setValue(new Number(11))</code>
      * would throw an exception.
      *
+     * @param value  new value for the spinner
      * @throws IllegalArgumentException if <code>value</code> isn't allowed
      * @see #getValue
      */
--- a/jdk/src/share/classes/javax/swing/Timer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/Timer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -154,6 +154,9 @@
      * NOTE: all fields need to be handled in readResolve
      */
 
+    /**
+     * The collection of registered listeners
+     */
     protected EventListenerList listenerList = new EventListenerList();
 
     // The following field strives to maintain the following:
@@ -335,6 +338,7 @@
      * If no such listeners exist,
      * this method returns an empty array.
      *
+     * @param <T> the type of {@code EventListener} class being requested
      * @param listenerType  the type of listeners requested;
      *          this parameter should specify an interface
      *          that descends from <code>java.util.EventListener</code>
@@ -410,6 +414,7 @@
      * Returns the delay, in milliseconds,
      * between firings of action events.
      *
+     * @return the delay, in milliseconds, between firings of action events
      * @see #setDelay
      * @see #getInitialDelay
      */
@@ -441,8 +446,9 @@
 
 
     /**
-     * Returns the <code>Timer</code>'s initial delay.
+     * Returns the {@code Timer}'s initial delay.
      *
+     * @return the {@code Timer}'s intial delay, in milliseconds
      * @see #setInitialDelay
      * @see #setDelay
      */
@@ -470,6 +476,8 @@
      * an action event
      * to its listeners multiple times.
      *
+     * @return true if the {@code Timer} will send an action event to its
+     *              listeners multiple times
      * @see #setRepeats
      */
     public boolean isRepeats() {
@@ -506,9 +514,11 @@
 
 
     /**
-     * Returns <code>true</code> if the <code>Timer</code> coalesces
+     * Returns {@code true} if the {@code Timer} coalesces
      * multiple pending action events.
      *
+     * @return true if the {@code Timer} coalesces multiple pending
+     *              action events
      * @see #setCoalesce
      */
     public boolean isCoalesce() {
@@ -555,8 +565,9 @@
 
 
     /**
-     * Returns <code>true</code> if the <code>Timer</code> is running.
+     * Returns {@code true} if the {@code Timer} is running.
      *
+     * @return true if the {@code Timer} is running, false otherwise
      * @see #start
      */
     public boolean isRunning() {
--- a/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileSystemView.java	Fri Aug 08 11:36:48 2014 -0700
@@ -645,7 +645,7 @@
         int i = 1;
         while (newFolder.exists() && i < 100) {
             newFolder = createFileObject(containingDir, MessageFormat.format(
-                    newFolderNextString, new Integer(i)));
+                    newFolderNextString, i));
             i++;
         }
 
@@ -755,7 +755,7 @@
         int i = 2;
         while (newFolder.exists() && i < 100) {
             newFolder = createFileObject(containingDir, MessageFormat.format(
-                newFolderNextString, new Integer(i)));
+                newFolderNextString, i));
             i++;
         }
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Fri Aug 08 11:36:48 2014 -0700
@@ -99,6 +99,8 @@
 
         /**
          * Returns the direction of the arrow.
+         *
+         * @return the direction of the arrow
          */
         public int getDirection() {
             return direction;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Fri Aug 08 11:36:48 2014 -0700
@@ -45,6 +45,11 @@
 
 public class BasicBorders {
 
+    /**
+     * Returns a border instance for a {@code JButton}.
+     *
+     * @return a border instance for a {@code JButton}
+     */
     public static Border getButtonBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border buttonBorder = new BorderUIResource.CompoundBorderUIResource(
@@ -57,6 +62,11 @@
         return buttonBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JRadioButton}.
+     *
+     * @return a border instance for a {@code JRadioButton}
+     */
     public static Border getRadioButtonBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border radioButtonBorder = new BorderUIResource.CompoundBorderUIResource(
@@ -69,6 +79,11 @@
         return radioButtonBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JToggleButton}.
+     *
+     * @return a border instance for a {@code JToggleButton}
+     */
     public static Border getToggleButtonBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
@@ -81,6 +96,11 @@
         return toggleButtonBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JMenuBar}.
+     *
+     * @return a border instance for a {@code JMenuBar}
+     */
     public static Border getMenuBarBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border menuBarBorder = new BasicBorders.MenuBarBorder(
@@ -90,6 +110,11 @@
         return menuBarBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JSplitPane}.
+     *
+     * @return a border instance for a {@code JSplitPane}
+     */
     public static Border getSplitPaneBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border splitPaneBorder = new BasicBorders.SplitPaneBorder(
@@ -99,7 +124,9 @@
     }
 
     /**
-     * Returns a border instance for a JSplitPane divider
+     * Returns a border instance for a {@code JSplitPane} divider.
+     *
+     * @return a border instance for a {@code JSplitPane} divider
      * @since 1.3
      */
     public static Border getSplitPaneDividerBorder() {
@@ -110,6 +137,11 @@
         return splitPaneBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JTextField}.
+     *
+     * @return a border instance for a {@code JTextField}
+     */
     public static Border getTextFieldBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border textFieldBorder = new BasicBorders.FieldBorder(
@@ -120,12 +152,22 @@
         return textFieldBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JProgressBar}.
+     *
+     * @return a border instance for a {@code JProgressBar}
+     */
     public static Border getProgressBarBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border progressBarBorder = new BorderUIResource.LineBorderUIResource(Color.green, 2);
         return progressBarBorder;
     }
 
+    /**
+     * Returns a border instance for a {@code JInternalFrame}.
+     *
+     * @return a border instance for a {@code JInternalFrame}
+     */
     public static Border getInternalFrameBorder() {
         UIDefaults table = UIManager.getLookAndFeelDefaults();
         Border internalFrameBorder = new BorderUIResource.CompoundBorderUIResource(
@@ -147,6 +189,14 @@
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class RolloverButtonBorder extends ButtonBorder {
 
+        /**
+         * Constructs a new instance of a {@code RolloverButtonBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param darkShadow a color of dark shadow
+         * @param highlight a color of highlight
+         * @param lightHighlight a color of light highlight
+         */
         public RolloverButtonBorder(Color shadow, Color darkShadow,
                                   Color highlight, Color lightHighlight) {
             super(shadow, darkShadow, highlight, lightHighlight);
@@ -227,13 +277,36 @@
         }
     }
 
+    /**
+     * Draws a border around a button.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
    public static class ButtonBorder extends AbstractBorder implements UIResource {
+        /**
+         * The color of shadow.
+         */
         protected Color shadow;
+        /**
+         * The color of dark shadow.
+         */
         protected Color darkShadow;
+        /**
+         * The color of highlight.
+         */
         protected Color highlight;
+        /**
+         * The color of light highlight.
+         */
         protected Color lightHighlight;
 
+        /**
+         * Constructs a new instance of a {@code ButtonBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param darkShadow a color of dark shadow
+         * @param highlight a color of highlight
+         * @param lightHighlight a color of light highlight
+         */
         public ButtonBorder(Color shadow, Color darkShadow,
                             Color highlight, Color lightHighlight) {
             this.shadow = shadow;
@@ -270,9 +343,20 @@
 
     }
 
+    /**
+     * Draws the border around a toggle button.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class ToggleButtonBorder extends ButtonBorder {
 
+        /**
+         * Constructs a new instance of a {@code ToggleButtonBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param darkShadow a color of dark shadow
+         * @param highlight a color of highlight
+         * @param lightHighlight a color of light highlight
+         */
         public ToggleButtonBorder(Color shadow, Color darkShadow,
                                   Color highlight, Color lightHighlight) {
             super(shadow, darkShadow, highlight, lightHighlight);
@@ -292,9 +376,20 @@
         }
     }
 
+    /**
+     * Draws the border around a radio button.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class RadioButtonBorder extends ButtonBorder {
 
+        /**
+         * Constructs a new instance of a {@code RadioButtonBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param darkShadow a color of dark shadow
+         * @param highlight a color of highlight
+         * @param lightHighlight a color of light highlight
+         */
         public RadioButtonBorder(Color shadow, Color darkShadow,
                                  Color highlight, Color lightHighlight) {
             super(shadow, darkShadow, highlight, lightHighlight);
@@ -329,11 +424,26 @@
         }
     }
 
+    /**
+     * Draws the border around a menu bar.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class MenuBarBorder extends AbstractBorder implements UIResource {
+        /**
+         * The color of shadow.
+         */
         private Color shadow;
+        /**
+         * The color of highlight.
+         */
         private Color highlight;
 
+        /**
+         * Constructs a new instance of a {@code MenuBarBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param highlight a color of highlight
+         */
         public MenuBarBorder(Color shadow, Color highlight) {
             this.shadow = shadow;
             this.highlight = highlight;
@@ -356,6 +466,9 @@
         }
     }
 
+    /**
+     * Draws the border around components which support margins.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class MarginBorder extends AbstractBorder implements UIResource {
         public Insets getBorderInsets(Component c, Insets insets)       {
@@ -384,13 +497,36 @@
         }
     }
 
+    /**
+     * Draws the border around a field.
+     */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class FieldBorder extends AbstractBorder implements UIResource {
+        /**
+         * The color of shadow.
+         */
         protected Color shadow;
+        /**
+         * The color of dark shadow.
+         */
         protected Color darkShadow;
+        /**
+         * The color of highlight.
+         */
         protected Color highlight;
+        /**
+         * The color of light highlight.
+         */
         protected Color lightHighlight;
 
+        /**
+         * Constructs a new instance of a {@code FieldBorder}.
+         *
+         * @param shadow a color of shadow
+         * @param darkShadow a color of dark shadow
+         * @param highlight a color of highlight
+         * @param lightHighlight a color of light highlight
+         */
         public FieldBorder(Color shadow, Color darkShadow,
                            Color highlight, Color lightHighlight) {
             this.shadow = shadow;
@@ -509,9 +645,21 @@
      * also install a border on the divider (property SplitPaneDivider.border).
      */
     public static class SplitPaneBorder implements Border, UIResource {
+        /**
+         * The color of highlight
+         */
         protected Color highlight;
+        /**
+         * The color of shadow
+         */
         protected Color shadow;
 
+        /**
+         * Constructs a new instance of a {@code SplitPaneBorder}.
+         *
+         * @param highlight a color of highlight
+         * @param shadow a color of shadow
+         */
         public SplitPaneBorder(Color highlight, Color shadow) {
             this.highlight = highlight;
             this.shadow = shadow;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -58,6 +58,11 @@
     }
 
 
+    /**
+     * Constructs a new instance of {@code BasicButtonListener}.
+     *
+     * @param b an abstract button
+     */
     public BasicButtonListener(AbstractButton b) {
     }
 
@@ -76,13 +81,20 @@
         }
     }
 
+    /**
+     * Checks the opacity of the {@code AbstractButton}.
+     *
+     * @param b an abstract button
+     */
     protected void checkOpacity(AbstractButton b) {
         b.setOpaque( b.isContentAreaFilled() );
     }
 
     /**
      * Register default key actions: pressing space to "click" a
-     * button and registring the keyboard mnemonic (if any).
+     * button and registering the keyboard mnemonic (if any).
+     *
+     * @param c a component
      */
     public void installKeyboardActions(JComponent c) {
         AbstractButton b = (AbstractButton)c;
@@ -98,7 +110,9 @@
     }
 
     /**
-     * Unregister's default key actions
+     * Unregister default key actions.
+     *
+     * @param c a component
      */
     public void uninstallKeyboardActions(JComponent c) {
         SwingUtilities.replaceUIInputMap(c, JComponent.
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,6 +49,9 @@
     // Visual constants
     // NOTE: This is not used or set any where. Were we allowed to remove
     // fields, this would be removed.
+    /**
+     * The default gap between a text and an icon.
+     */
     protected int defaultTextIconGap;
 
     // Amount to offset text, the value of this comes from
@@ -56,6 +59,9 @@
     private int shiftOffset = 0;
     // Value that is set in shiftOffset once setTextShiftOffset has been
     // invoked. The value of this comes from the defaults table.
+    /**
+     * The default offset of a text.
+     */
     protected int defaultTextShiftOffset;
 
     private final static String propertyPrefix = "Button" + ".";
@@ -65,6 +71,12 @@
     // ********************************
     //          Create PLAF
     // ********************************
+    /**
+     * Returns an instance of {@code BasicButtonUI}.
+     *
+     * @param c a component
+     * @return an instance of {@code BasicButtonUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         AppContext appContext = AppContext.getAppContext();
         BasicButtonUI buttonUI =
@@ -76,6 +88,11 @@
         return buttonUI;
     }
 
+    /**
+     * Returns the property prefix.
+     *
+     * @return the property prefix
+     */
     protected String getPropertyPrefix() {
         return propertyPrefix;
     }
@@ -91,6 +108,11 @@
         BasicHTML.updateRenderer(c, ((AbstractButton) c).getText());
     }
 
+    /**
+     * Installs default properties.
+     *
+     * @param b an abstract button
+     */
     protected void installDefaults(AbstractButton b) {
         // load shared instance defaults
         String pp = getPropertyPrefix();
@@ -120,6 +142,11 @@
         LookAndFeel.installProperty(b, "iconTextGap", Integer.valueOf(4));
     }
 
+    /**
+     * Registers listeners.
+     *
+     * @param b an abstract button
+     */
     protected void installListeners(AbstractButton b) {
         BasicButtonListener listener = createButtonListener(b);
         if(listener != null) {
@@ -131,6 +158,11 @@
         }
     }
 
+    /**
+     * Registers keyboard actions.
+     *
+     * @param b an abstract button
+     */
     protected void installKeyboardActions(AbstractButton b){
         BasicButtonListener listener = getButtonListener(b);
 
@@ -150,6 +182,11 @@
         BasicHTML.updateRenderer(c, "");
     }
 
+    /**
+     * Unregisters keyboard actions.
+     *
+     * @param b an abstract button
+     */
     protected void uninstallKeyboardActions(AbstractButton b) {
         BasicButtonListener listener = getButtonListener(b);
         if(listener != null) {
@@ -157,6 +194,11 @@
         }
     }
 
+    /**
+     * Unregisters listeners.
+     *
+     * @param b an abstract button
+     */
     protected void uninstallListeners(AbstractButton b) {
         BasicButtonListener listener = getButtonListener(b);
         if(listener != null) {
@@ -168,6 +210,11 @@
         }
     }
 
+    /**
+     * Uninstalls default properties.
+     *
+     * @param b an abstract button
+     */
     protected void uninstallDefaults(AbstractButton b) {
         LookAndFeel.uninstallBorder(b);
     }
@@ -175,10 +222,22 @@
     // ********************************
     //        Create Listeners
     // ********************************
+    /**
+     * Returns a new instance of {@code BasicButtonListener}.
+     *
+     * @param b an abstract button
+     * @return a new instance of {@code BasicButtonListener}
+     */
     protected BasicButtonListener createButtonListener(AbstractButton b) {
         return new BasicButtonListener(b);
     }
 
+    /**
+     * Returns the default gap between a text and an icon.
+     *
+     * @param b an abstract button
+     * @return the default gap between text and an icon
+     */
     public int getDefaultTextIconGap(AbstractButton b) {
         return defaultTextIconGap;
     }
@@ -231,6 +290,13 @@
         }
     }
 
+    /**
+     * Paints an icon of the current button.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param c a component
+     * @param iconRect a bounding rectangle to render the icon
+     */
     protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect){
             AbstractButton b = (AbstractButton) c;
             ButtonModel model = b.getModel();
@@ -295,8 +361,15 @@
     }
 
     /**
+     * Method which renders the text of the current button.
+     *
      * As of Java 2 platform v 1.4 this method should not be used or overriden.
      * Use the paintText method which takes the AbstractButton argument.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param c a component
+     * @param textRect a bounding rectangle to render the text
+     * @param text a string to render
      */
     protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) {
         AbstractButton b = (AbstractButton) c;
@@ -328,7 +401,7 @@
      *
      * @param g Graphics context
      * @param b Current button to render
-     * @param textRect Bounding rectangle to render the text.
+     * @param textRect Bounding rectangle to render the text
      * @param text String to render
      * @since 1.4
      */
@@ -338,23 +411,48 @@
 
     // Method signature defined here overriden in subclasses.
     // Perhaps this class should be abstract?
+    /**
+     * Paints a focused button.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param b an abstract button
+     * @param viewRect a bounding rectangle to render the button
+     * @param textRect a bounding rectangle to render the text
+     * @param iconRect a bounding rectangle to render the icon
+     */
     protected void paintFocus(Graphics g, AbstractButton b,
                               Rectangle viewRect, Rectangle textRect, Rectangle iconRect){
     }
 
 
-
+    /**
+     * Paints a pressed button.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param b an abstract button
+     */
     protected void paintButtonPressed(Graphics g, AbstractButton b){
     }
 
+    /**
+     * Clears the offset of the text.
+     */
     protected void clearTextShiftOffset(){
         this.shiftOffset = 0;
     }
 
+    /**
+     * Sets the offset of the text.
+     */
     protected void setTextShiftOffset(){
         this.shiftOffset = defaultTextShiftOffset;
     }
 
+    /**
+     * Returns the offset of the text.
+     *
+     * @return the offset of the text
+     */
     protected int getTextShiftOffset() {
         return shiftOffset;
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -29,9 +29,6 @@
 import java.awt.event.*;
 import javax.swing.*;
 import javax.swing.plaf.*;
-import javax.swing.border.*;
-import java.io.Serializable;
-
 
 /**
  * BasicCheckboxMenuItem implementation
@@ -42,6 +39,12 @@
  */
 public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI {
 
+    /**
+     * Constructs a new instance of {@code BasicCheckBoxMenuItemUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicCheckBoxMenuItemUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicCheckBoxMenuItemUI();
     }
@@ -50,6 +53,14 @@
         return "CheckBoxMenuItem";
     }
 
+    /**
+     * Invoked when mouse event occurs.
+     *
+     * @param item a menu item
+     * @param e a mouse event
+     * @param path an array of {@code MenuElement}
+     * @param manager an instance of {@code MenuSelectionManager}
+     */
     public void processMouseEvent(JMenuItem item,MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
         Point p = e.getPoint();
         if(p.x >= 0 && p.x < item.getWidth() &&
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,6 +59,13 @@
     // ********************************
     //            Create PLAF
     // ********************************
+
+    /**
+     * Returns an instance of {@code BasicCheckBoxUI}.
+     *
+     * @param b a component
+     * @return an instance of {@code BasicCheckBoxUI}
+     */
     public static ComponentUI createUI(JComponent b) {
         AppContext appContext = AppContext.getAppContext();
         BasicCheckBoxUI checkboxUI =
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,21 +61,45 @@
     boolean isMultiPanel = false;
     private static TransferHandler defaultTransferHandler = new ColorTransferHandler();
 
+    /**
+     * The array of default color choosers.
+     */
     protected AbstractColorChooserPanel[] defaultChoosers;
 
+    /**
+     * The instance of {@code ChangeListener}.
+     */
     protected ChangeListener previewListener;
+
+    /**
+     * The instance of {@code PropertyChangeListener}.
+     */
     protected PropertyChangeListener propertyChangeListener;
     private Handler handler;
 
+    /**
+     * Returns a new instance of {@code BasicColorChooserUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicColorChooserUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicColorChooserUI();
     }
 
+    /**
+     * Returns an array of default color choosers.
+     *
+     * @return an array of default color choosers
+     */
     protected AbstractColorChooserPanel[] createDefaultChoosers() {
         AbstractColorChooserPanel[] panels = ColorChooserComponentFactory.getDefaultChooserPanels();
         return panels;
     }
 
+    /**
+     * Uninstalls default color choosers.
+     */
     protected void uninstallDefaultChoosers() {
         AbstractColorChooserPanel[] choosers = chooser.getChooserPanels();
         for( int i = 0 ; i < choosers.length; i++) {
@@ -138,6 +162,9 @@
         handler = null;
     }
 
+    /**
+     * Installs preview panel.
+     */
     protected void installPreviewPanel() {
         JComponent previewPanel = this.chooser.getPreviewPanel();
         if (previewPanel == null) {
@@ -169,6 +196,9 @@
         this.chooser.remove(this.previewPanelHolder);
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         LookAndFeel.installColorsAndFont(chooser, "ColorChooser.background",
                                               "ColorChooser.foreground",
@@ -180,16 +210,21 @@
         }
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         if (chooser.getTransferHandler() instanceof UIResource) {
             chooser.setTransferHandler(null);
         }
     }
 
-
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         propertyChangeListener = createPropertyChangeListener();
-        chooser.addPropertyChangeListener( propertyChangeListener );
+        chooser.addPropertyChangeListener(propertyChangeListener);
 
         previewListener = getHandler();
         chooser.getSelectionModel().addChangeListener(previewListener);
@@ -202,10 +237,18 @@
         return handler;
     }
 
+    /**
+     * Returns an instance of {@code PropertyChangeListener}.
+     *
+     * @return an instance of {@code PropertyChangeListener}
+     */
     protected PropertyChangeListener createPropertyChangeListener() {
         return getHandler();
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         chooser.removePropertyChangeListener( propertyChangeListener );
         chooser.getSelectionModel().removeChangeListener(previewListener);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,9 +41,15 @@
  * @author Mark Davidson
  */
 public class BasicComboBoxEditor implements ComboBoxEditor,FocusListener {
+    /**
+     * An instance of {@code JTextField}.
+     */
     protected JTextField editor;
     private Object oldValue;
 
+    /**
+     * Constructs a new instance of {@code BasicComboBoxEditor}.
+     */
     public BasicComboBoxEditor() {
         editor = createEditorComponent();
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,6 +59,9 @@
     protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
     private final static Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
 
+    /**
+     * Constructs a new instance of {@code BasicComboBoxRenderer}.
+     */
     public BasicComboBoxRenderer() {
         super();
         setOpaque(true);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,6 +61,10 @@
  * @author Mark Davidson
  */
 public class BasicComboBoxUI extends ComboBoxUI {
+
+    /**
+     * The instance of {@code JComboBox}.
+     */
     protected JComboBox<Object> comboBox;
     /**
      * This protected field is implementation specific. Do not access directly
@@ -73,20 +77,30 @@
     private boolean isTableCellEditor = false;
     private static final String IS_TABLE_CELL_EDITOR = "JComboBox.isTableCellEditor";
 
-    // This list is for drawing the current item in the combo box.
+    /**
+     * This list is for drawing the current item in the combo box.
+     */
     protected JList<Object>   listBox;
 
-    // Used to render the currently selected item in the combo box.
-    // It doesn't have anything to do with the popup's rendering.
+    /**
+     * Used to render the currently selected item in the combo box.
+     * It doesn't have anything to do with the popup's rendering.
+     */
     protected CellRendererPane currentValuePane = new CellRendererPane();
 
-    // The implementation of ComboPopup that is used to show the popup.
+    /**
+     * The implementation of {@code ComboPopup} that is used to show the popup.
+     */
     protected ComboPopup popup;
 
-    // The Component that the ComboBoxEditor uses for editing
+    /**
+     * The Component that the @{code ComboBoxEditor} uses for editing.
+     */
     protected Component editor;
 
-    // The arrow button that invokes the popup.
+    /**
+     * The arrow button that invokes the popup.
+     */
     protected JButton   arrowButton;
 
     // Listeners that are attached to the JComboBox
@@ -121,8 +135,19 @@
     protected ItemListener itemListener;
 
     // Listeners that the ComboPopup produces.
+    /**
+     * The {@code MouseListener} listens to events.
+     */
     protected MouseListener popupMouseListener;
+
+    /**
+     * The {@code MouseMotionListener} listens to events.
+     */
     protected MouseMotionListener popupMouseMotionListener;
+
+    /**
+     * The {@code KeyListener} listens to events.
+     */
     protected KeyListener popupKeyListener;
 
     // This is used for knowing when to cache the minimum preferred size.
@@ -160,10 +185,14 @@
      */
     JComboBox.KeySelectionManager keySelectionManager;
 
-    // Flag for recalculating the minimum preferred size.
+    /**
+     * The flag for recalculating the minimum preferred size.
+     */
     protected boolean isMinimumSizeDirty = true;
 
-    // Cached minimum preferred size.
+    /**
+     * The cached minimum preferred size.
+     */
     protected Dimension cachedMinimumSize = new Dimension( 0, 0 );
 
     // Flag for calculating the display size
@@ -238,6 +267,12 @@
     // begin UI Initialization
     //
 
+    /**
+     * Constructs a new instance of {@code BasicComboBoxUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicComboBoxUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicComboBoxUI();
     }
@@ -1090,6 +1125,9 @@
      * navigation.  This is used for optimizing key input by only passing non-
      * navigation keys to the type-ahead mechanism.  Subclasses should override this
      * if they change the navigation keys.
+     *
+     * @param keyCode a key code
+     * @return {@code true} if the supplied {@code keyCode} maps to a navigation key
      */
     protected boolean isNavigationKey( int keyCode ) {
         return keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN ||
@@ -1167,6 +1205,8 @@
 
     /**
      * Returns the area that is reserved for drawing the currently selected item.
+     *
+     * @return the area that is reserved for drawing the currently selected item
      */
     protected Rectangle rectangleForCurrentValue() {
         int width = comboBox.getWidth();
@@ -1190,6 +1230,8 @@
 
     /**
      * Gets the insets from the JComboBox.
+     *
+     * @return the insets
      */
     protected Insets getInsets() {
         return comboBox.getInsets();
@@ -1206,6 +1248,10 @@
 
     /**
      * Paints the currently selected item.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param bounds a bounding rectangle to render to
+     * @param hasFocus is focused
      */
     public void paintCurrentValue(Graphics g,Rectangle bounds,boolean hasFocus) {
         ListCellRenderer<Object> renderer = comboBox.getRenderer();
@@ -1263,6 +1309,10 @@
 
     /**
      * Paints the background of the currently selected item.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param bounds a bounding rectangle to render to
+     * @param hasFocus is focused
      */
     public void paintCurrentValueBackground(Graphics g,Rectangle bounds,boolean hasFocus) {
         Color t = g.getColor();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Fri Aug 08 11:36:48 2014 -0700
@@ -75,6 +75,9 @@
 
     private static Border LIST_BORDER = new LineBorder(Color.BLACK, 1);
 
+    /**
+     * The instance of {@code JComboBox}.
+     */
     protected JComboBox<Object>             comboBox;
     /**
      * This protected field is implementation specific. Do not access directly
@@ -186,11 +189,30 @@
      * or override.
      */
     protected Timer                    autoscrollTimer;
+
+    /**
+     * {@code true} if the mouse cursor is in the popup.
+     */
     protected boolean                  hasEntered = false;
+
+    /**
+     * If {@code true} the auto-scrolling is enabled.
+     */
     protected boolean                  isAutoScrolling = false;
+
+    /**
+     * The direction of scrolling.
+     */
     protected int                      scrollDirection = SCROLL_UP;
 
+    /**
+     * The direction of scrolling up.
+     */
     protected static final int         SCROLL_UP = 0;
+
+    /**
+     * The direction of scrolling down.
+     */
     protected static final int         SCROLL_DOWN = 1;
 
 
@@ -309,6 +331,9 @@
         }
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         // XXX - shouldn't call this method
 //        comboBox.unregisterKeyboardAction( KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0 ) );
@@ -319,6 +344,12 @@
     //===================================================================
     // begin Initialization routines
     //
+
+    /**
+     * Constructs a new instance of {@code BasicComboPopup}.
+     *
+     * @param combo an instance of {@code JComboBox}
+     */
     public BasicComboPopup( JComboBox<Object> combo ) {
         super();
         setName("ComboPopup.popup");
@@ -555,6 +586,8 @@
 
     /**
      * Creates the scroll pane which houses the scrollable list.
+     *
+     * @return the scroll pane which houses the scrollable list
      */
     protected JScrollPane createScroller() {
         JScrollPane sp = new JScrollPane( list,
@@ -616,6 +649,9 @@
         }
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
 
         /* XXX - shouldn't call this method. take it out for testing.
@@ -1007,6 +1043,8 @@
     /**
      * This protected method is implementation specific and should be private.
      * do not call or override.
+     *
+     * @param direction the direction of scrolling
      */
     protected void startAutoScrolling( int direction ) {
         // XXX - should be a private method within InvocationMouseMotionHandler
@@ -1107,6 +1145,8 @@
      * send the focus when the popup is brought up.  The standard implementation
      * delegates the focus to the editor (if the combo box is editable) or to
      * the JComboBox if it is not editable.
+     *
+     * @param e a mouse event
      */
     protected void delegateFocus( MouseEvent e ) {
         if ( comboBox.isEditable() ) {
@@ -1150,6 +1190,12 @@
         }
     }
 
+    /**
+     * Converts mouse event.
+     *
+     * @param e a mouse event
+     * @return converted mouse event
+     */
     protected MouseEvent convertMouseEvent( MouseEvent e ) {
         Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                             e.getPoint(), list );
@@ -1171,6 +1217,9 @@
     /**
      * Retrieves the height of the popup based on the current
      * ListCellRenderer and the maximum row count.
+     *
+     * @param maxRowCount the row count
+     * @return the height of the popup
      */
     protected int getPopupHeightForRowCount(int maxRowCount) {
         // Set the cached value of the minimum row count
@@ -1272,6 +1321,9 @@
     /**
      * A utility method used by the event listeners.  Given a mouse event, it changes
      * the list selection to the list item below the mouse.
+     *
+     * @param anEvent a mouse event
+     * @param shouldScroll if {@code true} list should be scrolled.
      */
     protected void updateListBoxSelectionForEvent(MouseEvent anEvent,boolean shouldScroll) {
         // XXX - only seems to be called from this class. shouldScroll flag is
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -42,7 +42,14 @@
  */
 public class BasicDesktopIconUI extends DesktopIconUI {
 
+    /**
+     * The instance of {@code JInternalFrame.JDesktopIcon}.
+     */
     protected JInternalFrame.JDesktopIcon desktopIcon;
+
+    /**
+     * The instance of {@code JInternalFrame}.
+     */
     protected JInternalFrame frame;
 
     /**
@@ -53,12 +60,19 @@
     protected JComponent iconPane;
     MouseInputListener mouseInputListener;
 
-
-
+    /**
+     * Constructs a new instance of {@code BasicDesktopIconUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicDesktopIconUI}
+     */
     public static ComponentUI createUI(JComponent c)    {
         return new BasicDesktopIconUI();
     }
 
+    /**
+     * Constructs a new instance of {@code BasicDesktopIconUI}.
+     */
     public BasicDesktopIconUI() {
     }
 
@@ -108,39 +122,62 @@
         desktopIcon = null;
     }
 
+    /**
+     * Registers components.
+     */
     protected void installComponents() {
         iconPane = new BasicInternalFrameTitlePane(frame);
         desktopIcon.setLayout(new BorderLayout());
         desktopIcon.add(iconPane, BorderLayout.CENTER);
     }
 
+    /**
+     * Unregisters components.
+     */
     protected void uninstallComponents() {
         desktopIcon.remove(iconPane);
         desktopIcon.setLayout(null);
         iconPane = null;
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         mouseInputListener = createMouseInputListener();
         desktopIcon.addMouseMotionListener(mouseInputListener);
         desktopIcon.addMouseListener(mouseInputListener);
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         desktopIcon.removeMouseMotionListener(mouseInputListener);
         desktopIcon.removeMouseListener(mouseInputListener);
         mouseInputListener = null;
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         LookAndFeel.installBorder(desktopIcon, "DesktopIcon.border");
         LookAndFeel.installProperty(desktopIcon, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         LookAndFeel.uninstallBorder(desktopIcon);
     }
 
+    /**
+     * Returns a new instance of {@code MouseInputListener}.
+     *
+     * @return a new instance of {@code MouseInputListener}
+     */
     protected MouseInputListener createMouseInputListener() {
         return new MouseInputHandler();
     }
@@ -170,6 +207,12 @@
         return iconPane.getMaximumSize();
     }
 
+    /**
+     * Returns the insets.
+     *
+     * @param c a component
+     * @return the insets
+     */
     public Insets getInsets(JComponent c) {
         JInternalFrame iframe = desktopIcon.getInternalFrame();
         Border border = iframe.getBorder();
@@ -179,6 +222,9 @@
         return new Insets(0,0,0,0);
     }
 
+    /**
+     * De-iconifies the internal frame.
+     */
     public void deiconize() {
         try { frame.setIcon(false); } catch (PropertyVetoException e2) { }
     }
@@ -284,6 +330,15 @@
                 return;
         }
 
+        /**
+         * Moves and repaints a component {@code f}.
+         *
+         * @param f a component
+         * @param newX a new X coordinate
+         * @param newY a new Y coordinate
+         * @param newWidth a new width
+         * @param newHeight a new height
+         */
         public void moveAndRepaint(JComponent f, int newX, int newY,
                                         int newWidth, int newHeight) {
             Rectangle r = f.getBounds();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,14 @@
     private Handler handler;
     private PropertyChangeListener pcl;
 
+    /**
+     * The instance of {@code JDesktopPane}.
+     */
     protected JDesktopPane desktop;
+
+    /**
+     * The instance of {@code DesktopManager}.
+     */
     protected DesktopManager desktopManager;
 
     /**
@@ -109,10 +116,19 @@
     @Deprecated
     protected KeyStroke navigateKey2;
 
+    /**
+     * Constructs a new instance of {@code BasicDesktopPaneUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicDesktopPaneUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicDesktopPaneUI();
     }
 
+    /**
+     * Constructs a new instance of {@code BasicDesktopPaneUI}.
+     */
     public BasicDesktopPaneUI() {
     }
 
@@ -133,6 +149,9 @@
         handler = null;
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         if (desktop.getBackground() == null ||
             desktop.getBackground() instanceof UIResource) {
@@ -141,6 +160,9 @@
         LookAndFeel.installProperty(desktop, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() { }
 
     /**
@@ -169,6 +191,9 @@
         pcl = null;
     }
 
+    /**
+     * Installs desktop manager.
+     */
     protected void installDesktopManager() {
         desktopManager = desktop.getDesktopManager();
         if(desktopManager == null) {
@@ -177,6 +202,9 @@
         }
     }
 
+    /**
+     * Uninstalls desktop manager.
+     */
     protected void uninstallDesktopManager() {
         if(desktop.getDesktopManager() instanceof UIResource) {
             desktop.setDesktopManager(null);
@@ -184,6 +212,9 @@
         desktopManager = null;
     }
 
+    /**
+     * Installs keyboard actions.
+     */
     protected void installKeyboardActions(){
         InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
         if (inputMap != null) {
@@ -202,9 +233,15 @@
         registerKeyboardActions();
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void registerKeyboardActions(){
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void unregisterKeyboardActions(){
     }
 
@@ -253,6 +290,9 @@
         map.put(new Actions(Actions.NAVIGATE_PREVIOUS));
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions(){
       unregisterKeyboardActions();
       SwingUtilities.replaceUIInputMap(desktop, JComponent.
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,6 +55,11 @@
 
     private boolean busy = false;
 
+    /**
+     * Constructs a new instance of {@code BasicDirectoryModel}.
+     *
+     * @param filechooser an instance of {JFileChooser}
+     */
     public BasicDirectoryModel(JFileChooser filechooser) {
         this.filechooser = filechooser;
         validateFileCache();
@@ -93,6 +98,11 @@
         }
     }
 
+    /**
+     * Returns a list of directories.
+     *
+     * @return a list of directories
+     */
     public Vector<File> getDirectories() {
         synchronized(fileCache) {
             if (directories != null) {
@@ -103,6 +113,11 @@
         }
     }
 
+    /**
+     * Returns a list of files.
+     *
+     * @return a list of files
+     */
     public Vector<File> getFiles() {
         synchronized(fileCache) {
             if (files != null) {
@@ -126,6 +141,9 @@
         }
     }
 
+    /**
+     * Validates content of file cache.
+     */
     public void validateFileCache() {
         File currentDirectory = filechooser.getCurrentDirectory();
         if (currentDirectory == null) {
@@ -163,20 +181,34 @@
         }
     }
 
-
+    /**
+     * Invoked when a content is changed.
+     */
     public void fireContentsChanged() {
-        // System.out.println("BasicDirectoryModel: firecontentschanged");
-        fireContentsChanged(this, 0, getSize()-1);
+        fireContentsChanged(this, 0, getSize() - 1);
     }
 
     public int getSize() {
         return fileCache.size();
     }
 
+    /**
+     * Returns {@code true} if an element {@code o} is in file cache,
+     * otherwise, returns {@code false}.
+     *
+     * @param o an element
+     * @return {@code true} if an element {@code o} is in file cache
+     */
     public boolean contains(Object o) {
         return fileCache.contains(o);
     }
 
+    /**
+     * Returns an index of element {@code o} in file cache.
+     *
+     * @param o an element
+     * @return an index of element {@code o} in file cache
+     */
     public int indexOf(Object o) {
         return fileCache.indexOf(o);
     }
@@ -197,6 +229,11 @@
     public void intervalRemoved(ListDataEvent e) {
     }
 
+    /**
+     * Sorts a list of files.
+     *
+     * @param v a list of files
+     */
     protected void sort(Vector<? extends File> v){
         ShellFolder.sort(v);
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -40,16 +40,30 @@
 import sun.swing.SwingUtilities2;
 
 
-/*
+/**
+ * Convenient util class.
+ *
  * @author Hans Muller
  */
-
 public class BasicGraphicsUtils
 {
 
     private static final Insets GROOVE_INSETS = new Insets(2, 2, 2, 2);
     private static final Insets ETCHED_INSETS = new Insets(2, 2, 2, 2);
 
+    /**
+     * Draws an etched rectangle.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param w a width
+     * @param h a height
+     * @param shadow a color of shadow
+     * @param darkShadow a color of dark shadow
+     * @param highlight a color highlighting
+     * @param lightHighlight a color of light highlighting
+     */
     public static void drawEtchedRect(Graphics g, int x, int y, int w, int h,
                                       Color shadow, Color darkShadow,
                                       Color highlight, Color lightHighlight)
@@ -89,6 +103,17 @@
     }
 
 
+    /**
+     * Draws a groove.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param w a width
+     * @param h a height
+     * @param shadow a color of shadow
+     * @param highlight a color highlighting
+     */
     public static void drawGroove(Graphics g, int x, int y, int w, int h,
                                   Color shadow, Color highlight)
     {
@@ -120,6 +145,21 @@
     }
 
 
+    /**
+     * Draws a bezel.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param w a width
+     * @param h a height
+     * @param isPressed is component pressed
+     * @param isDefault is default drawing
+     * @param shadow a color of shadow
+     * @param darkShadow a color of dark shadow
+     * @param highlight a color highlighting
+     * @param lightHighlight a color of light highlighting
+     */
     public static void drawBezel(Graphics g, int x, int y, int w, int h,
                                  boolean isPressed, boolean isDefault,
                                  Color shadow, Color darkShadow,
@@ -176,6 +216,19 @@
         g.setColor(oldColor);
     }
 
+    /**
+     * Draws a lowered bezel.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param w a width
+     * @param h a height
+     * @param shadow a color of shadow
+     * @param darkShadow a color of dark shadow
+     * @param highlight a color highlighting
+     * @param lightHighlight a color of light highlighting
+     */
     public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h,
                                         Color shadow, Color darkShadow,
                                         Color highlight, Color lightHighlight)  {
@@ -197,11 +250,17 @@
      }
 
 
-    /** Draw a string with the graphics <code>g</code> at location (x,y)
-     *  just like <code>g.drawString</code> would.
-     *  The first occurrence of <code>underlineChar</code>
-     *  in text will be underlined. The matching algorithm is
-     *  not case sensitive.
+    /**
+     * Draw a string with the graphics {@code g} at location (x,y)
+     * just like {@code g.drawString} would. The first occurrence
+     * of {@code underlineChar} in text will be underlined.
+     * The matching algorithm is not case sensitive.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param text a text
+     * @param underlinedChar an underlined char
+     * @param x an X coordinate
+     * @param y an Y coordinate
      */
     public static void drawString(Graphics g,String text,int underlinedChar,int x,int y) {
         int index=-1;
@@ -244,9 +303,18 @@
     public static void drawStringUnderlineCharAt(Graphics g, String text,
                            int underlinedIndex, int x,int y) {
         SwingUtilities2.drawStringUnderlineCharAt(null, g, text,
-                                                  underlinedIndex, x, y);
+                underlinedIndex, x, y);
     }
 
+    /**
+     * Draws dashed rectangle.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param width a width of rectangle
+     * @param height a height of rectangle
+     */
     public static void drawDashedRect(Graphics g,int x,int y,int width,int height) {
         int vx,vy;
 
@@ -263,6 +331,13 @@
         }
     }
 
+    /**
+     * Returns the preferred size of the button.
+     *
+     * @param b an instance of {@code AbstractButton}
+     * @param textIconGap a gap between text and icon
+     * @return the preferred size of the button
+     */
     public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap)
     {
         if(b.getComponentCount() > 0) {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicHTML.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicHTML.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,6 +48,10 @@
     /**
      * Create an html renderer for the given component and
      * string of html.
+     *
+     * @param c a component
+     * @param html an HTML string
+     * @return an HTML renderer
      */
     public static View createHTMLView(JComponent c, String html) {
         BasicEditorKit kit = getFactory();
@@ -178,6 +182,10 @@
      * Check the given string to see if it should trigger the
      * html rendering logic in a non-text component that supports
      * html rendering.
+     *
+     * @param s a text
+     * @return {@code true} if the given string should trigger the
+     *         html rendering logic in a non-text component
      */
     public static boolean isHTMLString(String s) {
         if (s != null) {
@@ -198,6 +206,9 @@
      * This method is useful for ComponentUI implementations
      * that are static (i.e. shared) and get their state
      * entirely from the JComponent.
+     *
+     * @param c a component
+     * @param text a text
      */
     public static void updateRenderer(JComponent c, String text) {
         View value = null;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,6 +61,11 @@
     private static Icon menuItemArrowIcon;
     private static Icon menuArrowIcon;
 
+    /**
+     * Returns a menu item check icon.
+     *
+     * @return a menu item check icon
+     */
     public static Icon getMenuItemCheckIcon() {
         if (menuItemCheckIcon == null) {
             menuItemCheckIcon = new MenuItemCheckIcon();
@@ -68,6 +73,11 @@
         return menuItemCheckIcon;
     }
 
+    /**
+     * Returns a menu item arrow icon.
+     *
+     * @return a menu item arrow icon
+     */
     public static Icon getMenuItemArrowIcon() {
         if (menuItemArrowIcon == null) {
             menuItemArrowIcon = new MenuItemArrowIcon();
@@ -75,6 +85,11 @@
         return menuItemArrowIcon;
     }
 
+    /**
+     * Returns a menu arrow icon.
+     *
+     * @return a menu arrow icon
+     */
     public static Icon getMenuArrowIcon() {
         if (menuArrowIcon == null) {
             menuArrowIcon = new MenuArrowIcon();
@@ -82,6 +97,11 @@
         return menuArrowIcon;
     }
 
+    /**
+     * Returns a check box icon.
+     *
+     * @return a check box icon
+     */
     public static Icon getCheckBoxIcon() {
         if (checkBoxIcon == null) {
             checkBoxIcon = new CheckBoxIcon();
@@ -89,6 +109,11 @@
         return checkBoxIcon;
     }
 
+    /**
+     * Returns a radio button icon.
+     *
+     * @return a radio button icon
+     */
     public static Icon getRadioButtonIcon() {
         if (radioButtonIcon == null) {
             radioButtonIcon = new RadioButtonIcon();
@@ -96,6 +121,11 @@
         return radioButtonIcon;
     }
 
+    /**
+     * Returns a check box menu item icon.
+     *
+     * @return a check box menu item icon
+     */
     public static Icon getCheckBoxMenuItemIcon() {
         if (checkBoxMenuItemIcon == null) {
             checkBoxMenuItemIcon = new CheckBoxMenuItemIcon();
@@ -103,6 +133,11 @@
         return checkBoxMenuItemIcon;
     }
 
+    /**
+     * Returns a radio button menu item icon.
+     *
+     * @return a radio button menu item icon
+     */
     public static Icon getRadioButtonMenuItemIcon() {
         if (radioButtonMenuItemIcon == null) {
             radioButtonMenuItemIcon = new RadioButtonMenuItemIcon();
@@ -110,6 +145,11 @@
         return radioButtonMenuItemIcon;
     }
 
+    /**
+     * Returns an empty frame icon.
+     *
+     * @return an empty frame icon
+     */
     public static Icon createEmptyFrameIcon() {
         if(frame_icon == null)
             frame_icon = new EmptyFrameIcon();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Fri Aug 08 11:36:48 2014 -0700
@@ -60,44 +60,125 @@
 @SuppressWarnings("serial") // Same-version serialization only
 public class BasicInternalFrameTitlePane extends JComponent
 {
+    /**
+     * The instance of {@code JMenuBar}.
+     */
     protected JMenuBar menuBar;
+    /**
+     * The iconify button.
+     */
     protected JButton iconButton;
+    /**
+     * The maximize button.
+     */
     protected JButton maxButton;
+    /**
+     * The close button.
+     */
     protected JButton closeButton;
 
+    /**
+     * The instance of {@code JMenu}.
+     */
     protected JMenu windowMenu;
+    /**
+     * The instance of {@code JInternalFrame}.
+     */
     protected JInternalFrame frame;
 
+    /**
+     * The color of a selected title.
+     */
     protected Color selectedTitleColor;
+    /**
+     * The color of a selected text.
+     */
     protected Color selectedTextColor;
+    /**
+     * The color of a not selected title.
+     */
     protected Color notSelectedTitleColor;
+    /**
+     * The color of a not selected text.
+     */
     protected Color notSelectedTextColor;
 
+    /**
+     * The maximize icon.
+     */
     protected Icon maxIcon;
+    /**
+     * The minimize icon.
+     */
     protected Icon minIcon;
+    /**
+     * The iconify icon.
+     */
     protected Icon iconIcon;
+    /**
+     * The close icon.
+     */
     protected Icon closeIcon;
 
+    /**
+     * The instance of a {@code PropertyChangeListener}.
+     */
     protected PropertyChangeListener propertyChangeListener;
 
+    /**
+     * The instance of a {@code CloseAction}.
+     */
     protected Action closeAction;
+    /**
+     * The instance of a {@code MaximizeAction}.
+     */
     protected Action maximizeAction;
+    /**
+     * The instance of an {@code IconifyAction}.
+     */
     protected Action iconifyAction;
+    /**
+     * The instance of a {@code RestoreAction}.
+     */
     protected Action restoreAction;
+    /**
+     * The instance of a {@code MoveAction}.
+     */
     protected Action moveAction;
+    /**
+     * The instance of a {@code SizeAction}.
+     */
     protected Action sizeAction;
 
     // These constants are not used in JDK code
+    /**
+     * The close button text property.
+     */
     protected static final String CLOSE_CMD =
         UIManager.getString("InternalFrameTitlePane.closeButtonText");
+    /**
+     * The minimize button text property.
+     */
     protected static final String ICONIFY_CMD =
         UIManager.getString("InternalFrameTitlePane.minimizeButtonText");
+    /**
+     * The restore button text property.
+     */
     protected static final String RESTORE_CMD =
         UIManager.getString("InternalFrameTitlePane.restoreButtonText");
+    /**
+     * The maximize button text property.
+     */
     protected static final String MAXIMIZE_CMD =
         UIManager.getString("InternalFrameTitlePane.maximizeButtonText");
+    /**
+     * The move button text property.
+     */
     protected static final String MOVE_CMD =
         UIManager.getString("InternalFrameTitlePane.moveButtonText");
+    /**
+     * The size button text property.
+     */
     protected static final String SIZE_CMD =
         UIManager.getString("InternalFrameTitlePane.sizeButtonText");
 
@@ -107,11 +188,19 @@
     private String maxButtonToolTip;
     private Handler handler;
 
+    /**
+     * Constructs a new instance of {@code BasicInternalFrameTitlePane}.
+     *
+     * @param f an instance of {@code JInternalFrame}
+     */
     public BasicInternalFrameTitlePane(JInternalFrame f) {
         frame = f;
         installTitlePane();
     }
 
+    /**
+     * Installs the title pane.
+     */
     protected void installTitlePane() {
         installDefaults();
         installListeners();
@@ -128,6 +217,9 @@
 
     }
 
+    /**
+     * Adds subcomponents.
+     */
     protected void addSubComponents() {
         add(menuBar);
         add(iconButton);
@@ -135,6 +227,9 @@
         add(closeButton);
     }
 
+    /**
+     * Creates actions.
+     */
     protected void createActions() {
         maximizeAction = new MaximizeAction();
         iconifyAction = new IconifyAction();
@@ -151,6 +246,9 @@
         return map;
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         if( propertyChangeListener == null ) {
             propertyChangeListener = createPropertyChangeListener();
@@ -158,11 +256,17 @@
         frame.addPropertyChangeListener(propertyChangeListener);
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         frame.removePropertyChangeListener(propertyChangeListener);
         handler = null;
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
         minIcon = UIManager.getIcon("InternalFrame.minimizeIcon");
@@ -184,10 +288,15 @@
                 UIManager.getString("InternalFrame.maxButtonToolTip");
     }
 
-
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
     }
 
+    /**
+     * Creates buttons.
+     */
     protected void createButtons() {
         iconButton = new NoFocusButton(
                      "InternalFrameTitlePane.iconifyButtonAccessibleName",
@@ -213,6 +322,9 @@
         setButtonIcons();
     }
 
+    /**
+     * Sets the button icons.
+     */
     protected void setButtonIcons() {
         if(frame.isIcon()) {
             if (minIcon != null) {
@@ -261,6 +373,9 @@
         }
     }
 
+    /**
+     * Assembles system menu.
+     */
     protected void assembleSystemMenu() {
         menuBar = createSystemMenuBar();
         windowMenu = createSystemMenu();
@@ -269,6 +384,11 @@
         enableActions();
     }
 
+    /**
+     * Adds system menu items to {@code systemMenu}.
+     *
+     * @param systemMenu an instance of {@code JMenu}
+     */
     protected void addSystemMenuItems(JMenu systemMenu) {
         JMenuItem mi = systemMenu.add(restoreAction);
         mi.setMnemonic(getButtonMnemonic("restore"));
@@ -294,16 +414,29 @@
         }
     }
 
+    /**
+     * Returns a new instance of {@code JMenu}.
+     *
+     * @return a new instance of {@code JMenu}
+     */
     protected JMenu createSystemMenu() {
         return new JMenu("    ");
     }
 
+    /**
+     * Returns a new instance of {@code JMenuBar}.
+     *
+     * @return a new instance of {@code JMenuBar}
+     */
     protected JMenuBar createSystemMenuBar() {
         menuBar = new SystemMenuBar();
         menuBar.setBorderPainted(false);
         return menuBar;
     }
 
+    /**
+     * Shows system menu.
+     */
     protected void showSystemMenu(){
         //      windowMenu.setPopupMenuVisible(true);
       //      windowMenu.setVisible(true);
@@ -367,14 +500,24 @@
         g.fillRect(0, 0, getWidth(), getHeight());
     }
 
+    /**
+     * Returns the title.
+     *
+     * @param text a text
+     * @param fm an instance of {@code FontMetrics}
+     * @param availTextWidth an available text width
+     * @return the title.
+     */
     protected String getTitle(String text, FontMetrics fm, int availTextWidth) {
         return SwingUtilities2.clipStringIfNecessary(
                            frame, fm, text, availTextWidth);
-      }
+    }
 
     /**
      * Post a WINDOW_CLOSING-like event to the frame, so that it can
-     * be treated like a regular Frame.
+     * be treated like a regular {@code Frame}.
+     *
+     * @param frame an instance of {@code JInternalFrame}
      */
     protected void postClosingEvent(JInternalFrame frame) {
         InternalFrameEvent e = new InternalFrameEvent(
@@ -387,7 +530,9 @@
         }
     }
 
-
+    /**
+     * Enables actions.
+     */
     protected void enableActions() {
         restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
         maximizeAction.setEnabled(
@@ -406,10 +551,20 @@
         return handler;
     }
 
+    /**
+     * Returns an instance of {@code PropertyChangeListener}.
+     *
+     * @return an instance of {@code PropertyChangeListener}
+     */
     protected PropertyChangeListener createPropertyChangeListener() {
         return getHandler();
     }
 
+    /**
+     * Returns a layout manager.
+     *
+     * @return a layout manager
+     */
     protected LayoutManager createLayout() {
         return getHandler();
     }
@@ -606,6 +761,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class CloseAction extends AbstractAction {
+        /**
+         * Constructs a new instance of a {@code CloseAction}.
+         */
         public CloseAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.closeButtonText"));
@@ -623,6 +781,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class MaximizeAction extends AbstractAction {
+        /**
+         * Constructs a new instance of a {@code MaximizeAction}.
+         */
         public MaximizeAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.maximizeButtonText"));
@@ -652,6 +813,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class IconifyAction extends AbstractAction {
+        /**
+         * Constructs a new instance of an {@code IconifyAction}.
+         */
         public IconifyAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.minimizeButtonText"));
@@ -673,6 +837,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class RestoreAction extends AbstractAction {
+        /**
+         * Constructs a new instance of a {@code RestoreAction}.
+         */
         public RestoreAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.restoreButtonText"));
@@ -700,6 +867,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class MoveAction extends AbstractAction {
+        /**
+         * Constructs a new instance of a {@code MoveAction}.
+         */
         public MoveAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.moveButtonText"));
@@ -734,6 +904,9 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class SizeAction extends AbstractAction {
+        /**
+         * Constructs a new instance of a {@code SizeAction}.
+         */
         public SizeAction() {
             super(UIManager.getString(
                     "InternalFrameTitlePane.sizeButtonText"));
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -80,6 +80,14 @@
      * This method is here so that a subclass could do Label specific
      * layout and to shorten the method name a little.
      *
+     * @param label an instance of {@code JLabel}
+     * @param fontMetrics a font metrics
+     * @param text a text
+     * @param icon an icon
+     * @param viewR a bounding rectangle to lay out label
+     * @param iconR a bounding rectangle to lay out icon
+     * @param textR a bounding rectangle to lay out text
+     * @return a possibly clipped version of the compound labels string
      * @see SwingUtilities#layoutCompoundLabel
      */
     protected String layoutCL(
@@ -109,6 +117,11 @@
     /**
      * Paint clippedText at textX, textY with the labels foreground color.
      *
+     * @param l an instance of {@code JLabel}
+     * @param g an instance of {@code Graphics}
+     * @param s a text
+     * @param textX an X coordinate
+     * @param textY an Y coordinate
      * @see #paint
      * @see #paintDisabledText
      */
@@ -125,6 +138,11 @@
      * Paint clippedText at textX, textY with background.lighter() and then
      * shifted down and to the right by one pixel with background.darker().
      *
+     * @param l an instance of {@code JLabel}
+     * @param g an instance of {@code Graphics}
+     * @param s a text
+     * @param textX an X coordinate
+     * @param textY an Y coordinate
      * @see #paint
      * @see #paintEnabledText
      */
@@ -329,26 +347,46 @@
 
 
     public void uninstallUI(JComponent c) {
-        uninstallDefaults((JLabel)c);
-        uninstallComponents((JLabel)c);
-        uninstallListeners((JLabel)c);
-        uninstallKeyboardActions((JLabel)c);
+        uninstallDefaults((JLabel) c);
+        uninstallComponents((JLabel) c);
+        uninstallListeners((JLabel) c);
+        uninstallKeyboardActions((JLabel) c);
     }
 
-     protected void installDefaults(JLabel c){
-         LookAndFeel.installColorsAndFont(c, "Label.background", "Label.foreground", "Label.font");
-         LookAndFeel.installProperty(c, "opaque", Boolean.FALSE);
-      }
+    /**
+     * Installs default properties.
+     *
+     * @param c an instance of {@code JLabel}
+     */
+    protected void installDefaults(JLabel c){
+        LookAndFeel.installColorsAndFont(c, "Label.background", "Label.foreground", "Label.font");
+        LookAndFeel.installProperty(c, "opaque", Boolean.FALSE);
+    }
 
+    /**
+     * Registers listeners.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void installListeners(JLabel c){
         c.addPropertyChangeListener(this);
     }
 
+    /**
+     * Registers components.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void installComponents(JLabel c){
         BasicHTML.updateRenderer(c, c.getText());
         c.setInheritsPopupMenu(true);
     }
 
+    /**
+     * Registers keyboard actions.
+     *
+     * @param l an instance of {@code JLabel}
+     */
     protected void installKeyboardActions(JLabel l) {
         int dka = l.getDisplayedMnemonic();
         Component lf = l.getLabelFor();
@@ -374,17 +412,37 @@
         }
     }
 
+    /**
+     * Uninstalls default properties.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void uninstallDefaults(JLabel c){
     }
 
+    /**
+     * Unregisters listeners.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void uninstallListeners(JLabel c){
         c.removePropertyChangeListener(this);
     }
 
+    /**
+     * Unregisters components.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void uninstallComponents(JLabel c){
         BasicHTML.updateRenderer(c, "");
     }
 
+    /**
+     * Unregisters keyboard actions.
+     *
+     * @param c an instance of {@code JLabel}
+     */
     protected void uninstallKeyboardActions(JLabel c) {
         SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, null);
         SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_IN_FOCUSED_WINDOW,
@@ -392,6 +450,12 @@
         SwingUtilities.replaceUIActionMap(c, null);
     }
 
+    /**
+     * Returns an instance of {@code BasicLabelUI}.
+     *
+     * @param c a component
+     * @return an instance of {@code BasicLabelUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         if (System.getSecurityManager() != null) {
             AppContext appContext = AppContext.getAppContext();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,20 +59,53 @@
     private static final StringBuilder BASELINE_COMPONENT_KEY =
         new StringBuilder("List.baselineComponent");
 
+    /**
+     * The instance of {@code JList}.
+     */
     protected JList<Object> list = null;
+    /**
+     * The instance of {@code CellRendererPane}.
+     */
     protected CellRendererPane rendererPane;
 
     // Listeners that this UI attaches to the JList
+    /**
+     * {@code FocusListener} that attached to {@code JList}.
+     */
     protected FocusListener focusListener;
+    /**
+     * {@code MouseInputListener} that attached to {@code JList}.
+     */
     protected MouseInputListener mouseInputListener;
+    /**
+     * {@code ListSelectionListener} that attached to {@code JList}.
+     */
     protected ListSelectionListener listSelectionListener;
+    /**
+     * {@code ListDataListener} that attached to {@code JList}.
+     */
     protected ListDataListener listDataListener;
+    /**
+     * {@code PropertyChangeListener} that attached to {@code JList}.
+     */
     protected PropertyChangeListener propertyChangeListener;
     private Handler handler;
 
+    /**
+     * The array of cells' height
+     */
     protected int[] cellHeights = null;
+    /**
+     * The height of cell.
+     */
     protected int cellHeight = -1;
+    /**
+     * The width of cell.
+     */
     protected int cellWidth = -1;
+    /**
+     * The value represents changes to {@code JList} model.
+     */
     protected int updateLayoutStateNeeded = modelChanged;
     /**
      * Height of the list. When asked to paint, if the current size of
@@ -131,12 +164,33 @@
      * models length changed, are handled similarly, see DataListener.
      */
 
+    /**
+     * The bit relates to model changed property.
+     */
     protected final static int modelChanged = 1 << 0;
+    /**
+     * The bit relates to selection model changed property.
+     */
     protected final static int selectionModelChanged = 1 << 1;
+    /**
+     * The bit relates to font changed property.
+     */
     protected final static int fontChanged = 1 << 2;
+    /**
+     * The bit relates to fixed cell width changed property.
+     */
     protected final static int fixedCellWidthChanged = 1 << 3;
+    /**
+     * The bit relates to fixed cell height changed property.
+     */
     protected final static int fixedCellHeightChanged = 1 << 4;
+    /**
+     * The bit relates to prototype cell value changed property.
+     */
     protected final static int prototypeCellValueChanged = 1 << 5;
+    /**
+     * The bit relates to cell renderer changed property.
+     */
     protected final static int cellRendererChanged = 1 << 6;
     private final static int layoutOrientationChanged = 1 << 7;
     private final static int heightChanged = 1 << 8;
@@ -187,9 +241,16 @@
 
     /**
      * Paint one List cell: compute the relevant state, get the "rubber stamp"
-     * cell renderer component, and then use the CellRendererPane to paint it.
-     * Subclasses may want to override this method rather than paint().
+     * cell renderer component, and then use the {@code CellRendererPane} to paint it.
+     * Subclasses may want to override this method rather than {@code paint()}.
      *
+     * @param g an instance of {@code Graphics}
+     * @param row a row
+     * @param rowBounds a bounding rectangle to render to
+     * @param cellRenderer a list of {@code ListCellRenderer}
+     * @param dataModel a list model
+     * @param selModel a selection model
+     * @param leadIndex a lead index
      * @see #paint
      */
     protected void paintCell(
@@ -916,10 +977,11 @@
 
 
     /**
-     * Returns a new instance of BasicListUI.  BasicListUI delegates are
-     * allocated one per JList.
+     * Returns a new instance of {@code BasicListUI}.
+     * {@code BasicListUI} delegates are allocated one per {@code JList}.
      *
-     * @return A new ListUI implementation for the Windows look and feel.
+     * @param list a component
+     * @return a new {@code ListUI} implementation for the Windows look and feel.
      */
     public static ComponentUI createUI(JComponent list) {
         return new BasicListUI();
@@ -1046,7 +1108,8 @@
     /**
      * Returns the height of the specified row based on the current layout.
      *
-     * @return The specified row height or -1 if row isn't valid.
+     * @param row a row
+     * @return the specified row height or -1 if row isn't valid
      * @see #convertYToRow
      * @see #convertRowToY
      * @see #updateLayoutState
@@ -1058,11 +1121,12 @@
 
 
     /**
-     * Convert the JList relative coordinate to the row that contains it,
-     * based on the current layout.  If y0 doesn't fall within any row,
+     * Convert the {@code JList} relative coordinate to the row that contains it,
+     * based on the current layout. If {@code y0} doesn't fall within any row,
      * return -1.
      *
-     * @return The row that contains y0, or -1.
+     * @param y0 a relative Y coordinate
+     * @return the row that contains y0, or -1
      * @see #getRowHeight
      * @see #updateLayoutState
      */
@@ -1073,10 +1137,11 @@
 
 
     /**
-     * Return the JList relative Y coordinate of the origin of the specified
+     * Return the {@code JList} relative Y coordinate of the origin of the specified
      * row or -1 if row isn't valid.
      *
-     * @return The Y coordinate of the origin of row, or -1.
+     * @param row a row
+     * @return the Y coordinate of the origin of row, or -1
      * @see #getRowHeight
      * @see #updateLayoutState
      */
@@ -1535,10 +1600,10 @@
 
 
     /**
-     * Creates a delegate that implements MouseInputListener.
-     * The delegate is added to the corresponding java.awt.Component listener
-     * lists at installUI() time. Subclasses can override this method to return
-     * a custom MouseInputListener, e.g.
+     * Creates a delegate that implements {@code MouseInputListener}.
+     * The delegate is added to the corresponding {@code java.awt.Component} listener
+     * lists at {@code installUI()} time. Subclasses can override this method to return
+     * a custom {@code MouseInputListener}, e.g.
      * <pre>
      * class MyListUI extends BasicListUI {
      *    protected MouseInputListener <b>createMouseInputListener</b>() {
@@ -1553,6 +1618,7 @@
      * }
      * </pre>
      *
+     * @return an instance of {@code MouseInputListener}
      * @see MouseInputHandler
      * @see #installUI
      */
@@ -1566,6 +1632,9 @@
      */
     public class FocusHandler implements FocusListener
     {
+        /**
+         * Repaints focused cells.
+         */
         protected void repaintCellFocus()
         {
             getHandler().repaintCellFocus();
@@ -1584,6 +1653,11 @@
         }
     }
 
+    /**
+     * Returns an instance of {@code FocusListener}.
+     *
+     * @return an instance of {@code FocusListener}
+     */
     protected FocusListener createFocusListener() {
         return getHandler();
     }
@@ -1617,9 +1691,9 @@
 
 
     /**
-     * Creates an instance of ListSelectionHandler that's added to
-     * the JLists by selectionModel as needed.  Subclasses can override
-     * this method to return a custom ListSelectionListener, e.g.
+     * Creates an instance of {@code ListSelectionHandler} that's added to
+     * the {@code JLists} by selectionModel as needed.  Subclasses can override
+     * this method to return a custom {@code ListSelectionListener}, e.g.
      * <pre>
      * class MyListUI extends BasicListUI {
      *    protected ListSelectionListener <b>createListSelectionListener</b>() {
@@ -1634,6 +1708,7 @@
      * }
      * </pre>
      *
+     * @return an instance of {@code ListSelectionHandler}
      * @see ListSelectionHandler
      * @see #installUI
      */
@@ -1649,8 +1724,8 @@
 
 
     /**
-     * The ListDataListener that's added to the JLists model at
-     * installUI time, and whenever the JList.model property changes.
+     * The {@code ListDataListener} that's added to the {@code JLists} model at
+     * {@code installUI time}, and whenever the JList.model property changes.
      * <p>
      * <strong>Warning:</strong>
      * Serialized objects of this class will not be compatible with
@@ -1687,9 +1762,9 @@
 
 
     /**
-     * Creates an instance of ListDataListener that's added to
-     * the JLists by model as needed.  Subclasses can override
-     * this method to return a custom ListDataListener, e.g.
+     * Creates an instance of {@code ListDataListener} that's added to
+     * the {@code JLists} by model as needed. Subclasses can override
+     * this method to return a custom {@code ListDataListener}, e.g.
      * <pre>
      * class MyListUI extends BasicListUI {
      *    protected ListDataListener <b>createListDataListener</b>() {
@@ -1704,6 +1779,7 @@
      * }
      * </pre>
      *
+     * @return an instance of {@code ListDataListener}
      * @see ListDataListener
      * @see JList#getModel
      * @see #installUI
@@ -1744,9 +1820,9 @@
 
 
     /**
-     * Creates an instance of PropertyChangeHandler that's added to
-     * the JList by installUI().  Subclasses can override this method
-     * to return a custom PropertyChangeListener, e.g.
+     * Creates an instance of {@code PropertyChangeHandler} that's added to
+     * the {@code JList} by {@code installUI()}. Subclasses can override this method
+     * to return a custom {@code PropertyChangeListener}, e.g.
      * <pre>
      * class MyListUI extends BasicListUI {
      *    protected PropertyChangeListener <b>createPropertyChangeListener</b>() {
@@ -1763,6 +1839,7 @@
      * }
      * </pre>
      *
+     * @return an instance of {@code PropertyChangeHandler}
      * @see PropertyChangeListener
      * @see #installUI
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -455,7 +455,7 @@
         initResourceBundle(table);
 
         // *** Shared Integers
-        Integer fiveHundred = new Integer(500);
+        Integer fiveHundred = 500;
 
         // *** Shared Longs
         Long oneThousand = 1000L;
@@ -673,7 +673,6 @@
         Object editorMargin = threeInsets;
 
         Object caretBlinkRate = fiveHundred;
-        Integer four = new Integer(4);
 
         Object[] allAuditoryCues = new Object[] {
                 "CheckBoxMenuItem.commandSound",
@@ -714,7 +713,7 @@
             "Button.highlight", controlLtHighlight,
             "Button.border", buttonBorder,
             "Button.margin", new InsetsUIResource(2, 14, 2, 14),
-            "Button.textIconGap", four,
+            "Button.textIconGap", 4,
             "Button.textShiftOffset", zero,
             "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
                          "SPACE", "pressed",
@@ -732,7 +731,7 @@
             "ToggleButton.highlight", controlLtHighlight,
             "ToggleButton.border", buttonToggleBorder,
             "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
-            "ToggleButton.textIconGap", four,
+            "ToggleButton.textIconGap", 4,
             "ToggleButton.textShiftOffset", zero,
             "ToggleButton.focusInputMap",
               new UIDefaults.LazyInputMap(new Object[] {
@@ -749,7 +748,7 @@
             "RadioButton.highlight", controlLtHighlight,
             "RadioButton.border", radioButtonBorder,
             "RadioButton.margin", twoInsets,
-            "RadioButton.textIconGap", four,
+            "RadioButton.textIconGap", 4,
             "RadioButton.textShiftOffset", zero,
             "RadioButton.icon", radioButtonIcon,
             "RadioButton.focusInputMap",
@@ -764,7 +763,7 @@
             "CheckBox.foreground", controlText,
             "CheckBox.border", radioButtonBorder,
             "CheckBox.margin", twoInsets,
-            "CheckBox.textIconGap", four,
+            "CheckBox.textIconGap", 4,
             "CheckBox.textShiftOffset", zero,
             "CheckBox.icon", checkBoxIcon,
             "CheckBox.focusInputMap",
@@ -1087,10 +1086,10 @@
             "Menu.margin", twoInsets,
             "Menu.checkIcon", menuItemCheckIcon,
             "Menu.arrowIcon", menuArrowIcon,
-            "Menu.menuPopupOffsetX", new Integer(0),
-            "Menu.menuPopupOffsetY", new Integer(0),
-            "Menu.submenuPopupOffsetX", new Integer(0),
-            "Menu.submenuPopupOffsetY", new Integer(0),
+            "Menu.menuPopupOffsetX", 0,
+            "Menu.menuPopupOffsetY", 0,
+            "Menu.submenuPopupOffsetX", 0,
+            "Menu.submenuPopupOffsetY", 0,
             "Menu.shortcutKeys", new int[]{
                 SwingUtilities2.getSystemMnemonicKeyMask()
             },
@@ -1188,10 +1187,10 @@
             "ProgressBar.selectionForeground", control,
             "ProgressBar.selectionBackground", textHighlight,
             "ProgressBar.border", progressBarBorder,
-            "ProgressBar.cellLength", new Integer(1),
+            "ProgressBar.cellLength", 1,
             "ProgressBar.cellSpacing", zero,
-            "ProgressBar.repaintInterval", new Integer(50),
-            "ProgressBar.cycleTime", new Integer(3000),
+            "ProgressBar.repaintInterval", 50,
+            "ProgressBar.cycleTime", 3000,
             "ProgressBar.horizontalSize", new DimensionUIResource(146, 12),
             "ProgressBar.verticalSize", new DimensionUIResource(12, 146),
 
@@ -1236,7 +1235,7 @@
                         "LEFT", "positiveUnitIncrement",
                      "KP_LEFT", "positiveUnitIncrement",
                  }),
-            "ScrollBar.width", new Integer(16),
+            "ScrollBar.width", 16,
 
             "ScrollPane.font", dialogPlain12,
             "ScrollPane.background", control,
@@ -1332,7 +1331,7 @@
             "SplitPane.shadow", controlShadow,
             "SplitPane.darkShadow", controlDkShadow,
             "SplitPane.border", splitPaneBorder,
-            "SplitPane.dividerSize", new Integer(7),
+            "SplitPane.dividerSize", 7,
             "SplitPaneDivider.border", splitPaneDividerBorder,
             "SplitPaneDivider.draggingColor", darkGray,
             "SplitPane.ancestorInputMap",
@@ -1363,7 +1362,7 @@
             "TabbedPane.darkShadow", controlDkShadow,
             "TabbedPane.selected", null,
             "TabbedPane.focus", controlText,
-            "TabbedPane.textIconGap", four,
+            "TabbedPane.textIconGap", 4,
 
             // Causes tabs to be painted on top of the content area border.
             // The amount of overlap is then controlled by tabAreaInsets.bottom,
@@ -1377,7 +1376,7 @@
             "TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets,
             "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets,
             "TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets,
-            "TabbedPane.tabRunOverlay", new Integer(2),
+            "TabbedPane.tabRunOverlay", 2,
             "TabbedPane.tabsOpaque", Boolean.TRUE,
             "TabbedPane.contentOpaque", Boolean.TRUE,
             "TabbedPane.focusInputMap",
@@ -1737,9 +1736,9 @@
             "Tree.selectionBorderColor", black,
             "Tree.dropLineColor", controlShadow,
             "Tree.editorBorder", blackLineBorder,
-            "Tree.leftChildIndent", new Integer(7),
-            "Tree.rightChildIndent", new Integer(13),
-            "Tree.rowHeight", new Integer(16),
+            "Tree.leftChildIndent", 7,
+            "Tree.rightChildIndent", 13,
+            "Tree.rowHeight", 16,
             "Tree.scrollsOnExpand", Boolean.TRUE,
             "Tree.openIcon", SwingUtilities2.makeIcon(getClass(),
                                                       BasicLookAndFeel.class,
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,11 +54,29 @@
  * @author Arnaud Weber
  */
 public class BasicMenuBarUI extends MenuBarUI  {
+
+    /**
+     * The instance of {@code JMenuBar}.
+     */
     protected JMenuBar              menuBar = null;
+
+    /**
+     * The instance of {@code ContainerListener}.
+     */
     protected ContainerListener     containerListener;
+
+    /**
+     * The instance of {@code ChangeListener}.
+     */
     protected ChangeListener        changeListener;
     private Handler handler;
 
+    /**
+     * Returns a new instance of {@code BasicMenuBarUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicMenuBarUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicMenuBarUI();
     }
@@ -76,6 +94,9 @@
 
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         if (menuBar.getLayout() == null ||
             menuBar.getLayout() instanceof UIResource) {
@@ -90,6 +111,9 @@
                                               "MenuBar.font");
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         containerListener = createContainerListener();
         changeListener = createChangeListener();
@@ -102,6 +126,9 @@
         menuBar.addContainerListener(containerListener);
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
         InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
 
@@ -131,12 +158,18 @@
         menuBar = null;
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         if (menuBar!=null) {
             LookAndFeel.uninstallBorder(menuBar);
         }
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         menuBar.removeContainerListener(containerListener);
 
@@ -151,16 +184,29 @@
         handler = null;
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIInputMap(menuBar, JComponent.
                                        WHEN_IN_FOCUSED_WINDOW, null);
         SwingUtilities.replaceUIActionMap(menuBar, null);
     }
 
+    /**
+     * Returns an instance of {@code ContainerListener}.
+     *
+     * @return an instance of {@code ContainerListener}
+     */
     protected ContainerListener createContainerListener() {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code ChangeListener}.
+     *
+     * @return an instance of {@code ChangeListener}
+     */
     protected ChangeListener createChangeListener() {
         return getHandler();
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,11 +47,29 @@
  */
 public class BasicMenuItemUI extends MenuItemUI
 {
+    /**
+     * The instance of {@code JMenuItem}.
+     */
     protected JMenuItem menuItem = null;
+    /**
+     * The color of the selection background.
+     */
     protected Color selectionBackground;
+    /**
+     * The color of the selection foreground.
+     */
     protected Color selectionForeground;
+    /**
+     * The color of the disabled foreground.
+     */
     protected Color disabledForeground;
+    /**
+     * The color of the accelerator foreground.
+     */
     protected Color acceleratorForeground;
+    /**
+     * The color of the accelerator selection.
+     */
     protected Color acceleratorSelectionForeground;
 
     /**
@@ -60,18 +78,33 @@
      */
     protected String acceleratorDelimiter;
 
+    /**
+     * The gap between the text and the icon.
+     */
     protected int defaultTextIconGap;
+    /**
+     * The accelerator font.
+     */
     protected Font acceleratorFont;
 
+    /**
+     * The instance of {@code MouseInputListener}.
+     */
     protected MouseInputListener mouseInputListener;
+    /**
+     * The instance of {@code MenuDragMouseListener}.
+     */
     protected MenuDragMouseListener menuDragMouseListener;
+    /**
+     * The instance of {@code MenuKeyListener}.
+     */
     protected MenuKeyListener menuKeyListener;
     /**
-     * <code>PropertyChangeListener</code> returned from
-     * <code>createPropertyChangeListener</code>. You should not
+     * {@code PropertyChangeListener} returned from
+     * {@code createPropertyChangeListener}. You should not
      * need to access this field, rather if you want to customize the
-     * <code>PropertyChangeListener</code> override
-     * <code>createPropertyChangeListener</code>.
+     * {@code PropertyChangeListener} override
+     * {@code createPropertyChangeListener}.
      *
      * @since 1.6
      * @see #createPropertyChangeListener
@@ -79,10 +112,17 @@
     protected PropertyChangeListener propertyChangeListener;
     // BasicMenuUI also uses this.
     Handler handler;
-
+    /**
+     * The arrow icon.
+     */
     protected Icon arrowIcon = null;
+    /**
+     * The check icon.
+     */
     protected Icon checkIcon = null;
-
+    /**
+     * The value represents if the old border is painted.
+     */
     protected boolean oldBorderPainted;
 
     /* diagnostic aids -- should be false for production builds. */
@@ -97,6 +137,12 @@
         BasicLookAndFeel.installAudioActionMap(map);
     }
 
+    /**
+     * Returns a new instance of {@code BasicMenuItemUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicMenuItemUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicMenuItemUI();
     }
@@ -110,7 +156,9 @@
         installKeyboardActions();
     }
 
-
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         String prefix = getPropertyPrefix();
 
@@ -202,16 +250,26 @@
     }
 
     /**
+     *
+     * @param menuItem a menu item
      * @since 1.3
      */
     protected void installComponents(JMenuItem menuItem){
         BasicHTML.updateRenderer(menuItem, menuItem.getText());
     }
 
+    /**
+     * Returns a property prefix.
+     *
+     * @return a property prefix
+     */
     protected String getPropertyPrefix() {
         return "MenuItem";
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         if ((mouseInputListener = createMouseInputListener(menuItem)) != null) {
             menuItem.addMouseListener(mouseInputListener);
@@ -228,6 +286,9 @@
         }
     }
 
+    /**
+     * Registers keyboard action.
+     */
     protected void installKeyboardActions() {
         installLazyActionMap();
         updateAcceleratorBinding();
@@ -248,7 +309,9 @@
         menuItem = null;
     }
 
-
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         LookAndFeel.uninstallBorder(menuItem);
         LookAndFeel.installProperty(menuItem, "borderPainted", oldBorderPainted);
@@ -261,12 +324,18 @@
     }
 
     /**
+     * Unregisters components.
+     *
+     * @param menuItem a menu item
      * @since 1.3
      */
     protected void uninstallComponents(JMenuItem menuItem){
         BasicHTML.updateRenderer(menuItem, "");
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         if (mouseInputListener != null) {
             menuItem.removeMouseListener(mouseInputListener);
@@ -289,30 +358,52 @@
         handler = null;
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIActionMap(menuItem, null);
         SwingUtilities.replaceUIInputMap(menuItem, JComponent.
                                          WHEN_IN_FOCUSED_WINDOW, null);
     }
 
+    /**
+     * Returns an instance of {@code MouseInputListener}.
+     *
+     * @param c a component
+     * @return an instance of {@code MouseInputListener}
+     */
     protected MouseInputListener createMouseInputListener(JComponent c) {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code MenuDragMouseListener}.
+     *
+     * @param c a component
+     * @return an instance of {@code MenuDragMouseListener}
+     */
     protected MenuDragMouseListener createMenuDragMouseListener(JComponent c) {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code MenuKeyListener}.
+     *
+     * @param c a component
+     * @return an instance of {@code MenuKeyListener}
+     */
     protected MenuKeyListener createMenuKeyListener(JComponent c) {
         return null;
     }
 
     /**
-     * Creates a <code>PropertyChangeListener</code> which will be added to
+     * Creates a {@code PropertyChangeListener} which will be added to
      * the menu item.
      * If this method returns null then it will not be added to the menu item.
      *
-     * @return an instance of a <code>PropertyChangeListener</code> or null
+     * @param c a component
+     * @return an instance of a {@code PropertyChangeListener} or null
      * @since 1.6
      */
     protected PropertyChangeListener
@@ -380,6 +471,15 @@
         return d;
     }
 
+    /**
+     * Returns the preferred size of a menu item.
+     *
+     * @param c a component
+     * @param checkIcon a check icon
+     * @param arrowIcon an arrow icon
+     * @param defaultTextIconGap a gap between a text and an icon
+     * @return the preferred size of a menu item
+     */
     protected Dimension getPreferredMenuItemSize(JComponent c,
                                                  Icon checkIcon,
                                                  Icon arrowIcon,
@@ -477,6 +577,17 @@
                       defaultTextIconGap);
     }
 
+    /**
+     * Paints a menu item.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param c a component
+     * @param checkIcon a check icon
+     * @param arrowIcon an arrow icon
+     * @param background a background color
+     * @param foreground a foreground color
+     * @param defaultTextIconGap a gap between a text and an icon
+     */
     protected void paintMenuItem(Graphics g, JComponent c,
                                      Icon checkIcon, Icon arrowIcon,
                                      Color background, Color foreground,
@@ -701,6 +812,11 @@
         }
     }
 
+    /**
+     * Returns a menu element path.
+     *
+     * @return a menu element path
+     */
     public MenuElement[] getPath() {
         MenuSelectionManager m = MenuSelectionManager.defaultManager();
         MenuElement oldPath[] = m.getSelectedPath();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,7 +48,14 @@
  */
 public class BasicMenuUI extends BasicMenuItemUI
 {
+    /**
+     * The instance of {@code ChangeListener}.
+     */
     protected ChangeListener         changeListener;
+
+    /**
+     * The instance of {@code MenuListener}.
+     */
     protected MenuListener           menuListener;
 
     private int lastMnemonic = 0;
@@ -63,6 +70,12 @@
 
     private static boolean crossMenuMnemonic = true;
 
+    /**
+     * Constructs a new instance of {@code BasicMenuUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicMenuUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicMenuUI();
     }
@@ -152,10 +165,22 @@
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code MenuListener}.
+     *
+     * @param c a component
+     * @return an instance of {@code MenuListener}
+     */
     protected MenuListener createMenuListener(JComponent c) {
         return null;
     }
 
+    /**
+     * Returns an instance of {@code ChangeListener}.
+     *
+     * @param c a component
+     * @return an instance of {@code ChangeListener}
+     */
     protected ChangeListener createChangeListener(JComponent c) {
         return null;
     }
@@ -208,6 +233,11 @@
         return null;
     }
 
+    /**
+     * Sets timer to the {@code menu}.
+     *
+     * @param menu an instance of {@code JMenu}.
+     */
     protected void setupPostTimer(JMenu menu) {
         Timer timer = new Timer(menu.getDelay(), new Actions(
                                     Actions.SELECT, menu,false));
@@ -388,11 +418,32 @@
      * is now obsolete. KeyBindings are now managed by the popup menu.
      */
     public class ChangeHandler implements ChangeListener {
+        /**
+         * The instance of {@code JMenu}.
+         */
         public JMenu    menu;
+
+        /**
+         * The instance of {@code BasicMenuUI}.
+         */
         public BasicMenuUI ui;
+
+        /**
+         * {@code true} if an item of popup menu is selected.
+         */
         public boolean  isSelected = false;
+
+        /**
+         * The component that was focused.
+         */
         public Component wasFocused;
 
+        /**
+         * Constructs a new instance of {@code ChangeHandler}.
+         *
+         * @param m an instance of {@code JMenu}
+         * @param ui an instance of {@code BasicMenuUI}
+         */
         public ChangeHandler(JMenu m, BasicMenuUI ui) {
             menu = m;
             this.ui = ui;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -79,17 +79,26 @@
  */
 public class BasicOptionPaneUI extends OptionPaneUI {
 
+    /**
+     * The mininum width of {@code JOptionPane}.
+     */
     public static final int MinimumWidth = 262;
+    /**
+     * The mininum height of {@code JOptionPane}.
+     */
     public static final int MinimumHeight = 90;
 
     private static String newline;
 
     /**
-     * <code>JOptionPane</code> that the receiver is providing the
+     * {@code JOptionPane} that the receiver is providing the
      * look and feel for.
      */
     protected JOptionPane         optionPane;
 
+    /**
+     * The size of {@code JOptionPane}.
+     */
     protected Dimension minimumSize;
 
     /** JComponent provide for input if optionPane.getWantsInput() returns
@@ -103,6 +112,9 @@
      * in either the message or the buttons. */
     protected boolean             hasCustomComponents;
 
+    /**
+     * The instance of {@code PropertyChangeListener}.
+     */
     protected PropertyChangeListener propertyChangeListener;
 
     private Handler handler;
@@ -123,8 +135,10 @@
 
 
     /**
-      * Creates a new BasicOptionPaneUI instance.
-      */
+     * Creates a new {@code BasicOptionPaneUI} instance.
+     *
+     * @return a new {@code BasicOptionPaneUI} instance
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicOptionPaneUI();
     }
@@ -155,6 +169,9 @@
         optionPane = null;
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background",
                                          "OptionPane.foreground", "OptionPane.font");
@@ -163,10 +180,16 @@
         LookAndFeel.installProperty(optionPane, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         LookAndFeel.uninstallBorder(optionPane);
     }
 
+    /**
+     * Registers components.
+     */
     protected void installComponents() {
         optionPane.add(createMessageArea());
 
@@ -178,6 +201,9 @@
         optionPane.applyComponentOrientation(optionPane.getComponentOrientation());
     }
 
+    /**
+     * Unregisters components.
+     */
     protected void uninstallComponents() {
         hasCustomComponents = false;
         inputComponent = null;
@@ -185,16 +211,27 @@
         optionPane.removeAll();
     }
 
+    /**
+     * Returns a layout manager.
+     *
+     * @return a layout manager
+     */
     protected LayoutManager createLayoutManager() {
         return new BoxLayout(optionPane, BoxLayout.Y_AXIS);
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         if ((propertyChangeListener = createPropertyChangeListener()) != null) {
             optionPane.addPropertyChangeListener(propertyChangeListener);
         }
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         if (propertyChangeListener != null) {
             optionPane.removePropertyChangeListener(propertyChangeListener);
@@ -203,6 +240,11 @@
         handler = null;
     }
 
+    /**
+     * Returns an instance of {@code PropertyChangeListener}.
+     *
+     * @return an instance of {@code PropertyChangeListener}
+     */
     protected PropertyChangeListener createPropertyChangeListener() {
         return getHandler();
     }
@@ -214,6 +256,9 @@
         return handler;
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
         InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
 
@@ -224,6 +269,9 @@
                                            "OptionPane.actionMap");
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIInputMap(optionPane, JComponent.
                                        WHEN_IN_FOCUSED_WINDOW, null);
@@ -244,6 +292,8 @@
     /**
      * Returns the minimum size the option pane should be. Primarily
      * provided for subclassers wishing to offer a different minimum size.
+     *
+     * @return the minimum size of the option pane
      */
     public Dimension getMinimumOptionPaneSize() {
         if (minimumSize == null) {
@@ -280,9 +330,11 @@
     }
 
     /**
-     * Messaged from installComponents to create a Container containing the
-     * body of the message. The icon is the created by calling
-     * <code>addIcon</code>.
+     * Messaged from {@code installComponents} to create a {@code Container}
+     * containing the body of the message. The icon is the created
+     * by calling {@code addIcon}.
+     *
+     * @return a instance of {@code Container}
      */
     protected Container createMessageArea() {
         JPanel top = new JPanel();
@@ -325,15 +377,21 @@
     }
 
     /**
-     * Creates the appropriate object to represent <code>msg</code> and
-     * places it into <code>container</code>. If <code>msg</code> is an
-     * instance of Component, it is added directly, if it is an Icon,
-     * a JLabel is created to represent it, otherwise a JLabel is
-     * created for the string, if <code>d</code> is an Object[], this
-     * method will be recursively invoked for the children.
-     * <code>internallyCreated</code> is true if Objc is an instance
-     * of Component and was created internally by this method (this is
-     * used to correctly set hasCustomComponents only if !internallyCreated).
+     * Creates the appropriate object to represent {@code msg} and
+     * places it into {@code container}. If {@code msg} is an instance of
+     * {@code Component}, it is added directly, if it is an {@code Icon},
+     * a {@code JLabel} is created to represent it, otherwise a {@code JLabel} is
+     * created for the string, if {@code d} is an Object[], this method
+     * will be recursively invoked for the children. {@code internallyCreated} is
+     * {@code true} if Objc is an instance of {@code Component} and was created
+     * internally by this method (this is used to correctly set
+     * {@code hasCustomComponents} only if {@code internallyCreated} is {@code false}).
+     *
+     * @param container a container
+     * @param cons an instance of {@code GridBagConstraints}
+     * @param msg a message
+     * @param maxll a maximum length
+     * @param internallyCreated {@code true} if the component was internally created
      */
     protected void addMessageComponents(Container container,
                                      GridBagConstraints cons,
@@ -431,8 +489,10 @@
     }
 
     /**
-     * Returns the message to display from the JOptionPane the receiver is
+     * Returns the message to display from the {@code JOptionPane} the receiver is
      * providing the look and feel for.
+     *
+     * @return the message to display
      */
     protected Object getMessage() {
         inputComponent = null;
@@ -514,8 +574,10 @@
 
     /**
      * Creates and adds a JLabel representing the icon returned from
-     * <code>getIcon</code> to <code>top</code>. This is messaged from
-     * <code>createMessageArea</code>
+     * {@code getIcon} to {@code top}. This is messaged from
+     * {@code createMessageArea}.
+     *
+     * @param top a container
      */
     protected void addIcon(Container top) {
         /* Create the icon. */
@@ -531,9 +593,11 @@
     }
 
     /**
-     * Returns the icon from the JOptionPane the receiver is providing
+     * Returns the icon from the {@code JOptionPane} the receiver is providing
      * the look and feel for, or the default icon as returned from
-     * <code>getDefaultIcon</code>.
+     * {@code getDefaultIcon}.
+     *
+     * @return the icon
      */
     protected Icon getIcon() {
         Icon      mIcon = (optionPane == null ? null : optionPane.getIcon());
@@ -545,6 +609,9 @@
 
     /**
      * Returns the icon to use for the passed in type.
+     *
+     * @param messageType a type of message
+     * @return the icon to use for the passed in type
      */
     protected Icon getIconForType(int messageType) {
         if(messageType < 0 || messageType > 3)
@@ -572,14 +639,20 @@
 
     /**
      * Returns the maximum number of characters to place on a line.
+     *
+     * @return the maximum number of characters to place on a line
      */
     protected int getMaxCharactersPerLineCount() {
         return optionPane.getMaxCharactersPerLineCount();
     }
 
-   /**
-     * Recursively creates new JLabel instances to represent <code>d</code>.
-     * Each JLabel instance is added to <code>c</code>.
+    /**
+     * Recursively creates new {@code JLabel} instances to represent {@code d}.
+     * Each {@code JLabel} instance is added to {@code c}.
+     *
+     * @param c a container
+     * @param d a text
+     * @param maxll a maximum length of a text
      */
     protected void burstStringInto(Container c, String d, int maxll) {
         // Primitive line wrapping
@@ -602,13 +675,20 @@
         c.add(label);
     }
 
+    /**
+     * Returns a separator.
+     *
+     * @return a separator
+     */
     protected Container createSeparator() {
         return null;
     }
 
     /**
-     * Creates and returns a Container containing the buttons. The buttons
-     * are created by calling <code>getButtons</code>.
+     * Creates and returns a {@code Container} containing the buttons.
+     * The buttons are created by calling {@code getButtons}.
+     *
+     * @return a {@code Container} containing the buttons
      */
     protected Container createButtonArea() {
         JPanel bottom = new JPanel();
@@ -633,10 +713,14 @@
 
     /**
      * Creates the appropriate object to represent each of the objects in
-     * <code>buttons</code> and adds it to <code>container</code>. This
+     * {@code buttons} and adds it to {@code container}. This
      * differs from addMessageComponents in that it will recurse on
-     * <code>buttons</code> and that if button is not a Component
+     * {@code buttons} and that if button is not a Component
      * it will create an instance of JButton.
+     *
+     * @param container a container
+     * @param buttons an array of buttons
+     * @param initialIndex an initial index
      */
     protected void addButtonComponents(Container container, Object[] buttons,
                                  int initialIndex) {
@@ -733,17 +817,25 @@
         }
     }
 
+    /**
+     * Constructs a new instance of a {@code ButtonActionListener}.
+     *
+     * @param buttonIndex an index of the button
+     * @return a new instance of a {@code ButtonActionListener}
+     */
     protected ActionListener createButtonActionListener(int buttonIndex) {
         return new ButtonActionListener(buttonIndex);
     }
 
     /**
-     * Returns the buttons to display from the JOptionPane the receiver is
-     * providing the look and feel for. If the JOptionPane has options
+     * Returns the buttons to display from the {@code JOptionPane} the receiver is
+     * providing the look and feel for. If the {@code JOptionPane} has options
      * set, they will be provided, otherwise if the optionType is
-     * YES_NO_OPTION, yesNoOptions is returned, if the type is
-     * YES_NO_CANCEL_OPTION yesNoCancelOptions is returned, otherwise
-     * defaultButtons are returned.
+     * {@code YES_NO_OPTION}, {@code yesNoOptions} is returned, if the type is
+     * {@code YES_NO_CANCEL_OPTION} {@code yesNoCancelOptions} is returned, otherwise
+     * {@code defaultButtons} are returned.
+     *
+     * @return the buttons to display from the JOptionPane
      */
     protected Object[] getButtons() {
         if (optionPane != null) {
@@ -827,8 +919,10 @@
     }
 
     /**
-     * Returns true, basic L&amp;F wants all the buttons to have the same
+     * Returns {@code true}, basic L&amp;F wants all the buttons to have the same
      * width.
+     *
+     * @return {@code true} if all the buttons should have the same width
      */
     protected boolean getSizeButtonsToSameWidth() {
         return true;
@@ -838,6 +932,8 @@
      * Returns the initial index into the buttons to select. The index
      * is calculated from the initial value from the JOptionPane and
      * options of the JOptionPane or 0.
+     *
+     * @return the initial index into the buttons to select
      */
     protected int getInitialValueIndex() {
         if (optionPane != null) {
@@ -915,7 +1011,13 @@
      * Instantiate it only within subclasses of {@code BasicOptionPaneUI}.
      */
     public static class ButtonAreaLayout implements LayoutManager {
+        /**
+         * The value represents if the width of children should be synchronized.
+         */
         protected boolean           syncAllWidths;
+        /**
+         * The padding value.
+         */
         protected int               padding;
         /** If true, children are lumped together in parent. */
         protected boolean           centersChildren;
@@ -928,6 +1030,12 @@
          */
         private boolean useOrientation;
 
+        /**
+         * Constructs a new instance of {@code ButtonAreaLayout}.
+         *
+         * @param syncAllWidths if the width of children should be synchronized
+         * @param padding the padding value
+         */
         public ButtonAreaLayout(boolean syncAllWidths, int padding) {
             this.syncAllWidths = syncAllWidths;
             this.padding = padding;
@@ -943,27 +1051,57 @@
             this.reverseButtons = reverseButtons;
         }
 
+        /**
+         * Sets if the width of children should be synchronized.
+         *
+         * @param newValue if the width of children should be synchronized
+         */
         public void setSyncAllWidths(boolean newValue) {
             syncAllWidths = newValue;
         }
 
+        /**
+         * Returns if the width of children should be synchronized.
+         *
+         * @return if the width of children should be synchronized
+         */
         public boolean getSyncAllWidths() {
             return syncAllWidths;
         }
 
+        /**
+         * Sets the padding value.
+         *
+         * @param newPadding the new padding
+         */
         public void setPadding(int newPadding) {
             this.padding = newPadding;
         }
 
+        /**
+         * Returns the padding.
+         *
+         * @return the padding
+         */
         public int getPadding() {
             return padding;
         }
 
+        /**
+         * Sets whether or not center children should be used.
+         *
+         * @param newValue a new value
+         */
         public void setCentersChildren(boolean newValue) {
             centersChildren = newValue;
             useOrientation = false;
         }
 
+        /**
+         * Returns whether or not center children should be used.
+         *
+         * @return whether or not center children should be used
+         */
         public boolean getCentersChildren() {
             return centersChildren;
         }
@@ -1163,8 +1301,16 @@
      * Instantiate it only within subclasses of {@code BasicOptionPaneUI}.
      */
     public class ButtonActionListener implements ActionListener {
+        /**
+         * The index of the button.
+         */
         protected int buttonIndex;
 
+        /**
+         * Constructs a new instance of {@code ButtonActionListener}.
+         *
+         * @param buttonIndex an index of the button
+         */
         public ButtonActionListener(int buttonIndex) {
             this.buttonIndex = buttonIndex;
         }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPanelUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPanelUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -43,6 +43,12 @@
     // Shared UI object
     private static PanelUI panelUI;
 
+    /**
+     * Returns an instance of {@code BasicPanelUI}.
+     *
+     * @param c a component
+     * @return an instance of {@code BasicPanelUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         if(panelUI == null) {
             panelUI = new BasicPanelUI();
@@ -62,6 +68,11 @@
         super.uninstallUI(c);
     }
 
+    /**
+     * Method for installing panel properties.
+     *
+     * @param p an instance of {@code JPanel}
+     */
     protected void installDefaults(JPanel p) {
         LookAndFeel.installColorsAndFont(p,
                                          "Panel.background",
@@ -71,6 +82,11 @@
         LookAndFeel.installProperty(p, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Method for uninstalling panel properties.
+     *
+     * @param p an instance of {@code JPanel}
+     */
     protected void uninstallDefaults(JPanel p) {
         LookAndFeel.uninstallBorder(p);
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -42,6 +42,12 @@
 
 public class BasicPopupMenuSeparatorUI extends BasicSeparatorUI
 {
+    /**
+     * Returns a new instance of {@code BasicPopupMenuSeparatorUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicPopupMenuSeparatorUI}
+     */
     public static ComponentUI createUI( JComponent c )
     {
         return new BasicPopupMenuSeparatorUI();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -66,6 +66,9 @@
     static final StringBuilder MENU_KEYBOARD_HELPER_KEY = new StringBuilder(
                    "javax.swing.plaf.basic.BasicPopupMenuUI.MenuKeyboardHelper");
 
+    /**
+     * The instance of {@code JPopupMenu}.
+     */
     protected JPopupMenu popupMenu = null;
     private transient PopupMenuListener popupMenuListener = null;
     private MenuKeyListener menuKeyListener = null;
@@ -73,10 +76,19 @@
     private static boolean checkedUnpostPopup;
     private static boolean unpostPopup;
 
+    /**
+     * Constructs a new instance of {@code BasicPopupMenuUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicPopupMenuUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicPopupMenuUI();
     }
 
+    /**
+     * Constructs a new instance of {@code BasicPopupMenuUI}.
+     */
     public BasicPopupMenuUI() {
         BasicLookAndFeel.needsEventHelper = true;
         LookAndFeel laf = UIManager.getLookAndFeel();
@@ -93,6 +105,9 @@
         installKeyboardActions();
     }
 
+    /**
+     * Installs default properties.
+     */
     public void installDefaults() {
         if (popupMenu.getLayout() == null ||
             popupMenu.getLayout() instanceof UIResource)
@@ -101,11 +116,14 @@
         LookAndFeel.installProperty(popupMenu, "opaque", Boolean.TRUE);
         LookAndFeel.installBorder(popupMenu, "PopupMenu.border");
         LookAndFeel.installColorsAndFont(popupMenu,
-                                         "PopupMenu.background",
-                                         "PopupMenu.foreground",
-                                         "PopupMenu.font");
+                "PopupMenu.background",
+                "PopupMenu.foreground",
+                "PopupMenu.font");
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         if (popupMenuListener == null) {
             popupMenuListener = new BasicPopupMenuListener();
@@ -138,6 +156,9 @@
         }
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
     }
 
@@ -181,10 +202,16 @@
         popupMenu = null;
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         LookAndFeel.uninstallBorder(popupMenu);
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         if (popupMenuListener != null) {
             popupMenu.removePopupMenuListener(popupMenuListener);
@@ -194,6 +221,9 @@
         }
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIActionMap(popupMenu, null);
         SwingUtilities.replaceUIInputMap(popupMenu,
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -53,7 +53,13 @@
 
     private Animator animator;
 
+    /**
+     * The instance of {@code JProgressBar}.
+     */
     protected JProgressBar progressBar;
+    /**
+     * The instance of {@code ChangeListener}.
+     */
     protected ChangeListener changeListener;
     private Handler handler;
 
@@ -127,7 +133,12 @@
 
     private int maxPosition = 0; //maximum X (horiz) or Y box location
 
-
+    /**
+     * Returns a new instance of {@code BasicProgressBarUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicProgressBarUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicProgressBarUI();
     }
@@ -150,6 +161,9 @@
         progressBar = null;
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         LookAndFeel.installProperty(progressBar, "opaque", Boolean.TRUE);
         LookAndFeel.installBorder(progressBar,"ProgressBar.border");
@@ -164,10 +178,16 @@
         selectionBackground = UIManager.getColor("ProgressBar.selectionBackground");
     }
 
+    /**
+     * Unintalls default properties.
+     */
     protected void uninstallDefaults() {
         LookAndFeel.uninstallBorder(progressBar);
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         //Listen for changes in the progress bar's data.
         changeListener = getHandler();
@@ -291,6 +311,11 @@
     // protected void installKeyboardActions()
     // protected void uninstallKeyboardActions()
 
+    /**
+     * Returns preferred size of the horizontal {@code JProgressBar}.
+     *
+     * @return preferred size of the horizontal {@code JProgressBar}
+     */
     protected Dimension getPreferredInnerHorizontal() {
         Dimension horizDim = (Dimension)DefaultLookup.get(progressBar, this,
             "ProgressBar.horizontalSize");
@@ -300,6 +325,11 @@
         return horizDim;
     }
 
+    /**
+     * Returns preferred size of the vertical {@code JProgressBar}.
+     *
+     * @return preferred size of the vertical {@code JProgressBar}
+     */
     protected Dimension getPreferredInnerVertical() {
         Dimension vertDim = (Dimension)DefaultLookup.get(progressBar, this,
             "ProgressBar.verticalSize");
@@ -312,6 +342,8 @@
     /**
      * The "selectionForeground" is the color of the text when it is painted
      * over a filled area of the progress bar.
+     *
+     * @return the color of the selected foreground
      */
     protected Color getSelectionForeground() {
         return selectionForeground;
@@ -320,6 +352,8 @@
     /**
      * The "selectionBackground" is the color of the text when it is painted
      * over an unfilled area of the progress bar.
+     *
+     * @return the color of the selected background
      */
     protected Color getSelectionBackground() {
         return selectionBackground;
@@ -352,6 +386,11 @@
         }
     }
 
+    /**
+     * Sets the cell length.
+     *
+     * @param cellLen a new cell length
+     */
     protected void setCellLength(int cellLen) {
         this.cellLength = cellLen;
     }
@@ -374,6 +413,11 @@
         }
     }
 
+    /**
+     * Sets the cell spacing.
+     *
+     * @param cellSpace a new cell spacing
+     */
     protected void setCellSpacing(int cellSpace) {
         this.cellSpacing = cellSpace;
     }
@@ -384,6 +428,11 @@
      * operation so it was abstracted out. It assumes that your progress bar
      * is linear. That is, if you are making a circular progress indicator,
      * you will want to override this method.
+     *
+     * @param b insets
+     * @param width a width
+     * @param height a height
+     * @return the amount of the progress bar that should be filled
      */
     protected int getAmountFull(Insets b, int width, int height) {
         int amountFull = 0;
@@ -577,6 +626,8 @@
      * Override this if you are making another kind of
      * progress bar.
      *
+     * @param g an instance of {@code Graphics}
+     * @param c a component
      * @see #paintDeterminate
      *
      * @since 1.4
@@ -628,6 +679,8 @@
      * Naturally, override this if you are making a circular or
      * semi-circular progress bar.
      *
+     * @param g an instance of {@code Graphics}
+     * @param c a component
      * @see #paintIndeterminate
      *
      * @since 1.4
@@ -703,7 +756,18 @@
         }
     }
 
-
+    /**
+     * Paints the progress string.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x X location of bounding box
+     * @param y Y location of bounding box
+     * @param width width of bounding box
+     * @param height height of bounding box
+     * @param amountFull size of the fill region, either width or height
+     *        depending upon orientation.
+     * @param b Insets of the progress bar.
+     */
     protected void paintString(Graphics g, int x, int y,
                                int width, int height,
                                int amountFull, Insets b) {
@@ -793,6 +857,14 @@
      * bar (in both x and y). Override this if you want to right,
      * left, top, or bottom align the progress string or if you need
      * to nudge it around for any reason.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param progressString a text
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     * @param width a width
+     * @param height a height
+     * @return the place where the progress string will be painted
      */
     protected Point getStringPlacement(Graphics g, String progressString,
                                        int x,int y,int width,int height) {
@@ -894,6 +966,7 @@
     /**
      * Gets the index of the current animation frame.
      *
+     * @return the index of the current animation frame
      * @since 1.4
      */
     protected int getAnimationIndex() {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -39,6 +39,12 @@
  */
 public class BasicRadioButtonMenuItemUI extends BasicMenuItemUI
 {
+    /**
+     * Returns a new instance of {@code BasicRadioButtonMenuItemUI}.
+     *
+     * @param b a component
+     * @return a new instance of {@code BasicRadioButtonMenuItemUI}
+     */
     public static ComponentUI createUI(JComponent b) {
         return new BasicRadioButtonMenuItemUI();
     }
@@ -47,6 +53,14 @@
         return "RadioButtonMenuItem";
     }
 
+    /**
+     * Invoked when mouse event occurs.
+     *
+     * @param item a menu item
+     * @param e a mouse event
+     * @param path an array of {@code MenuElement}
+     * @param manager an instance of {@code MenuSelectionManager}
+     */
     public void processMouseEvent(JMenuItem item,MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
         Point p = e.getPoint();
         if(p.x >= 0 && p.x < item.getWidth() &&
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -44,6 +44,9 @@
 {
     private static final Object BASIC_RADIO_BUTTON_UI_KEY = new Object();
 
+    /**
+     * The icon.
+     */
     protected Icon icon;
 
     private boolean defaults_initialized = false;
@@ -53,6 +56,13 @@
     // ********************************
     //        Create PLAF
     // ********************************
+
+    /**
+     * Returns an instance of {@code BasicRadioButtonUI}.
+     *
+     * @param b a component
+     * @return an instance of {@code BasicRadioButtonUI}
+     */
     public static ComponentUI createUI(JComponent b) {
         AppContext appContext = AppContext.getAppContext();
         BasicRadioButtonUI radioButtonUI =
@@ -87,6 +97,11 @@
         defaults_initialized = false;
     }
 
+    /**
+     * Returns the default icon.
+     *
+     * @return the default icon
+     */
     public Icon getDefaultIcon() {
         return icon;
     }
@@ -195,6 +210,13 @@
         }
     }
 
+    /**
+     * Paints focused radio button.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param textRect bounds
+     * @param size the size of radio button
+     */
     protected void paintFocus(Graphics g, Rectangle textRect, Dimension size){
     }
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicRootPaneUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicRootPaneUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,6 +48,12 @@
                   PropertyChangeListener {
     private static RootPaneUI rootPaneUI = new BasicRootPaneUI();
 
+    /**
+     * Returns a new instance of {@code BasicRootPaneUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicRootPaneUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return rootPaneUI;
     }
@@ -67,17 +73,37 @@
         uninstallKeyboardActions((JRootPane)c);
     }
 
+    /**
+     * Installs default properties.
+     *
+     * @param c an instance of {@code JRootPane}
+     */
     protected void installDefaults(JRootPane c){
         LookAndFeel.installProperty(c, "opaque", Boolean.FALSE);
     }
 
+    /**
+     * Installs components.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void installComponents(JRootPane root) {
     }
 
+    /**
+     * Registers listeners.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void installListeners(JRootPane root) {
         root.addPropertyChangeListener(this);
     }
 
+    /**
+     * Registers keyboard actions.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void installKeyboardActions(JRootPane root) {
         InputMap km = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW, root);
         SwingUtilities.replaceUIInputMap(root,
@@ -92,19 +118,39 @@
         updateDefaultButtonBindings(root);
     }
 
+    /**
+     * Uninstalls default properties.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void uninstallDefaults(JRootPane root) {
     }
 
+    /**
+     * Unregisters components.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void uninstallComponents(JRootPane root) {
     }
 
+    /**
+     * Unregisters listeners.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void uninstallListeners(JRootPane root) {
         root.removePropertyChangeListener(this);
     }
 
+    /**
+     * Unregisters keyboard actions.
+     *
+     * @param root an instance of {@code JRootPane}
+     */
     protected void uninstallKeyboardActions(JRootPane root) {
         SwingUtilities.replaceUIInputMap(root, JComponent.
-                                       WHEN_IN_FOCUSED_WINDOW, null);
+                WHEN_IN_FOCUSED_WINDOW, null);
         SwingUtilities.replaceUIActionMap(root, null);
     }
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -52,21 +52,40 @@
 public class BasicScrollPaneUI
     extends ScrollPaneUI implements ScrollPaneConstants
 {
+    /**
+     * The instance of {@code JScrollPane}.
+     */
     protected JScrollPane scrollpane;
+
+    /**
+     * {@code ChangeListener} installed on the vertical scrollbar.
+     */
     protected ChangeListener vsbChangeListener;
+
+    /**
+     * {@code ChangeListener} installed on the horizontal scrollbar.
+     */
     protected ChangeListener hsbChangeListener;
+
+    /**
+     * {@code ChangeListener} installed on the viewport.
+     */
     protected ChangeListener viewportChangeListener;
+
+    /**
+     * {@code PropertyChangeListener} installed on the scroll pane.
+     */
     protected PropertyChangeListener spPropertyChangeListener;
     private MouseWheelListener mouseScrollListener;
     private int oldExtent = Integer.MIN_VALUE;
 
     /**
-     * PropertyChangeListener installed on the vertical scrollbar.
+     * {@code PropertyChangeListener} installed on the vertical scrollbar.
      */
     private PropertyChangeListener vsbPropertyChangeListener;
 
     /**
-     * PropertyChangeListener installed on the horizontal scrollbar.
+     * {@code PropertyChangeListener} installed on the horizontal scrollbar.
      */
     private PropertyChangeListener hsbPropertyChangeListener;
 
@@ -79,7 +98,12 @@
      */
     private boolean setValueCalled = false;
 
-
+    /**
+     * Returns a new instance of {@code BasicScrollPaneUI}.
+     *
+     * @param x a component.
+     * @return a new instance of {@code BasicScrollPaneUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicScrollPaneUI();
     }
@@ -115,7 +139,11 @@
         return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
     }
 
-
+    /**
+     * Installs default properties.
+     *
+     * @param scrollpane an instance of {@code JScrollPane}
+     */
     protected void installDefaults(JScrollPane scrollpane)
     {
         LookAndFeel.installBorder(scrollpane, "ScrollPane.border");
@@ -132,7 +160,11 @@
         LookAndFeel.installProperty(scrollpane, "opaque", Boolean.TRUE);
     }
 
-
+    /**
+     * Registers listeners.
+     *
+     * @param c an instance of {@code JScrollPane}
+     */
     protected void installListeners(JScrollPane c)
     {
         vsbChangeListener = createVSBChangeListener();
@@ -165,6 +197,11 @@
 
     }
 
+    /**
+     * Registers keyboard actions.
+     *
+     * @param c an instance of {@code JScrollPane}
+     */
     protected void installKeyboardActions(JScrollPane c) {
         InputMap inputMap = getInputMap(JComponent.
                                   WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
@@ -201,7 +238,11 @@
         installKeyboardActions(scrollpane);
     }
 
-
+    /**
+     * Uninstalls default properties.
+     *
+     * @param c an instance of {@code JScrollPane}
+     */
     protected void uninstallDefaults(JScrollPane c) {
         LookAndFeel.uninstallBorder(scrollpane);
 
@@ -210,7 +251,11 @@
         }
     }
 
-
+    /**
+     * Unregisters listeners.
+     *
+     * @param c a component
+     */
     protected void uninstallListeners(JComponent c) {
         JViewport viewport = scrollpane.getViewport();
         JScrollBar vsb = scrollpane.getVerticalScrollBar();
@@ -242,7 +287,11 @@
         handler = null;
     }
 
-
+    /**
+     * Unregisters keyboard actions.
+     *
+     * @param c an instance of {@code JScrollPane}
+     */
     protected void uninstallKeyboardActions(JScrollPane c) {
         SwingUtilities.replaceUIActionMap(c, null);
         SwingUtilities.replaceUIInputMap(c, JComponent.
@@ -264,6 +313,9 @@
         return handler;
     }
 
+    /**
+     * Synchronizes the {@code JScrollPane} with {@code Viewport}.
+     */
     protected void syncScrollPaneWithViewport()
     {
         JViewport viewport = scrollpane.getViewport();
@@ -453,6 +505,11 @@
         }
     }
 
+    /**
+     * Returns an instance of viewport {@code ChangeListener}.
+     *
+     * @return an instance of viewport {@code ChangeListener}
+     */
     protected ChangeListener createViewportChangeListener() {
         return getHandler();
     }
@@ -483,6 +540,11 @@
         return getHandler();
     }
 
+    /**
+     * Returns an instance of horizontal scroll bar {@code ChangeListener}.
+     *
+     * @return an instance of horizontal scroll bar {@code ChangeListener}
+     */
     protected ChangeListener createHSBChangeListener() {
         return getHandler();
     }
@@ -514,6 +576,11 @@
         return getHandler();
     }
 
+    /**
+     * Returns an instance of vertical scroll bar {@code ChangeListener}.
+     *
+     * @return an instance of vertical scroll bar {@code ChangeListener}
+     */
     protected ChangeListener createVSBChangeListener() {
         return getHandler();
     }
@@ -565,12 +632,21 @@
         return getHandler();
     }
 
+    /**
+     * Updates a scroll bar display policy.
+     *
+     * @param e the property change event
+     */
     protected void updateScrollBarDisplayPolicy(PropertyChangeEvent e) {
         scrollpane.revalidate();
         scrollpane.repaint();
     }
 
-
+    /**
+     * Updates viewport.
+     *
+     * @param e the property change event
+     */
     protected void updateViewport(PropertyChangeEvent e)
     {
         JViewport oldViewport = (JViewport)(e.getOldValue());
@@ -599,7 +675,11 @@
         }
     }
 
-
+    /**
+     * Updates row header.
+     *
+     * @param e the property change event
+     */
     protected void updateRowHeader(PropertyChangeEvent e)
     {
         JViewport newRowHead = (JViewport)(e.getNewValue());
@@ -611,7 +691,11 @@
         }
     }
 
-
+    /**
+     * Updates column header.
+     *
+     * @param e the property change event
+     */
     protected void updateColumnHeader(PropertyChangeEvent e)
     {
         JViewport newColHead = (JViewport)(e.getNewValue());
@@ -679,9 +763,9 @@
 
 
     /**
-     * Creates an instance of PropertyChangeListener that's added to
-     * the JScrollPane by installUI().  Subclasses can override this method
-     * to return a custom PropertyChangeListener, e.g.
+     * Creates an instance of {@code PropertyChangeListener} that's added to
+     * the {@code JScrollPane} by {@code installUI()}. Subclasses can override
+     * this method to return a custom {@code PropertyChangeListener}, e.g.
      * <pre>
      * class MyScrollPaneUI extends BasicScrollPaneUI {
      *    protected PropertyChangeListener <b>createPropertyChangeListener</b>() {
@@ -698,6 +782,8 @@
      * }
      * </pre>
      *
+     * @return an instance of {@code PropertyChangeListener}
+     *
      * @see java.beans.PropertyChangeListener
      * @see #installUI
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSeparatorUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSeparatorUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,9 +45,22 @@
 
 public class BasicSeparatorUI extends SeparatorUI
 {
+    /**
+     * The color of the shadow.
+     */
     protected Color shadow;
+
+    /**
+     * The color of the highlighting.
+     */
     protected Color highlight;
 
+    /**
+     * Returns a new instance of {@code BasicSeparatorUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicSeparatorUI}
+     */
     public static ComponentUI createUI( JComponent c )
     {
         return new BasicSeparatorUI();
@@ -65,20 +78,40 @@
         uninstallListeners( (JSeparator)c );
     }
 
+    /**
+     * Installs default properties.
+     *
+     * @param s an instance of {@code JSeparator}
+     */
     protected void installDefaults( JSeparator s )
     {
-        LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" );
-        LookAndFeel.installProperty( s, "opaque", Boolean.FALSE);
+        LookAndFeel.installColors(s, "Separator.background", "Separator.foreground");
+        LookAndFeel.installProperty(s, "opaque", Boolean.FALSE);
     }
 
+    /**
+     * Uninstalls default properties.
+     *
+     * @param s an instance of {@code JSeparator}
+     */
     protected void uninstallDefaults( JSeparator s )
     {
     }
 
+    /**
+     * Registers listeners.
+     *
+     * @param s an instance of {@code JSeparator}
+     */
     protected void installListeners( JSeparator s )
     {
     }
 
+    /**
+     * Unregisters listeners.
+     *
+     * @param s an instance of {@code JSeparator}
+     */
     protected void uninstallListeners( JSeparator s )
     {
     }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSpinnerUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSpinnerUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -400,6 +400,8 @@
      * The implementation of <code>replaceEditor</code> should be coordinated
      * with the <code>createEditor</code> method.
      *
+     * @param oldEditor an old instance of editor
+     * @param newEditor a new instance of editor
      * @see #createEditor
      * @see #createPropertyChangeListener
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -65,9 +65,13 @@
 {
     /**
      * Width or height of the divider based on orientation
-     * BasicSplitPaneUI adds two to this.
+     * {@code BasicSplitPaneUI} adds two to this.
      */
     protected static final int ONE_TOUCH_SIZE = 6;
+
+    /**
+     * The offset of the divider.
+     */
     protected static final int ONE_TOUCH_OFFSET = 2;
 
     /**
@@ -136,8 +140,10 @@
 
 
     /**
-     * Creates an instance of BasicSplitPaneDivider. Registers this
+     * Creates an instance of {@code BasicSplitPaneDivider}. Registers this
      * instance for mouse events and mouse dragged events.
+     *
+     * @param ui an instance of {@code BasicSplitPaneUI}
      */
     public BasicSplitPaneDivider(BasicSplitPaneUI ui) {
         oneTouchSize = DefaultLookup.getInt(ui.getSplitPane(), ui,
@@ -163,7 +169,9 @@
     }
 
     /**
-     * Sets the SplitPaneUI that is using the receiver.
+     * Sets the {@code SplitPaneUI} that is using the receiver.
+     *
+     * @param newUI the new {@code SplitPaneUI}
      */
     public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
         if (splitPane != null) {
@@ -198,8 +206,9 @@
 
 
     /**
-     * Returns the <code>SplitPaneUI</code> the receiver is currently
-     * in.
+     * Returns the {@code SplitPaneUI} the receiver is currently in.
+     *
+     * @return the {@code SplitPaneUI} the receiver is currently in
      */
     public BasicSplitPaneUI getBasicSplitPaneUI() {
         return splitPaneUI;
@@ -207,9 +216,11 @@
 
 
     /**
-     * Sets the size of the divider to <code>newSize</code>. That is
-     * the width if the splitpane is <code>HORIZONTAL_SPLIT</code>, or
-     * the height of <code>VERTICAL_SPLIT</code>.
+     * Sets the size of the divider to {@code newSize}. That is
+     * the width if the splitpane is {@code HORIZONTAL_SPLIT}, or
+     * the height of {@code VERTICAL_SPLIT}.
+     *
+     * @param newSize a new size
      */
     public void setDividerSize(int newSize) {
         dividerSize = newSize;
@@ -219,6 +230,8 @@
     /**
      * Returns the size of the divider, that is the width if the splitpane
      * is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
+     *
+     * @return the size of the divider
      */
     public int getDividerSize() {
         return dividerSize;
@@ -227,6 +240,8 @@
 
     /**
      * Sets the border of this component.
+     *
+     * @param border a new border
      * @since 1.3
      */
     public void setBorder(Border border) {
@@ -382,8 +397,10 @@
 
 
     /**
-     * Creates and return an instance of JButton that can be used to
+     * Creates and return an instance of {@code JButton} that can be used to
      * collapse the left component in the split pane.
+     *
+     * @return an instance of {@code JButton}
      */
     protected JButton createLeftOneTouchButton() {
         JButton b = new JButton() {
@@ -438,8 +455,10 @@
 
 
     /**
-     * Creates and return an instance of JButton that can be used to
+     * Creates and return an instance of {@code JButton} that can be used to
      * collapse the right component in the split pane.
+     *
+     * @return an instance of {@code JButton}
      */
     protected JButton createRightOneTouchButton() {
         JButton b = new JButton() {
@@ -503,6 +522,8 @@
     /**
      * Messages the BasicSplitPaneUI with dragDividerTo that this instance
      * is contained in.
+     *
+     * @param location a location
      */
     protected void dragDividerTo(int location) {
         splitPaneUI.dragDividerTo(location);
@@ -512,6 +533,8 @@
     /**
      * Messages the BasicSplitPaneUI with finishDraggingTo that this instance
      * is contained in.
+     *
+     * @param location a location
      */
     protected void finishDraggingTo(int location) {
         splitPaneUI.finishDraggingTo(location);
@@ -694,7 +717,11 @@
          */
         int offset;
 
-
+        /**
+         * Constructs a new instance of {@code DragController}.
+         *
+         * @param e a mouse event
+         */
         protected DragController(MouseEvent e) {
             JSplitPane  splitPane = splitPaneUI.getSplitPane();
             Component   leftC = splitPane.getLeftComponent();
@@ -741,7 +768,9 @@
 
 
         /**
-         * Returns true if the dragging session is valid.
+         * Returns {@code true} if the dragging session is valid.
+         *
+         * @return {@code true} if the dragging session is valid
          */
         protected boolean isValid() {
             return (maxX > 0);
@@ -751,6 +780,9 @@
         /**
          * Returns the new position to put the divider at based on
          * the passed in MouseEvent.
+         *
+         * @param e a mouse event
+         * @return the new position
          */
         protected int positionForMouseEvent(MouseEvent e) {
             int newX = (e.getSource() == BasicSplitPaneDivider.this) ?
@@ -764,6 +796,10 @@
         /**
          * Returns the x argument, since this is used for horizontal
          * splits.
+         *
+         * @param x an X coordinate
+         * @param y an Y coordinate
+         * @return the X argument
          */
         protected int getNeededLocation(int x, int y) {
             int newX;
@@ -772,7 +808,13 @@
             return newX;
         }
 
-
+        /**
+         * Messages dragDividerTo with the new location for the mouse
+         * event.
+         *
+         * @param newX an X coordinate
+         * @param newY an Y coordinate
+         */
         protected void continueDrag(int newX, int newY) {
             dragDividerTo(getNeededLocation(newX, newY));
         }
@@ -781,12 +823,20 @@
         /**
          * Messages dragDividerTo with the new location for the mouse
          * event.
+         *
+         * @param e a mouse event
          */
         protected void continueDrag(MouseEvent e) {
             dragDividerTo(positionForMouseEvent(e));
         }
 
-
+        /**
+         * Messages finishDraggingTo with the new location for the mouse
+         * event.
+         *
+         * @param x an X coordinate
+         * @param y an Y coordinate
+         */
         protected void completeDrag(int x, int y) {
             finishDraggingTo(getNeededLocation(x, y));
         }
@@ -795,6 +845,8 @@
         /**
          * Messages finishDraggingTo with the new location for the mouse
          * event.
+         *
+         * @param e a mouse event
          */
         protected void completeDrag(MouseEvent e) {
             finishDraggingTo(positionForMouseEvent(e));
@@ -813,6 +865,11 @@
     protected class VerticalDragController extends DragController
     {
         /* DragControllers ivars are now in terms of y, not x. */
+        /**
+         * Constructs a new instance of {@code VerticalDragController}.
+         *
+         * @param e a mouse event
+         */
         protected VerticalDragController(MouseEvent e) {
             super(e);
             JSplitPane splitPane = splitPaneUI.getSplitPane();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -286,7 +286,10 @@
 
 
     /**
-     * Creates a new BasicSplitPaneUI instance
+     * Creates a new instance of {@code BasicSplitPaneUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicSplitPaneUI}
      */
     public static ComponentUI createUI(JComponent x) {
         return new BasicSplitPaneUI();
@@ -503,7 +506,9 @@
 
 
     /**
-     * Creates a PropertyChangeListener for the JSplitPane UI.
+     * Creates a {@code PropertyChangeListener} for the {@code JSplitPane} UI.
+     *
+     * @return an instance of {@code PropertyChangeListener}
      */
     protected PropertyChangeListener createPropertyChangeListener() {
         return getHandler();
@@ -518,7 +523,9 @@
 
 
     /**
-     * Creates a FocusListener for the JSplitPane UI.
+     * Creates a {@code FocusListener} for the {@code JSplitPane} UI.
+     *
+     * @return an instance of {@code FocusListener}
      */
     protected FocusListener createFocusListener() {
         return getHandler();
@@ -526,16 +533,17 @@
 
 
     /**
-     * As of Java 2 platform v1.3 this method is no
-     * longer used. Subclassers previously using this method should
-     * instead create an Action wrapping the ActionListener, and register
-     * that Action by overriding <code>installKeyboardActions</code> and
-     * placing the Action in the SplitPane's ActionMap. Please refer to
-     * the key bindings specification for further details.
+     * As of Java 2 platform v1.3 this method is no longer used.
+     * Subclassers previously using this method should instead create
+     * an {@code Action} wrapping the {@code ActionListener}, and register
+     * that {@code Action} by overriding {@code installKeyboardActions}
+     * and placing the {@code Action} in the {@code SplitPane's ActionMap}.
+     * Please refer to the key bindings specification for further details.
      * <p>
-     * Creates a ActionListener for the JSplitPane UI that listens for
-     * specific key presses.
+     * Creates an {@code ActionListener} for the {@code JSplitPane} UI that
+     * listens for specific key presses.
      *
+     * @return an instance of {@code ActionListener}
      * @deprecated As of Java 2 platform v1.3.
      */
     @Deprecated
@@ -545,16 +553,17 @@
 
 
     /**
-     * As of Java 2 platform v1.3 this method is no
-     * longer used. Subclassers previously using this method should
-     * instead create an Action wrapping the ActionListener, and register
-     * that Action by overriding <code>installKeyboardActions</code> and
-     * placing the Action in the SplitPane's ActionMap. Please refer to
-     * the key bindings specification for further details.
+     * As of Java 2 platform v1.3 this method is no longer used.
+     * Subclassers previously using this method should instead create
+     * an {@code Action} wrapping the {@code ActionListener}, and register
+     * that {@code Action} by overriding {@code installKeyboardActions}
+     * and placing the {@code Action} in the {@code SplitPane's ActionMap}.
+     * Please refer to the key bindings specification for further details.
      * <p>
-     * Creates a ActionListener for the JSplitPane UI that listens for
-     * specific key presses.
+     * Creates an {@code ActionListener} for the {@code JSplitPane} UI that
+     * listens for specific key presses.
      *
+     * @return an instance of {@code ActionListener}
      * @deprecated As of Java 2 platform v1.3.
      */
     @Deprecated
@@ -564,16 +573,17 @@
 
 
     /**
-     * As of Java 2 platform v1.3 this method is no
-     * longer used. Subclassers previously using this method should
-     * instead create an Action wrapping the ActionListener, and register
-     * that Action by overriding <code>installKeyboardActions</code> and
-     * placing the Action in the SplitPane's ActionMap. Please refer to
-     * the key bindings specification for further details.
+     * As of Java 2 platform v1.3 this method is no longer used.
+     * Subclassers previously using this method should instead create
+     * an {@code Action} wrapping the {@code ActionListener}, and register
+     * that {@code Action} by overriding {@code installKeyboardActions}
+     * and placing the {@code Action} in the {@code SplitPane's ActionMap}.
+     * Please refer to the key bindings specification for further details.
      * <p>
-     * Creates a ActionListener for the JSplitPane UI that listens for
-     * specific key presses.
+     * Creates an {@code ActionListener} for the {@code JSplitPane} UI that
+     * listens for specific key presses.
      *
+     * @return an instance of {@code ActionListener}
      * @deprecated As of Java 2 platform v1.3.
      */
     @Deprecated
@@ -583,16 +593,17 @@
 
 
     /**
-     * As of Java 2 platform v1.3 this method is no
-     * longer used. Subclassers previously using this method should
-     * instead create an Action wrapping the ActionListener, and register
-     * that Action by overriding <code>installKeyboardActions</code> and
-     * placing the Action in the SplitPane's ActionMap. Please refer to
-     * the key bindings specification for further details.
+     * As of Java 2 platform v1.3 this method is no longer used.
+     * Subclassers previously using this method should instead create
+     * an {@code Action} wrapping the {@code ActionListener}, and register
+     * that {@code Action} by overriding {@code installKeyboardActions}
+     * and placing the {@code Action} in the {@code SplitPane's ActionMap}.
+     * Please refer to the key bindings specification for further details.
      * <p>
-     * Creates a ActionListener for the JSplitPane UI that listens for
-     * specific key presses.
+     * Creates an {@code ActionListener} for the {@code JSplitPane} UI that
+     * listens for specific key presses.
      *
+     * @return an instance of {@code ActionListener}
      * @deprecated As of Java 2 platform v1.3.
      */
     @Deprecated
@@ -602,16 +613,17 @@
 
 
     /**
-     * As of Java 2 platform v1.3 this method is no
-     * longer used. Subclassers previously using this method should
-     * instead create an Action wrapping the ActionListener, and register
-     * that Action by overriding <code>installKeyboardActions</code> and
-     * placing the Action in the SplitPane's ActionMap. Please refer to
-     * the key bindings specification for further details.
+     * As of Java 2 platform v1.3 this method is no longer used.
+     * Subclassers previously using this method should instead create
+     * an {@code Action} wrapping the {@code ActionListener}, and register
+     * that {@code Action} by overriding {@code installKeyboardActions}
+     * and placing the {@code Action} in the {@code SplitPane's ActionMap}.
+     * Please refer to the key bindings specification for further details.
      * <p>
-     * Creates a ActionListener for the JSplitPane UI that listens for
-     * specific key presses.
+     * Creates an {@code ActionListener} for the {@code JSplitPane} UI that
+     * listens for specific key presses.
      *
+     * @return an instance of {@code ActionListener}
      * @deprecated As of Java 2 platform v1.3.
      */
     @Deprecated
@@ -621,7 +633,9 @@
 
 
     /**
-     * Returns the orientation for the JSplitPane.
+     * Returns the orientation for the {@code JSplitPane}.
+     *
+     * @return the orientation
      */
     public int getOrientation() {
         return orientation;
@@ -629,7 +643,9 @@
 
 
     /**
-     * Set the orientation for the JSplitPane.
+     * Set the orientation for the {@code JSplitPane}.
+     *
+     * @param orientation the orientation
      */
     public void setOrientation(int orientation) {
         this.orientation = orientation;
@@ -637,7 +653,9 @@
 
 
     /**
-     * Determines whether the JSplitPane is set to use a continuous layout.
+     * Determines whether the {@code JSplitPane} is set to use a continuous layout.
+     *
+     * @return {@code true} if a continuous layout is set
      */
     public boolean isContinuousLayout() {
         return continuousLayout;
@@ -646,6 +664,8 @@
 
     /**
      * Turn continuous layout on/off.
+     *
+     * @param b if {@code true} the continuous layout turns on
      */
     public void setContinuousLayout(boolean b) {
         continuousLayout = b;
@@ -653,7 +673,9 @@
 
 
     /**
-     * Returns the last drag location of the JSplitPane.
+     * Returns the last drag location of the {@code JSplitPane}.
+     *
+     * @return the last drag location
      */
     public int getLastDragLocation() {
         return lastDragLocation;
@@ -661,7 +683,9 @@
 
 
     /**
-     * Set the last drag location of the JSplitPane.
+     * Set the last drag location of the {@code JSplitPane}.
+     *
+     * @param l the drag location
      */
     public void setLastDragLocation(int l) {
         lastDragLocation = l;
@@ -819,6 +843,8 @@
 
     /**
      * Returns the divider between the top Components.
+     *
+     * @return the divider between the top Components
      */
     public BasicSplitPaneDivider getDivider() {
         return divider;
@@ -828,6 +854,8 @@
     /**
      * Returns the default non continuous layout divider, which is an
      * instance of {@code Canvas} that fills in the background with dark gray.
+     *
+     * @return the default non continuous layout divider
      */
     @SuppressWarnings("serial") // anonymous class
     protected Component createDefaultNonContinuousLayoutDivider() {
@@ -849,10 +877,12 @@
 
 
     /**
-     * Sets the divider to use when the splitPane is configured to
+     * Sets the divider to use when the {@code JSplitPane} is configured to
      * not continuously layout. This divider will only be used during a
      * dragging session. It is recommended that the passed in component
      * be a heavy weight.
+     *
+     * @param newDivider the new divider
      */
     protected void setNonContinuousLayoutDivider(Component newDivider) {
         setNonContinuousLayoutDivider(newDivider, true);
@@ -861,6 +891,9 @@
 
     /**
      * Sets the divider to use.
+     *
+     * @param newDivider the new divider
+     * @param rememberSizes if {@code true} the pane size is remembered
      */
     protected void setNonContinuousLayoutDivider(Component newDivider,
         boolean rememberSizes) {
@@ -903,9 +936,11 @@
 
 
     /**
-     * Returns the divider to use when the splitPane is configured to
+     * Returns the divider to use when the {@code JSplitPane} is configured to
      * not continuously layout. This divider will only be used during a
      * dragging session.
+     *
+     * @return the divider
      */
     public Component getNonContinuousLayoutDivider() {
         return nonContinuousLayoutDivider;
@@ -913,8 +948,10 @@
 
 
     /**
-     * Returns the splitpane this instance is currently contained
+     * Returns the {@code JSplitPane} this instance is currently contained
      * in.
+     *
+     * @return the instance of {@code JSplitPane}
      */
     public JSplitPane getSplitPane() {
         return splitPane;
@@ -923,6 +960,8 @@
 
     /**
      * Creates the default divider.
+     *
+     * @return the default divider
      */
     public BasicSplitPaneDivider createDefaultDivider() {
         return new BasicSplitPaneDivider(this);
@@ -1108,6 +1147,9 @@
     /**
      * Returns the insets. The insets are returned from the border insets
      * of the current border.
+     *
+     * @param jc a component
+     * @return the insets
      */
     public Insets getInsets(JComponent jc) {
         return null;
@@ -1187,8 +1229,10 @@
 
     /**
      * Messaged during a dragging session to move the divider to the
-     * passed in location. If continuousLayout is true the location is
-     * reset and the splitPane validated.
+     * passed in {@code location}. If {@code continuousLayout} is {@code true}
+     * the location is reset and the splitPane validated.
+     *
+     * @param location the location of divider
      */
     protected void dragDividerTo(int location) {
         if(getLastDragLocation() != location) {
@@ -1230,7 +1274,9 @@
 
     /**
      * Messaged to finish the dragging session. If not continuous display
-     * the dividers location will be reset.
+     * the dividers {@code location} will be reset.
+     *
+     * @param location the location of divider
      */
     protected void finishDraggingTo(int location) {
         dragDividerTo(location);
@@ -1259,6 +1305,7 @@
      * <p>
      * Returns the width of one side of the divider border.
      *
+     * @return the width of one side of the divider border
      * @deprecated As of Java 2 platform v1.3, instead set the border on the
      * divider.
      */
@@ -1275,7 +1322,13 @@
     public class BasicHorizontalLayoutManager implements LayoutManager2
     {
         /* left, right, divider. (in this exact order) */
+        /**
+         * The size of components.
+         */
         protected int[]         sizes;
+        /**
+         * The components.
+         */
         protected Component[]   components;
         /** Size of the splitpane the last time laid out. */
         private int             lastSplitPaneSize;
@@ -1596,6 +1649,8 @@
 
         /**
          * Resets the size of the Component at the passed in location.
+         *
+         * @param index the index of a component
          */
         protected void resetSizeAt(int index) {
             sizes[index] = 0;
@@ -1604,7 +1659,9 @@
 
 
         /**
-         * Sets the sizes to <code>newSizes</code>.
+         * Sets the sizes to {@code newSizes}.
+         *
+         * @param newSizes the new sizes
          */
         protected void setSizes(int[] newSizes) {
             System.arraycopy(newSizes, 0, sizes, 0, 3);
@@ -1613,6 +1670,8 @@
 
         /**
          * Returns the sizes of the components.
+         *
+         * @return the sizes of the components
          */
         protected int[] getSizes() {
             int[]         retSizes = new int[3];
@@ -1624,6 +1683,9 @@
 
         /**
          * Returns the width of the passed in Components preferred size.
+         *
+         * @param c a component
+         * @return the preferred width of the component
          */
         protected int getPreferredSizeOfComponent(Component c) {
             return getSizeForPrimaryAxis(c.getPreferredSize());
@@ -1632,6 +1694,9 @@
 
         /**
          * Returns the width of the passed in Components minimum size.
+         *
+         * @param c a component
+         * @return the minimum width of the component
          */
         int getMinimumSizeOfComponent(Component c) {
             return getSizeForPrimaryAxis(c.getMinimumSize());
@@ -1640,6 +1705,9 @@
 
         /**
          * Returns the width of the passed in component.
+         *
+         * @param c a component
+         * @return the width of the component
          */
         protected int getSizeOfComponent(Component c) {
             return getSizeForPrimaryAxis(c.getSize());
@@ -1648,7 +1716,11 @@
 
         /**
          * Returns the available width based on the container size and
-         * Insets.
+         * {@code Insets}.
+         *
+         * @param containerSize a container size
+         * @param insets an insets
+         * @return the available width
          */
         protected int getAvailableSize(Dimension containerSize,
                                        Insets insets) {
@@ -1661,8 +1733,11 @@
 
 
         /**
-         * Returns the left inset, unless the Insets are null in which case
+         * Returns the left inset, unless the {@code Insets} are null in which case
          * 0 is returned.
+         *
+         * @param insets the insets
+         * @return the left inset
          */
         protected int getInitialLocation(Insets insets) {
             if(insets != null)
@@ -1672,9 +1747,15 @@
 
 
         /**
-         * Sets the width of the component c to be size, placing its
-         * x location at location, y to the insets.top and height
-         * to the containersize.height less the top and bottom insets.
+         * Sets the width of the component {@code c} to be {@code size}, placing its
+         * x location at {@code location}, y to the {@code insets.top} and height
+         * to the {@code containerSize.height} less the top and bottom insets.
+         *
+         * @param c a component
+         * @param size a new width
+         * @param location a new X coordinate
+         * @param insets an insets
+         * @param containerSize a container size
          */
         protected void setComponentToSize(Component c, int size,
                                           int location, Insets insets,
@@ -2021,6 +2102,9 @@
     public class BasicVerticalLayoutManager extends
             BasicHorizontalLayoutManager
     {
+        /**
+         * Constructs a new instance of {@code BasicVerticalLayoutManager}.
+         */
         public BasicVerticalLayoutManager() {
             super(1);
         }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,11 +49,19 @@
 // Instance Variables
 //
 
-    /** The JTableHeader that is delegating the painting to this UI. */
+    /**
+     *  The {@code JTableHeader} that is delegating the painting to this UI.
+     */
     protected JTableHeader header;
+
+    /**
+     * The instance of {@code CellRendererPane}.
+     */
     protected CellRendererPane rendererPane;
 
-    // Listeners that are attached to the JTable
+    /**
+     * Listeners that are attached to the {@code JTable}
+     */
     protected MouseInputListener mouseInputListener;
 
     // The column header over which the mouse currently is.
@@ -300,7 +308,9 @@
 //
 
     /**
-     * Creates the mouse listener for the JTableHeader.
+     * Creates the mouse listener for the {@code JTableHeader}.
+     *
+     * @return the mouse listener for the {@code JTableHeader}
      */
     protected MouseInputListener createMouseInputListener() {
         return new MouseInputHandler();
@@ -310,6 +320,12 @@
 //  The installation/uninstall procedures and support
 //
 
+    /**
+     * Returns a new instance of {@code BasicTableHeaderUI}.
+     *
+     * @param h a component.
+     * @return a new instance of {@code BasicTableHeaderUI}
+     */
     public static ComponentUI createUI(JComponent h) {
         return new BasicTableHeaderUI();
     }
@@ -376,8 +392,14 @@
         header = null;
     }
 
+    /**
+     * Uninstalls default properties
+     */
     protected void uninstallDefaults() {}
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         header.removeMouseListener(mouseInputListener);
         header.removeMouseMotionListener(mouseInputListener);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -64,12 +64,29 @@
 //
 
     // The JTable that is delegating the painting to this UI.
+    /**
+     * The instance of {@code JTable}.
+     */
     protected JTable table;
+
+    /**
+     * The instance of {@code CellRendererPane}.
+     */
     protected CellRendererPane rendererPane;
 
-    // Listeners that are attached to the JTable
+    /**
+     * {@code KeyListener} that are attached to the {@code JTable}.
+     */
     protected KeyListener keyListener;
+
+    /**
+     * {@code FocusListener} that are attached to the {@code JTable}.
+     */
     protected FocusListener focusListener;
+
+    /**
+     * {@code MouseInputListener} that are attached to the {@code JTable}.
+     */
     protected MouseInputListener mouseInputListener;
 
     private Handler handler;
@@ -1350,21 +1367,27 @@
     }
 
     /**
-     * Creates the key listener for handling keyboard navigation in the JTable.
+     * Creates the key listener for handling keyboard navigation in the {@code JTable}.
+     *
+     * @return the key listener for handling keyboard navigation in the {@code JTable}
      */
     protected KeyListener createKeyListener() {
         return null;
     }
 
     /**
-     * Creates the focus listener for handling keyboard navigation in the JTable.
+     * Creates the focus listener for handling keyboard navigation in the {@code JTable}.
+     *
+     * @return the focus listener for handling keyboard navigation in the {@code JTable}
      */
     protected FocusListener createFocusListener() {
         return getHandler();
     }
 
     /**
-     * Creates the mouse listener for the JTable.
+     * Creates the mouse listener for the {@code JTable}.
+     *
+     * @return the mouse listener for the {@code JTable}
      */
     protected MouseInputListener createMouseInputListener() {
         return getHandler();
@@ -1374,6 +1397,12 @@
 //  The installation/uninstall procedures and support
 //
 
+    /**
+     * Returns a new instance of {@code BasicTableUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicTableUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return new BasicTableUI();
     }
@@ -1616,12 +1645,18 @@
         table = null;
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         if (table.getTransferHandler() instanceof UIResource) {
             table.setTransferHandler(null);
         }
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         table.removeFocusListener(focusListener);
         table.removeKeyListener(keyListener);
@@ -1638,6 +1673,9 @@
         handler = null;
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIInputMap(table, JComponent.
                                    WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -443,6 +443,9 @@
     protected void uninstallListeners() {
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
         // backward compatibility support... keymaps for the UI
         // are now installed in the more friendly input map.
@@ -637,6 +640,9 @@
         return map;
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         editor.setKeymap(null);
         SwingUtilities.replaceUIInputMap(editor, JComponent.
@@ -1280,8 +1286,14 @@
         return null;
     }
 
+    /**
+     * Default implementation of the interface {@code Caret}.
+     */
     public static class BasicCaret extends DefaultCaret implements UIResource {}
 
+    /**
+     * Default implementation of the interface {@code Highlighter}.
+     */
     public static class BasicHighlighter extends DefaultHighlighter implements UIResource {}
 
     static class BasicCursor extends Cursor implements UIResource {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -51,6 +51,13 @@
     // ********************************
     //          Create PLAF
     // ********************************
+
+    /**
+     * Returns an instance of {@code BasicToggleButtonUI}.
+     *
+     * @param b a component
+     * @return an instance of {@code BasicToggleButtonUI}
+     */
     public static ComponentUI createUI(JComponent b) {
         AppContext appContext = AppContext.getAppContext();
         BasicToggleButtonUI toggleButtonUI =
@@ -127,6 +134,13 @@
         }
     }
 
+    /**
+     * Paints an icon in the specified location.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param b an instance of {@code Button}
+     * @param iconRect bounds of an icon
+     */
     protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect) {
         ButtonModel model = b.getModel();
         Icon icon = null;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -45,6 +45,12 @@
 
 public class BasicToolBarSeparatorUI extends BasicSeparatorUI
 {
+    /**
+     * Returns a new instance of {@code BasicToolBarSeparatorUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicToolBarSeparatorUI}
+     */
     public static ComponentUI createUI( JComponent c )
     {
         return new BasicToolBarSeparatorUI();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,29 +50,65 @@
  */
 public class BasicToolBarUI extends ToolBarUI implements SwingConstants
 {
+    /**
+     * The instance of {@code JToolBar}.
+     */
     protected JToolBar toolBar;
     private boolean floating;
     private int floatingX;
     private int floatingY;
     private JFrame floatingFrame;
     private RootPaneContainer floatingToolBar;
+    /**
+     * The instance of {@code DragWindow}.
+     */
     protected DragWindow dragWindow;
     private Container dockingSource;
     private int dockingSensitivity = 0;
+    /**
+     * The index of the focused component.
+     */
     protected int focusedCompIndex = -1;
 
+    /**
+     * The background color of the docking border.
+     */
     protected Color dockingColor = null;
+    /**
+     * The background color of the not docking border.
+     */
     protected Color floatingColor = null;
+    /**
+     * The color of the docking border.
+     */
     protected Color dockingBorderColor = null;
+    /**
+     * The color of the not docking border.
+     */
     protected Color floatingBorderColor = null;
 
+    /**
+     * The instance of a {@code MouseInputListener}.
+     */
     protected MouseInputListener dockingListener;
+    /**
+     * The instance of a {@code PropertyChangeListener}.
+     */
     protected PropertyChangeListener propertyListener;
 
+    /**
+     * The instance of a {@code ContainerListener}.
+     */
     protected ContainerListener toolBarContListener;
+    /**
+     * The instance of a {@code FocusListener}.
+     */
     protected FocusListener toolBarFocusListener;
     private Handler handler;
 
+    /**
+     * The layout before floating.
+     */
     protected String constraintBeforeFloating = BorderLayout.NORTH;
 
     // Rollover button implementation.
@@ -130,6 +166,12 @@
 
     private static String FOCUSED_COMP_INDEX = "JToolBar.focusedCompIndex";
 
+    /**
+     * Constructs a new instance of {@code BasicToolBarUI}.
+     *
+     * @param c a component
+     * @return a new instance of {@code BasicToolBarUI}
+     */
     public static ComponentUI createUI( JComponent c )
     {
         return new BasicToolBarUI();
@@ -180,6 +222,9 @@
         c.putClientProperty( FOCUSED_COMP_INDEX, Integer.valueOf( focusedCompIndex ) );
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults( )
     {
         LookAndFeel.installBorder(toolBar,"ToolBar.border");
@@ -222,6 +267,9 @@
         setRolloverBorders( isRolloverBorders() );
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults( )
     {
         LookAndFeel.uninstallBorder(toolBar);
@@ -237,14 +285,23 @@
         nonRolloverToggleBorder = null;
     }
 
+    /**
+     * Registers components.
+     */
     protected void installComponents( )
     {
     }
 
+    /**
+     * Unregisters components.
+     */
     protected void uninstallComponents( )
     {
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners( )
     {
         dockingListener = createDockingListener( );
@@ -278,6 +335,9 @@
         }
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners( )
     {
         if ( dockingListener != null )
@@ -314,6 +374,9 @@
         handler = null;
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions( )
     {
         InputMap km = getInputMap(JComponent.
@@ -342,6 +405,9 @@
         map.put(new Actions(Actions.NAVIGATE_DOWN));
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions( )
     {
         SwingUtilities.replaceUIActionMap(toolBar, null);
@@ -350,7 +416,12 @@
                                          null);
     }
 
-    protected void navigateFocusedComp( int direction )
+    /**
+     * Navigates the focused component.
+     *
+     * @param direction a direction
+     */
+    protected void navigateFocusedComp(int direction)
     {
         int nComp = toolBar.getComponentCount();
         int j;
@@ -411,6 +482,7 @@
      * <p>
      * Override this method to provide an alternate rollover border.
      *
+     * @return a rollover border for toolbar components
      * @since 1.4
      */
     protected Border createRolloverBorder() {
@@ -434,6 +506,7 @@
      * <p>
      * Override this method to provide an alternate rollover border.
      *
+     * @return the non rollover border for toolbar components
      * @since 1.4
      */
     protected Border createNonRolloverBorder() {
@@ -465,6 +538,9 @@
 
     /**
      * No longer used, use BasicToolBarUI.createFloatingWindow(JToolBar)
+     *
+     * @param toolbar an instance of {@code JToolBar}
+     * @return an instance of {@code JFrame}
      * @see #createFloatingWindow
      */
     protected JFrame createFloatingFrame(JToolBar toolbar) {
@@ -502,7 +578,9 @@
     /**
      * Creates a window which contains the toolbar after it has been
      * dragged out from its container
-     * @return a <code>RootPaneContainer</code> object, containing the toolbar.
+     *
+     * @param toolbar an instance of {@code JToolBar}
+     * @return a {@code RootPaneContainer} object, containing the toolbar
      * @since 1.4
      */
     protected RootPaneContainer createFloatingWindow(JToolBar toolbar) {
@@ -555,6 +633,12 @@
         return dialog;
     }
 
+    /**
+     * Returns an instance of {@code DragWindow}.
+     *
+     * @param toolbar an instance of {@code JToolBar}
+     * @return an instance of {@code DragWindow}
+     */
     protected DragWindow createDragWindow(JToolBar toolbar) {
         Window frame = null;
         if(toolBar != null) {
@@ -776,15 +860,32 @@
         }
     }
 
+    /**
+     * Sets the floating location.
+     *
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     */
     public void setFloatingLocation(int x, int y) {
         floatingX = x;
         floatingY = y;
     }
 
+    /**
+     * Returns {@code true} if the {@code JToolBar} is floating
+     *
+     * @return {@code true} if the {@code JToolBar} is floating
+     */
     public boolean isFloating() {
         return floating;
     }
 
+    /**
+     * Sets the floating property.
+     *
+     * @param b {@code true} if the {@code JToolBar} is floating
+     * @param p the position
+     */
     public void setFloating(boolean b, Point p) {
         if (toolBar.isFloatable()) {
             boolean visible = false;
@@ -863,6 +964,11 @@
         return orientation;
     }
 
+    /**
+     * Sets the tool bar's orientation.
+     *
+     * @param orientation the new orientation
+     */
     public void setOrientation(int orientation)
     {
         toolBar.setOrientation( orientation );
@@ -873,6 +979,8 @@
 
     /**
      * Gets the color displayed when over a docking area
+     *
+     * @return the color displayed when over a docking area
      */
     public Color getDockingColor() {
         return dockingColor;
@@ -880,6 +988,8 @@
 
     /**
      * Sets the color displayed when over a docking area
+     *
+     * @param c the new color
      */
    public void setDockingColor(Color c) {
         this.dockingColor = c;
@@ -887,6 +997,8 @@
 
     /**
      * Gets the color displayed when over a floating area
+     *
+     * @return the color displayed when over a floating area
      */
     public Color getFloatingColor() {
         return floatingColor;
@@ -894,6 +1006,8 @@
 
     /**
      * Sets the color displayed when over a floating area
+     *
+     * @param c the new color
      */
     public void setFloatingColor(Color c) {
         this.floatingColor = c;
@@ -912,6 +1026,13 @@
         return false;
     }
 
+    /**
+     * Returns {@code true} if the {@code JToolBar} can dock at the given position.
+     *
+     * @param c a component
+     * @param p a position
+     * @return {@code true} if the {@code JToolBar} can dock at the given position
+     */
     public boolean canDock(Component c, Point p) {
         return (p != null && getDockingConstraint(c, p) != null);
     }
@@ -952,6 +1073,13 @@
         return null;
     }
 
+    /**
+     * The method is used to drag {@code DragWindow} during the {@code JToolBar}
+     * is being dragged.
+     *
+     * @param position the relative to the {@code JTollBar} position
+     * @param origin the screen position of {@code JToolBar} before dragging
+     */
     protected void dragTo(Point position, Point origin)
     {
         if (toolBar.isFloatable())
@@ -1002,6 +1130,13 @@
         }
     }
 
+    /**
+     * The method is called at end of dragging to place the frame in either
+     * its original place or in its floating frame.
+     *
+     * @param position the relative to the {@code JTollBar} position
+     * @param origin the screen position of {@code JToolBar} before dragging
+     */
     protected void floatAt(Point position, Point origin)
     {
         if(toolBar.isFloatable())
@@ -1044,26 +1179,51 @@
         return handler;
     }
 
+    /**
+     * Returns an instance of {@code ContainerListener}.
+     *
+     * @return an instance of {@code ContainerListener}
+     */
     protected ContainerListener createToolBarContListener( )
     {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code FocusListener}.
+     *
+     * @return an instance of {@code FocusListener}
+     */
     protected FocusListener createToolBarFocusListener( )
     {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code PropertyChangeListener}.
+     *
+     * @return an instance of {@code PropertyChangeListener}
+     */
     protected PropertyChangeListener createPropertyListener()
     {
         return getHandler();
     }
 
+    /**
+     * Returns an instance of {@code MouseInputListener}.
+     *
+     * @return an instance of {@code MouseInputListener}
+     */
     protected MouseInputListener createDockingListener( ) {
         getHandler().tb = toolBar;
         return getHandler();
     }
 
+    /**
+     * Constructs a new instance of {@code WindowListener}.
+     *
+     * @return a new instance of {@code WindowListener}
+     */
     protected WindowListener createFrameListener() {
         return new FrameListener();
     }
@@ -1241,6 +1401,9 @@
         }
     }
 
+    /**
+     * The class listens for window events.
+     */
     protected class FrameListener extends WindowAdapter {
         public void windowClosing(WindowEvent w) {
             if (toolBar.isFloatable()) {
@@ -1276,6 +1439,9 @@
 
     }
 
+    /**
+     * The class listens for component events.
+     */
     protected class ToolBarContListener implements ContainerListener {
         // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
@@ -1291,6 +1457,9 @@
 
     }
 
+    /**
+     * The class listens for focus events.
+     */
     protected class ToolBarFocusListener implements FocusListener {
         // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
@@ -1305,6 +1474,9 @@
             }
     }
 
+    /**
+     * The class listens for property changed events.
+     */
     protected class PropertyListener implements PropertyChangeListener {
         // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
@@ -1324,10 +1496,24 @@
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
+        /**
+         * The instance of {@code JToolBar}.
+         */
         protected JToolBar toolBar;
+        /**
+         * {@code true} if the {@code JToolBar} is being dragged.
+         */
         protected boolean isDragging = false;
+        /**
+         * The origin point.
+         */
         protected Point origin = null;
 
+        /**
+         * Constructs a new instance of {@code DockingListener}.
+         *
+         * @param t an instance of {@code JToolBar}
+         */
         public DockingListener(JToolBar t) {
             this.toolBar = t;
             getHandler().tb = t;
@@ -1373,6 +1559,9 @@
         }
     }
 
+    /**
+     * The window which appears during dragging the {@code JToolBar}.
+     */
     @SuppressWarnings("serial") // Same-version serialization only
     protected class DragWindow extends Window
     {
@@ -1396,6 +1585,11 @@
         return orientation;
     }
 
+        /**
+         * Sets the orientation.
+         *
+         * @param o the new orientation
+         */
         public void setOrientation(int o) {
             if(isShowing()) {
                 if (o == this.orientation)
@@ -1416,14 +1610,29 @@
             }
         }
 
+        /**
+         * Returns the offset.
+         *
+         * @return the offset
+         */
         public Point getOffset() {
             return offset;
         }
 
+        /**
+         * Sets the offset.
+         *
+         * @param p the new offset
+         */
         public void setOffset(Point p) {
             this.offset = p;
         }
 
+        /**
+         * Sets the border color.
+         *
+         * @param c the new border color
+         */
         public void setBorderColor(Color c) {
             if (this.borderColor == c)
                 return;
@@ -1431,6 +1640,11 @@
             repaint();
         }
 
+        /**
+         * Returns the border color.
+         *
+         * @return the border color
+         */
         public Color getBorderColor() {
             return this.borderColor;
         }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -55,10 +55,19 @@
 
     private PropertyChangeListener propertyChangeListener;
 
+    /**
+     * Returns the instance of {@code BasicToolTipUI}.
+     *
+     * @param c a component
+     * @return the instance of {@code BasicToolTipUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         return sharedInstance;
     }
 
+    /**
+     * Constructs a new instance of {@code BasicToolTipUI}.
+     */
     public BasicToolTipUI() {
         super();
     }
@@ -76,22 +85,32 @@
         uninstallListeners(c);
     }
 
+    /**
+     * Installs default properties.
+     *
+     * @param c a component
+     */
     protected void installDefaults(JComponent c){
         LookAndFeel.installColorsAndFont(c, "ToolTip.background",
-                                         "ToolTip.foreground",
-                                         "ToolTip.font");
+                "ToolTip.foreground",
+                "ToolTip.font");
         LookAndFeel.installProperty(c, "opaque", Boolean.TRUE);
         componentChanged(c);
     }
 
-   protected void uninstallDefaults(JComponent c){
+    /**
+     * Uninstalls default properties.
+     *
+     * @param c a component
+     */
+    protected void uninstallDefaults(JComponent c){
         LookAndFeel.uninstallBorder(c);
     }
 
     /* Unfortunately this has to remain private until we can make API additions.
      */
     private void installComponents(JComponent c){
-        BasicHTML.updateRenderer(c, ((JToolTip)c).getTipText());
+        BasicHTML.updateRenderer(c, ((JToolTip) c).getTipText());
     }
 
     /* Unfortunately this has to remain private until we can make API additions.
@@ -100,12 +119,22 @@
         BasicHTML.updateRenderer(c, "");
     }
 
+    /**
+     * Registers listeners.
+     *
+     * @param c a component
+     */
     protected void installListeners(JComponent c) {
         propertyChangeListener = createPropertyChangeListener(c);
 
         c.addPropertyChangeListener(propertyChangeListener);
     }
 
+    /**
+     * Unregisters listeners.
+     *
+     * @param c a component
+     */
     protected void uninstallListeners(JComponent c) {
         c.removePropertyChangeListener(propertyChangeListener);
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -63,7 +63,13 @@
     // Old actions forward to an instance of this.
     static private final Actions SHARED_ACTION = new Actions();
 
+    /**
+     * The collapsed icon.
+     */
     transient protected Icon        collapsedIcon;
+    /**
+     * The expanded icon.
+     */
     transient protected Icon        expandedIcon;
 
     /**
@@ -210,6 +216,12 @@
      */
     private MouseEvent releaseEvent;
 
+    /**
+     * Constructs a new instance of {@code BasicTreeUI}.
+     *
+     * @param x a component
+     * @return a new instance of {@code BasicTreeUI}
+     */
     public static ComponentUI createUI(JComponent x) {
         return new BasicTreeUI();
     }
@@ -279,19 +291,36 @@
         map.put(TransferHandler.getPasteAction());
     }
 
-
+    /**
+     * Constructs a new instance of {@code BasicTreeUI}.
+     */
     public BasicTreeUI() {
         super();
     }
 
+    /**
+     * Returns the hash color.
+     *
+     * @return the hash color
+     */
     protected Color getHashColor() {
         return hashColor;
     }
 
+    /**
+     * Sets the hash color.
+     *
+     * @param color the hash color
+     */
     protected void setHashColor(Color color) {
         hashColor = color;
     }
 
+    /**
+     * Sets the left child indent.
+     *
+     * @param newAmount the left child indent
+     */
     public void setLeftChildIndent(int newAmount) {
         leftChildIndent = newAmount;
         totalChildIndent = leftChildIndent + rightChildIndent;
@@ -300,10 +329,20 @@
         updateSize();
     }
 
+    /**
+     * Returns the left child indent.
+     *
+     * @return the left child indent
+     */
     public int getLeftChildIndent() {
         return leftChildIndent;
     }
 
+    /**
+     * Sets the right child indent.
+     *
+     * @param newAmount the right child indent
+     */
     public void setRightChildIndent(int newAmount) {
         rightChildIndent = newAmount;
         totalChildIndent = leftChildIndent + rightChildIndent;
@@ -312,22 +351,47 @@
         updateSize();
     }
 
+    /**
+     * Returns the right child indent.
+     *
+     * @return the right child indent
+     */
     public int getRightChildIndent() {
         return rightChildIndent;
     }
 
+    /**
+     * Sets the expanded icon.
+     *
+     * @param newG the expanded icon
+     */
     public void setExpandedIcon(Icon newG) {
         expandedIcon = newG;
     }
 
+    /**
+     * Returns the expanded icon.
+     *
+     * @return the expanded icon
+     */
     public Icon getExpandedIcon() {
         return expandedIcon;
     }
 
+    /**
+     * Sets the collapsed icon.
+     *
+     * @param newG the collapsed icon
+     */
     public void setCollapsedIcon(Icon newG) {
         collapsedIcon = newG;
     }
 
+    /**
+     * Returns the collapsed icon.
+     *
+     * @return the collapsed icon
+     */
     public Icon getCollapsedIcon() {
         return collapsedIcon;
     }
@@ -340,6 +404,8 @@
 
     /**
      * Updates the componentListener, if necessary.
+     *
+     * @param largeModel the new value
      */
     protected void setLargeModel(boolean largeModel) {
         if(getRowHeight() < 1)
@@ -354,12 +420,19 @@
         }
     }
 
+    /**
+     * Returns {@code true} if large model is set.
+     *
+     * @return {@code true} if large model is set
+     */
     protected boolean isLargeModel() {
         return largeModel;
     }
 
     /**
      * Sets the row height, this is forwarded to the treeState.
+     *
+     * @param rowHeight the row height
      */
     protected void setRowHeight(int rowHeight) {
         completeEditing();
@@ -370,13 +443,20 @@
         }
     }
 
+    /**
+     * Returns the row height.
+     *
+     * @return the row height
+     */
     protected int getRowHeight() {
         return (tree == null) ? -1 : tree.getRowHeight();
     }
 
     /**
-     * Sets the TreeCellRenderer to <code>tcr</code>. This invokes
-     * <code>updateRenderer</code>.
+     * Sets the {@code TreeCellRenderer} to {@code tcr}. This invokes
+     * {@code updateRenderer}.
+     *
+     * @param tcr the new value
      */
     protected void setCellRenderer(TreeCellRenderer tcr) {
         completeEditing();
@@ -388,15 +468,19 @@
     }
 
     /**
-     * Return currentCellRenderer, which will either be the trees
-     * renderer, or defaultCellRenderer, which ever wasn't null.
+     * Return {@code currentCellRenderer}, which will either be the trees
+     * renderer, or {@code defaultCellRenderer}, which ever wasn't null.
+     *
+     * @return an instance of {@code TreeCellRenderer}
      */
     protected TreeCellRenderer getCellRenderer() {
         return currentCellRenderer;
     }
 
     /**
-     * Sets the TreeModel.
+     * Sets the {@code TreeModel}.
+     *
+     * @param model the new value
      */
     protected void setModel(TreeModel model) {
         completeEditing();
@@ -414,12 +498,19 @@
         }
     }
 
+    /**
+     * Returns the tree model.
+     *
+     * @return the tree model
+     */
     protected TreeModel getModel() {
         return treeModel;
     }
 
     /**
      * Sets the root to being visible.
+     *
+     * @param newValue the new value
      */
     protected void setRootVisible(boolean newValue) {
         completeEditing();
@@ -431,12 +522,19 @@
         }
     }
 
+    /**
+     * Returns {@code true} if the tree root is visible.
+     *
+     * @return {@code true} if the tree root is visible
+     */
     protected boolean isRootVisible() {
         return (tree != null) ? tree.isRootVisible() : false;
     }
 
     /**
      * Determines whether the node handles are to be displayed.
+     *
+     * @param newValue the new value
      */
     protected void setShowsRootHandles(boolean newValue) {
         completeEditing();
@@ -447,28 +545,47 @@
         }
     }
 
+    /**
+     * Returns {@code true} if the root handles are to be displayed.
+     *
+     * @return {@code true} if the root handles are to be displayed
+     */
     protected boolean getShowsRootHandles() {
         return (tree != null) ? tree.getShowsRootHandles() : false;
     }
 
     /**
      * Sets the cell editor.
+     *
+     * @param editor the new cell editor
      */
     protected void setCellEditor(TreeCellEditor editor) {
         updateCellEditor();
     }
 
+    /**
+     * Returns an instance of {@code TreeCellEditor}.
+     *
+     * @return an instance of {@code TreeCellEditor}
+     */
     protected TreeCellEditor getCellEditor() {
         return (tree != null) ? tree.getCellEditor() : null;
     }
 
     /**
      * Configures the receiver to allow, or not allow, editing.
+     *
+     * @param newValue the new value
      */
     protected void setEditable(boolean newValue) {
         updateCellEditor();
     }
 
+    /**
+     * Returns {@code true} if the tree is editable.
+     *
+     * @return {@code true} if the tree is editable
+     */
     protected boolean isEditable() {
         return (tree != null) ? tree.isEditable() : false;
     }
@@ -476,6 +593,8 @@
     /**
      * Resets the selection model. The appropriate listener are installed
      * on the model.
+     *
+     * @param newLSM new selection model
      */
     protected void setSelectionModel(TreeSelectionModel newLSM) {
         completeEditing();
@@ -503,6 +622,11 @@
             tree.repaint();
     }
 
+    /**
+     * Returns the tree selection model.
+     *
+     * @return the tree selection model
+     */
     protected TreeSelectionModel getSelectionModel() {
         return treeSelectionModel;
     }
@@ -649,7 +773,7 @@
     }
 
     /**
-     * Invoked after the <code>tree</code> instance variable has been
+     * Invoked after the {@code tree} instance variable has been
      * set, but before any defaults/listeners have been installed.
      */
     protected void prepareForUIInstall() {
@@ -690,6 +814,9 @@
         updateSize();
     }
 
+    /**
+     * Installs default properties.
+     */
     protected void installDefaults() {
         if(tree.getBackground() == null ||
            tree.getBackground() instanceof UIResource) {
@@ -739,6 +866,9 @@
         }
     }
 
+    /**
+     * Registers listeners.
+     */
     protected void installListeners() {
         if ( (propertyChangeListener = createPropertyChangeListener())
              != null ) {
@@ -787,6 +917,9 @@
         LookAndFeel.installProperty(tree, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Registers keyboard actions.
+     */
     protected void installKeyboardActions() {
         InputMap km = getInputMap(JComponent.
                                   WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
@@ -837,8 +970,10 @@
     //
 
     /**
-     * Creates an instance of NodeDimensions that is able to determine
+     * Creates an instance of {@code NodeDimensions} that is able to determine
      * the size of a given node in the tree.
+     *
+     * @return an instance of {@code NodeDimensions}
      */
     protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
         return new NodeDimensionsHandler();
@@ -847,6 +982,8 @@
     /**
      * Creates a listener that is responsible that updates the UI based on
      * how the tree changes.
+     *
+     * @return an instance of the {@code PropertyChangeListener}
      */
     protected PropertyChangeListener createPropertyChangeListener() {
         return getHandler();
@@ -862,6 +999,8 @@
     /**
      * Creates the listener responsible for updating the selection based on
      * mouse events.
+     *
+     * @return an instance of the {@code MouseListener}
      */
     protected MouseListener createMouseListener() {
         return getHandler();
@@ -870,14 +1009,18 @@
     /**
      * Creates a listener that is responsible for updating the display
      * when focus is lost/gained.
+     *
+     * @return an instance of the {@code FocusListener}
      */
     protected FocusListener createFocusListener() {
         return getHandler();
     }
 
     /**
-     * Creates the listener reponsible for getting key events from
+     * Creates the listener responsible for getting key events from
      * the tree.
+     *
+     * @return an instance of the {@code KeyListener}
      */
     protected KeyListener createKeyListener() {
         return getHandler();
@@ -886,6 +1029,8 @@
     /**
      * Creates the listener responsible for getting property change
      * events from the selection model.
+     *
+     * @return an instance of the {@code PropertyChangeListener}
      */
     protected PropertyChangeListener createSelectionModelPropertyChangeListener() {
         return getHandler();
@@ -894,6 +1039,8 @@
     /**
      * Creates the listener that updates the display based on selection change
      * methods.
+     *
+     * @return an instance of the {@code TreeSelectionListener}
      */
     protected TreeSelectionListener createTreeSelectionListener() {
         return getHandler();
@@ -901,6 +1048,8 @@
 
     /**
      * Creates a listener to handle events from the current editor.
+     *
+     * @return an instance of the {@code CellEditorListener}
      */
     protected CellEditorListener createCellEditorListener() {
         return getHandler();
@@ -910,6 +1059,8 @@
      * Creates and returns a new ComponentHandler. This is used for
      * the large model to mark the validCachedPreferredSize as invalid
      * when the component moves.
+     *
+     * @return an instance of the {@code ComponentListener}
      */
     protected ComponentListener createComponentListener() {
         return new ComponentHandler();
@@ -918,6 +1069,8 @@
     /**
      * Creates and returns the object responsible for updating the treestate
      * when nodes expanded state changes.
+     *
+     * @return an instance of the {@code TreeExpansionListener}
      */
     protected TreeExpansionListener createTreeExpansionListener() {
         return getHandler();
@@ -926,6 +1079,8 @@
     /**
      * Creates the object responsible for managing what is expanded, as
      * well as the size of nodes.
+     *
+     * @return the object responsible for managing what is expanded
      */
     protected AbstractLayoutCache createLayoutCache() {
         if(isLargeModel() && getRowHeight() > 0) {
@@ -936,14 +1091,18 @@
 
     /**
      * Returns the renderer pane that renderer components are placed in.
+     *
+     * @return an instance of the {@code CellRendererPane}
      */
     protected CellRendererPane createCellRendererPane() {
         return new CellRendererPane();
     }
 
     /**
-      * Creates a default cell editor.
-      */
+     * Creates a default cell editor.
+     *
+     * @return a default cell editor
+     */
     protected TreeCellEditor createDefaultCellEditor() {
         if(currentCellRenderer != null &&
            (currentCellRenderer instanceof DefaultTreeCellRenderer)) {
@@ -956,15 +1115,19 @@
     }
 
     /**
-      * Returns the default cell renderer that is used to do the
-      * stamping of each node.
-      */
+     * Returns the default cell renderer that is used to do the
+     * stamping of each node.
+     *
+     * @return an instance of {@code TreeCellRenderer}
+     */
     protected TreeCellRenderer createDefaultCellRenderer() {
         return new DefaultTreeCellRenderer();
     }
 
     /**
      * Returns a listener that can update the tree when the model changes.
+     *
+     * @return an instance of the {@code TreeModelListener}.
      */
     protected TreeModelListener createTreeModelListener() {
         return getHandler();
@@ -987,9 +1150,15 @@
         completeUIUninstall();
     }
 
+    /**
+     * Invoked before unstallation of UI.
+     */
     protected void prepareForUIUninstall() {
     }
 
+    /**
+     * Uninstalls UI.
+     */
     protected void completeUIUninstall() {
         if(createdRenderer) {
             tree.setCellRenderer(null);
@@ -1016,12 +1185,18 @@
         treeExpansionListener = null;
     }
 
+    /**
+     * Uninstalls default properties.
+     */
     protected void uninstallDefaults() {
         if (tree.getTransferHandler() instanceof UIResource) {
             tree.setTransferHandler(null);
         }
     }
 
+    /**
+     * Unregisters listeners.
+     */
     protected void uninstallListeners() {
         if(componentListener != null) {
             tree.removeComponentListener(componentListener);
@@ -1059,6 +1234,9 @@
         handler = null;
     }
 
+    /**
+     * Unregisters keyboard actions.
+     */
     protected void uninstallKeyboardActions() {
         SwingUtilities.replaceUIActionMap(tree, null);
         SwingUtilities.replaceUIInputMap(tree, JComponent.
@@ -1340,8 +1518,18 @@
 
     /**
      * Paints the horizontal part of the leg. The receiver should
-     * NOT modify <code>clipBounds</code>, or <code>insets</code>.<p>
-     * NOTE: <code>parentRow</code> can be -1 if the root is not visible.
+     * NOT modify {@code clipBounds}, or {@code insets}.<p>
+     * NOTE: {@code parentRow} can be -1 if the root is not visible.
+     *
+     * @param g a graphics context
+     * @param clipBounds a clipped rectangle
+     * @param insets insets
+     * @param bounds a bounding rectangle
+     * @param path a tree path
+     * @param row a row
+     * @param isExpanded {@code true} if the path is expanded
+     * @param hasBeenExpanded {@code true} if the path has been expanded
+     * @param isLeaf {@code true} if the path is leaf
      */
     protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds,
                                             Insets insets, Rectangle bounds,
@@ -1397,7 +1585,12 @@
 
     /**
      * Paints the vertical part of the leg. The receiver should
-     * NOT modify <code>clipBounds</code>, <code>insets</code>.
+     * NOT modify {@code clipBounds}, {@code insets}.
+     *
+     * @param g a graphics context
+     * @param clipBounds a clipped rectangle
+     * @param insets insets
+     * @param path a tree path
      */
     protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds,
                                           Insets insets, TreePath path) {
@@ -1472,7 +1665,17 @@
 
     /**
      * Paints the expand (toggle) part of a row. The receiver should
-     * NOT modify <code>clipBounds</code>, or <code>insets</code>.
+     * NOT modify {@code clipBounds}, or {@code insets}.
+     *
+     * @param g a graphics context
+     * @param clipBounds a clipped rectangle
+     * @param insets insets
+     * @param bounds a bounding rectangle
+     * @param path a tree path
+     * @param row a row
+     * @param isExpanded {@code true} if the path is expanded
+     * @param hasBeenExpanded {@code true} if the path has been expanded
+     * @param isLeaf {@code true} if the row is leaf
      */
     protected void paintExpandControl(Graphics g,
                                       Rectangle clipBounds, Insets insets,
@@ -1511,7 +1714,17 @@
 
     /**
      * Paints the renderer part of a row. The receiver should
-     * NOT modify <code>clipBounds</code>, or <code>insets</code>.
+     * NOT modify {@code clipBounds}, or {@code insets}.
+     *
+     * @param g a graphics context
+     * @param clipBounds a clipped rectangle
+     * @param insets insets
+     * @param bounds a bounding rectangle
+     * @param path a tree path
+     * @param row a row
+     * @param isExpanded {@code true} if the path is expanded
+     * @param hasBeenExpanded {@code true} if the path has been expanded
+     * @param isLeaf {@code true} if the path is leaf
      */
     protected void paintRow(Graphics g, Rectangle clipBounds,
                             Insets insets, Rectangle bounds, TreePath path,
@@ -1541,8 +1754,16 @@
     }
 
     /**
-     * Returns true if the expand (toggle) control should be drawn for
+     * Returns {@code true} if the expand (toggle) control should be drawn for
      * the specified row.
+     *
+     * @param path a tree path
+     * @param row a row
+     * @param isExpanded {@code true} if the path is expanded
+     * @param hasBeenExpanded {@code true} if the path has been expanded
+     * @param isLeaf {@code true} if the row is leaf
+     * @return {@code true} if the expand (toggle) control should be drawn
+     *         for the specified row
      */
     protected boolean shouldPaintExpandControl(TreePath path, int row,
                                                boolean isExpanded,
@@ -1561,6 +1782,12 @@
 
     /**
      * Paints a vertical line.
+     *
+     * @param g a graphics context
+     * @param c a component
+     * @param x an X coordinate
+     * @param top an Y1 coordinate
+     * @param bottom an Y2 coordinate
      */
     protected void paintVerticalLine(Graphics g, JComponent c, int x, int top,
                                     int bottom) {
@@ -1573,6 +1800,12 @@
 
     /**
      * Paints a horizontal line.
+     *
+     * @param g a graphics context
+     * @param c a component
+     * @param y an Y coordinate
+     * @param left an X1 coordinate
+     * @param right an X2 coordinate
      */
     protected void paintHorizontalLine(Graphics g, JComponent c, int y,
                                       int left, int right) {
@@ -1586,6 +1819,8 @@
     /**
      * The vertical element of legs between nodes starts at the bottom of the
      * parent node by default.  This method makes the leg start below that.
+     *
+     * @return the vertical leg buffer
      */
     protected int getVerticalLegBuffer() {
         return 0;
@@ -1595,6 +1830,8 @@
      * The horizontal element of legs between nodes starts at the
      * right of the left-hand side of the child node by default.  This
      * method makes the leg end before that.
+     *
+     * @return the horizontal leg buffer
      */
     protected int getHorizontalLegBuffer() {
         return 0;
@@ -1610,7 +1847,15 @@
     // Generic painting methods
     //
 
-    // Draws the icon centered at (x,y)
+    /**
+     * Draws the {@code icon} centered at (x,y).
+     *
+     * @param c a component
+     * @param graphics a graphics context
+     * @param icon an icon
+     * @param x an X coordinate
+     * @param y an Y coordinate
+     */
     protected void drawCentered(Component c, Graphics graphics, Icon icon,
                                 int x, int y) {
         icon.paintIcon(c, graphics,
@@ -1618,32 +1863,57 @@
                       y - icon.getIconHeight() / 2);
     }
 
-    // This method is slow -- revisit when Java2D is ready.
-    // assumes x1 <= x2
-    protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2){
+    /**
+     * Draws a horizontal dashed line. It is assumed {@code x1} &lt;= {@code x2}.
+     * If {@code x1} is greater than {@code x2}, the method draws nothing.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param y an Y coordinate
+     * @param x1 an X1 coordinate
+     * @param x2 an X2 coordinate
+     */
+    protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2) {
         // Drawing only even coordinates helps join line segments so they
         // appear as one line.  This can be defeated by translating the
         // Graphics by an odd amount.
-        x1 += (x1 % 2);
-
-        for (int x = x1; x <= x2; x+=2) {
-            g.drawLine(x, y, x, y);
-        }
+        drawDashedLine(g, y, x1, x2, false);
     }
 
-    // This method is slow -- revisit when Java2D is ready.
-    // assumes y1 <= y2
+    /**
+     * Draws a vertical dashed line. It is assumed {@code y1} &lt;= {@code y2}.
+     * If {@code y1} is greater than {@code y2}, the method draws nothing.
+     *
+     * @param g an instance of {@code Graphics}
+     * @param x an X coordinate
+     * @param y1 an Y1 coordinate
+     * @param y2 an Y2 coordinate
+     */
     protected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2) {
         // Drawing only even coordinates helps join line segments so they
         // appear as one line.  This can be defeated by translating the
         // Graphics by an odd amount.
-        y1 += (y1 % 2);
-
-        for (int y = y1; y <= y2; y+=2) {
-            g.drawLine(x, y, x, y);
-        }
+        drawDashedLine(g, x, y1, y2, true);
     }
 
+    private void drawDashedLine(Graphics g, int v, int v1, int v2, boolean isVertical) {
+        if (v1 >= v2) {
+            return;
+        }
+        v1 += (v1 % 2);
+        Graphics2D g2d = (Graphics2D) g;
+        Stroke oldStroke = g2d.getStroke();
+
+        BasicStroke dashedStroke = new BasicStroke(1, BasicStroke.CAP_BUTT,
+                BasicStroke.JOIN_ROUND, 0, new float[]{1}, 0);
+        g2d.setStroke(dashedStroke);
+        if (isVertical) {
+            g2d.drawLine(v, v1, v, v2);
+        } else {
+            g2d.drawLine(v1, v, v2, v);
+        }
+
+        g2d.setStroke(oldStroke);
+    }
     //
     // Various local methods
     //
@@ -1685,9 +1955,11 @@
     }
 
     /**
-     * Updates the expanded state of all the descendants of <code>path</code>
+     * Updates the expanded state of all the descendants of {@code path}
      * by getting the expanded descendants from the tree and forwarding
      * to the tree state.
+     *
+     * @param path a tree path
      */
     protected void updateExpandedDescendants(TreePath path) {
         completeEditing();
@@ -1708,7 +1980,10 @@
     }
 
     /**
-     * Returns a path to the last child of <code>parent</code>.
+     * Returns a path to the last child of {@code parent}.
+     *
+     * @param parent a tree path
+     * @return a path to the last child of {@code parent}
      */
     protected TreePath getLastChildPath(TreePath parent) {
         if(treeModel != null) {
@@ -1906,8 +2181,10 @@
     }
 
     /**
-      * Messaged from the VisibleTreeNode after it has been expanded.
-      */
+     * Messaged from the {@code VisibleTreeNode} after it has been expanded.
+     *
+     * @param path a tree path
+     */
     protected void pathWasExpanded(TreePath path) {
         if(tree != null) {
             tree.fireTreeExpanded(path);
@@ -1915,8 +2192,10 @@
     }
 
     /**
-      * Messaged from the VisibleTreeNode after it has collapsed.
-      */
+     * Messaged from the {@code VisibleTreeNode} after it has collapsed.
+     *
+     * @param path a tree path
+     */
     protected void pathWasCollapsed(TreePath path) {
         if(tree != null) {
             tree.fireTreeCollapsed(path);
@@ -1924,9 +2203,12 @@
     }
 
     /**
-      * Ensures that the rows identified by beginRow through endRow are
-      * visible.
-      */
+     * Ensures that the rows identified by {@code beginRow} through
+     * {@code endRow} are visible.
+     *
+     * @param beginRow the begin row
+     * @param endRow the end row
+     */
     protected void ensureRowsAreVisible(int beginRow, int endRow) {
         if(tree != null && beginRow >= 0 && endRow < getRowCount(tree)) {
             boolean scrollVert = DefaultLookup.getBoolean(tree, this,
@@ -1969,31 +2251,46 @@
         }
     }
 
-    /** Sets the preferred minimum size.
-      */
+    /**
+     * Sets the preferred minimum size.
+     *
+     * @param newSize the new preferred size
+     */
     public void setPreferredMinSize(Dimension newSize) {
         preferredMinSize = newSize;
     }
 
-    /** Returns the minimum preferred size.
-      */
+    /**
+     * Returns the minimum preferred size.
+     *
+     * @return the minimum preferred size
+     */
     public Dimension getPreferredMinSize() {
         if(preferredMinSize == null)
             return null;
         return new Dimension(preferredMinSize);
     }
 
-    /** Returns the preferred size to properly display the tree,
-      * this is a cover method for getPreferredSize(c, true).
-      */
+    /**
+     * Returns the preferred size to properly display the tree,
+     * this is a cover method for {@code getPreferredSize(c, true)}.
+     *
+     * @param c a component
+     * @return the preferred size to represent the tree in the component
+     */
     public Dimension getPreferredSize(JComponent c) {
         return getPreferredSize(c, true);
     }
 
-    /** Returns the preferred size to represent the tree in
-      * <I>c</I>.  If <I>checkConsistency</I> is true
-      * <b>checkConsistency</b> is messaged first.
-      */
+    /**
+     * Returns the preferred size to represent the tree in
+     * <I>c</I>.  If <I>checkConsistency</I> is {@code true}
+     * <b>checkConsistency</b> is messaged first.
+     *
+     * @param c a component
+     * @param checkConsistency if {@code true} consistency is checked
+     * @return the preferred size to represent the tree in the component
+     */
     public Dimension getPreferredSize(JComponent c,
                                       boolean checkConsistency) {
         Dimension       pSize = this.getPreferredMinSize();
@@ -2056,11 +2353,16 @@
     }
 
     /**
-      * Stops the editing session.  If messageStop is true the editor
-      * is messaged with stopEditing, if messageCancel is true the
-      * editor is messaged with cancelEditing. If messageTree is true
-      * the treeModel is messaged with valueForPathChanged.
-      */
+     * Stops the editing session. If {@code messageStop} is {@code true} the editor
+     * is messaged with {@code stopEditing}, if {@code messageCancel}
+     * is {@code true} the editor is messaged with {@code cancelEditing}.
+     * If {@code messageTree} is {@code true} the {@code treeModel} is messaged
+     * with {@code valueForPathChanged}.
+     *
+     * @param messageStop message to stop editing
+     * @param messageCancel message to cancel editing
+     * @param messageTree message to tree
+     */
     protected void completeEditing(boolean messageStop,
                                    boolean messageCancel,
                                    boolean messageTree) {
@@ -2112,10 +2414,14 @@
     }
 
     /**
-      * Will start editing for node if there is a cellEditor and
-      * shouldSelectCell returns true.<p>
-      * This assumes that path is valid and visible.
-      */
+     * Will start editing for node if there is a {@code cellEditor} and
+     * {@code shouldSelectCell} returns {@code true}.<p>
+     * This assumes that path is valid and visible.
+     *
+     * @param path a tree path
+     * @param event a mouse event
+     * @return {@code true} if the editing is successful
+     */
     protected boolean startEditing(TreePath path, MouseEvent event) {
         if (isEditing(tree) && tree.getInvokesStopCellEditing() &&
                                !stopEditing(tree)) {
@@ -2220,9 +2526,13 @@
     //
 
     /**
-     * If the <code>mouseX</code> and <code>mouseY</code> are in the
-     * expand/collapse region of the <code>row</code>, this will toggle
+     * If the {@code mouseX} and {@code mouseY} are in the
+     * expand/collapse region of the {@code row}, this will toggle
      * the row.
+     *
+     * @param path a tree path
+     * @param mouseX an X coordinate
+     * @param mouseY an Y coordinate
      */
     protected void checkForClickInExpandControl(TreePath path,
                                                 int mouseX, int mouseY) {
@@ -2232,9 +2542,15 @@
     }
 
     /**
-     * Returns true if <code>mouseX</code> and <code>mouseY</code> fall
+     * Returns {@code true} if {@code mouseX} and {@code mouseY} fall
      * in the area of row that is used to expand/collapse the node and
-     * the node at <code>row</code> does not represent a leaf.
+     * the node at {@code row} does not represent a leaf.
+     *
+     * @param path a tree path
+     * @param mouseX an X coordinate
+     * @param mouseY an Y coordinate
+     * @return {@code true} if the mouse cursor fall in the area of row that
+     *         is used to expand/collapse the node and the node is not a leaf.
      */
     protected boolean isLocationInExpandControl(TreePath path,
                                                 int mouseX, int mouseY) {
@@ -2265,7 +2581,11 @@
 
     /**
      * Messaged when the user clicks the particular row, this invokes
-     * toggleExpandState.
+     * {@code toggleExpandState}.
+     *
+     * @param path a tree path
+     * @param mouseX an X coordinate
+     * @param mouseY an Y coordinate
      */
     protected void handleExpandControlClick(TreePath path, int mouseX,
                                             int mouseY) {
@@ -2274,9 +2594,11 @@
 
     /**
      * Expands path if it is not expanded, or collapses row if it is expanded.
-     * If expanding a path and JTree scrolls on expand, ensureRowsAreVisible
-     * is invoked to scroll as many of the children to visible as possible
-     * (tries to scroll to last visible descendant of path).
+     * If expanding a path and {@code JTree} scrolls on expand,
+     * {@code ensureRowsAreVisible} is invoked to scroll as many of the children
+     * to visible as possible (tries to scroll to last visible descendant of path).
+     *
+     * @param path a tree path
      */
     protected void toggleExpandState(TreePath path) {
         if(!tree.isExpanded(path)) {
@@ -2299,8 +2621,11 @@
     }
 
     /**
-     * Returning true signifies a mouse event on the node should toggle
+     * Returning {@code true} signifies a mouse event on the node should toggle
      * the selection of only the row under mouse.
+     *
+     * @param event a mouse event
+     * @return {@code true} if a mouse event on the node should toggle the selection
      */
     protected boolean isToggleSelectionEvent(MouseEvent event) {
         return (SwingUtilities.isLeftMouseButton(event) &&
@@ -2308,8 +2633,12 @@
     }
 
     /**
-     * Returning true signifies a mouse event on the node should select
+     * Returning {@code true} signifies a mouse event on the node should select
      * from the anchor point.
+     *
+     * @param event a mouse event
+     * @return {@code true} if a mouse event on the node should select
+     *         from the anchor point
      */
     protected boolean isMultiSelectEvent(MouseEvent event) {
         return (SwingUtilities.isLeftMouseButton(event) &&
@@ -2317,9 +2646,12 @@
     }
 
     /**
-     * Returning true indicates the row under the mouse should be toggled
-     * based on the event. This is invoked after checkForClickInExpandControl,
-     * implying the location is not in the expand (toggle) control
+     * Returning {@code true} indicates the row under the mouse should be toggled
+     * based on the event. This is invoked after {@code checkForClickInExpandControl},
+     * implying the location is not in the expand (toggle) control.
+     *
+     * @param event a mouse event
+     * @return {@code true} if the row under the mouse should be toggled
      */
     protected boolean isToggleEvent(MouseEvent event) {
         if(!SwingUtilities.isLeftMouseButton(event)) {
@@ -2334,12 +2666,15 @@
     }
 
     /**
-     * Messaged to update the selection based on a MouseEvent over a
+     * Messaged to update the selection based on a {@code MouseEvent} over a
      * particular row. If the event is a toggle selection event, the
      * row is either selected, or deselected. If the event identifies
      * a multi selection event, the selection is updated from the
      * anchor point. Otherwise the row is selected, and if the event
      * specified a toggle event the row is expanded/collapsed.
+     *
+     * @param path the selected path
+     * @param event the mouse event
      */
     protected void selectPathForEvent(TreePath path, MouseEvent event) {
         /* Adjust from the anchor point. */
@@ -2397,7 +2732,10 @@
     }
 
     /**
-     * @return true if the node at <code>row</code> is a leaf.
+     * Returns {@code true} if the node at {@code row} is a leaf.
+     *
+     * @param row a row
+     * @return {@code true} if the node at {@code row} is a leaf
      */
     protected boolean isLeaf(int row) {
         TreePath          path = getPathForRow(tree, row);
@@ -2592,8 +2930,10 @@
         }
 
         /**
-         * Returns the JScrollPane housing the JTree, or null if one isn't
-         * found.
+         * Returns the {@code JScrollPane} housing the {@code JTree},
+         * or null if one isn't found.
+         *
+         * @return the {@code JScrollPane} housing the {@code JTree}
          */
         protected JScrollPane getScrollPane() {
             Component       c = tree.getParent();
@@ -2828,7 +3168,11 @@
         }
 
         /**
-         * @return amount to indent the given row.
+         * Returns amount to indent the given row.
+         *
+         * @param row a row
+         * @param depth a depth
+         * @return amount to indent the given row
          */
         protected int getRowX(int row, int depth) {
             return BasicTreeUI.this.getRowX(row, depth);
@@ -2924,6 +3268,12 @@
          * changes. */
         private boolean changeSelection;
 
+        /**
+         * Constructs a new instance of {@code TreeTraverseAction}.
+         *
+         * @param direction the direction
+         * @param name the name of action
+         */
         public TreeTraverseAction(int direction, String name) {
             this(direction, name, true);
         }
@@ -2956,6 +3306,12 @@
         private boolean       addToSelection;
         private boolean       changeSelection;
 
+        /**
+         * Constructs a new instance of {@code TreePageAction}.
+         *
+         * @param direction the direction
+         * @param name the name of action
+         */
         public TreePageAction(int direction, String name) {
             this(direction, name, false, true);
         }
@@ -2993,6 +3349,12 @@
         private boolean       addToSelection;
         private boolean       changeSelection;
 
+        /**
+         * Constructs a new instance of {@code TreeIncrementAction}.
+         *
+         * @param direction the direction
+         * @param name the name of action
+         */
         public TreeIncrementAction(int direction, String name) {
             this(direction, name, false, true);
         }
@@ -3024,11 +3386,20 @@
       */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class TreeHomeAction extends AbstractAction {
+        /**
+         * The direction.
+         */
         protected int            direction;
         /** Set to true if append to selection. */
         private boolean          addToSelection;
         private boolean          changeSelection;
 
+        /**
+         * Constructs a new instance of {@code TreeHomeAction}.
+         *
+         * @param direction the direction
+         * @param name the name of action
+         */
         public TreeHomeAction(int direction, String name) {
             this(direction, name, false, true);
         }
@@ -3059,6 +3430,11 @@
       */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class TreeToggleAction extends AbstractAction {
+        /**
+         * Constructs a new instance of {@code TreeToggleAction}.
+         *
+         * @param name the name of action
+         */
         public TreeToggleAction(String name) {
         }
 
@@ -3079,6 +3455,11 @@
      */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class TreeCancelEditingAction extends AbstractAction {
+        /**
+         * Constructs a new instance of {@code TreeCancelEditingAction}.
+         *
+         * @param name the name of action
+         */
         public TreeCancelEditingAction(String name) {
         }
 
@@ -3110,6 +3491,13 @@
         private Component          focusComponent;
         private boolean            dispatchedEvent;
 
+        /**
+         * Constructs a new instance of {@code MouseInputHandler}.
+         *
+         * @param source a source component
+         * @param destination a destination component
+         * @param event a mouse event
+         */
         public MouseInputHandler(Component source, Component destination,
                                       MouseEvent event){
             this(source, destination, event, null);
@@ -3173,6 +3561,9 @@
             removeFromSource();
         }
 
+        /**
+         * Removes an event from the source.
+         */
         protected void removeFromSource() {
             if(source != null) {
                 source.removeMouseListener(this);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicViewportUI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicViewportUI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -43,6 +43,12 @@
     // Shared UI object
     private static ViewportUI viewportUI;
 
+    /**
+     * Returns an instance of {@code BasicViewportUI}.
+     *
+     * @param c a component
+     * @return an instance of {@code BasicViewportUI}
+     */
     public static ComponentUI createUI(JComponent c) {
         if(viewportUI == null) {
             viewportUI = new BasicViewportUI();
@@ -60,6 +66,11 @@
         super.uninstallUI(c);
     }
 
+    /**
+     * Installs view port properties.
+     *
+     * @param c a component
+     */
     protected void installDefaults(JComponent c) {
         LookAndFeel.installColorsAndFont(c,
                                          "Viewport.background",
@@ -68,6 +79,11 @@
         LookAndFeel.installProperty(c, "opaque", Boolean.TRUE);
     }
 
+    /**
+     * Uninstall view port properties.
+     *
+     * @param c a component
+     */
     protected void uninstallDefaults(JComponent c) {
     }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java	Fri Aug 08 11:36:48 2014 -0700
@@ -69,6 +69,8 @@
      * Returns the list that is being used to draw the items in the combo box.
      * This method is highly implementation specific and should not be used
      * for general list manipulation.
+     *
+     * @return the list that is being used to draw the items in the combo box
      */
     public JList<Object> getList();
 
@@ -91,6 +93,8 @@
     /**
      * Returns a key listener that will be added to the combo box or null.
      * If this method returns null then it will not be added to the combo box.
+     *
+     * @return a key listener that will be added to the combo box or null
      */
     public KeyListener getKeyListener();
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,6 +41,17 @@
  */
 @SuppressWarnings("serial") // Superclass is not serializable across versions
 public class DefaultMenuLayout extends BoxLayout implements UIResource {
+
+    /**
+     * Constructs a new instance of {@code DefaultMenuLayout}.
+     *
+     * @param target the container that needs to be laid out
+     * @param axis the axis to lay out components along. Can be one of:
+     *              {@code BoxLayout.X_AXIS},
+     *              {@code BoxLayout.Y_AXIS},
+     *              {@code BoxLayout.LINE_AXIS} or
+     *              {@code BoxLayout.PAGE_AXIS}
+     */
     public DefaultMenuLayout(Container target, int axis) {
         super(target, axis);
     }
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -633,7 +633,7 @@
         LazyValue toolBarBorder = t -> new MetalBorders.ToolBarBorder();
 
         LazyValue progressBarBorder = t ->
-            new BorderUIResource.LineBorderUIResource(controlDarkShadow, new Integer(1));
+            new BorderUIResource.LineBorderUIResource(controlDarkShadow, 1);
 
         LazyValue toolTipBorder = t ->
             new BorderUIResource.LineBorderUIResource(primaryControlDarkShadow);
@@ -851,8 +851,8 @@
             "Slider.foreground", primaryControlShadow,
             "Slider.focus", focusColor,
             "Slider.focusInsets", zeroInsets,
-            "Slider.trackWidth", new Integer( 7 ),
-            "Slider.majorTickLength", new Integer( 6 ),
+            "Slider.trackWidth",  7 ,
+            "Slider.majorTickLength",  6 ,
             "Slider.horizontalThumbIcon",(LazyValue) t -> MetalIconFactory.getHorizontalSliderThumbIcon(),
             "Slider.verticalThumbIcon",(LazyValue) t -> MetalIconFactory.getVerticalSliderThumbIcon(),
             "Slider.focusInputMap",
@@ -914,7 +914,7 @@
                     new MetalBorders.OptionDialogBorder(),
             "InternalFrame.paletteBorder",(LazyValue) t ->
                     new MetalBorders.PaletteBorder(),
-            "InternalFrame.paletteTitleHeight", new Integer(11),
+            "InternalFrame.paletteTitleHeight", 11,
             "InternalFrame.paletteCloseIcon",(LazyValue) t ->
                     new MetalIconFactory.PaletteCloseIcon(),
             "InternalFrame.closeIcon",
@@ -1067,7 +1067,7 @@
             "ScrollBar.thumb", primaryControlShadow,
             "ScrollBar.thumbShadow", primaryControlDarkShadow,
             "ScrollBar.thumbHighlight", primaryControl,
-            "ScrollBar.width", new Integer( 17 ),
+            "ScrollBar.width",  17 ,
             "ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
             "ScrollBar.ancestorInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
@@ -1238,8 +1238,8 @@
             "Menu.borderPainted", Boolean.TRUE,
             "Menu.menuPopupOffsetX", zero,
             "Menu.menuPopupOffsetY", zero,
-            "Menu.submenuPopupOffsetX", new Integer(-4),
-            "Menu.submenuPopupOffsetY", new Integer(-3),
+            "Menu.submenuPopupOffsetX", -4,
+            "Menu.submenuPopupOffsetY", -3,
             "Menu.font", menuTextValue,
             "Menu.selectionForeground", menuSelectedForeground,
             "Menu.selectionBackground", menuSelectedBackground,
@@ -1354,7 +1354,7 @@
 
             // SplitPane
 
-            "SplitPane.dividerSize", new Integer(10),
+            "SplitPane.dividerSize", 10,
             "SplitPane.ancestorInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
                         "UP", "negativeIncrement",
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/Defaults.template	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/Defaults.template	Fri Aug 08 11:36:48 2014 -0700
@@ -398,7 +398,7 @@
         @Override
         public Object createValue(UIDefaults table) {
             try {
-                Class c;
+                Class<?> c;
                 Object cl;
                 // See if we should use a separate ClassLoader
                 if (table == null || !((cl = table.get("ClassLoader"))
@@ -412,7 +412,7 @@
                 }
 
                 c = Class.forName(className, true, (ClassLoader)cl);
-                Constructor constructor = c.getConstructor(
+                Constructor<?> constructor = c.getConstructor(
                         AbstractRegionPainter.PaintContext.class, int.class);
                 if (constructor == null) {
                     throw new NullPointerException(
@@ -564,7 +564,7 @@
                 //if c is not named, and parts[partIndex] has an expected class
                 //type registered, then check to make sure c is of the
                 //right type;
-                Class clazz = parts[partIndex].c;
+                Class<?> clazz = parts[partIndex].c;
                 if (clazz != null && clazz.isAssignableFrom(c.getClass())) {
                     //so far so good, recurse
                     return matches(c.getParent(), partIndex - 1);
@@ -636,7 +636,7 @@
             private String s;
             //true if this part represents a component name
             private boolean named;
-            private Class c;
+            private Class<?> c;
 
             Part(String s) {
                 named = s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"';
@@ -816,7 +816,7 @@
 
     private static final class PainterBorder implements Border, UIResource {
         private Insets insets;
-        private Painter painter;
+        private Painter<Component> painter;
         private String painterKey;
         
         PainterBorder(String painterKey, Insets insets) {
@@ -827,7 +827,9 @@
         @Override
         public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
             if (painter == null) {
-                painter = (Painter)UIManager.get(painterKey);
+                @SuppressWarnings("unchecked")
+                Painter<Component> temp = (Painter<Component>)UIManager.get(painterKey);
+                painter = temp;
                 if (painter == null) return;
             }
             
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/StateImpl.template	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/StateImpl.template	Fri Aug 08 11:36:48 2014 -0700
@@ -28,7 +28,7 @@
 import javax.swing.*;
 
 
-class ${STATE_NAME} extends State {
+class ${STATE_NAME} extends State<JComponent> {
     ${STATE_NAME}() {
         super("${STATE_KEY}");
     }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java	Fri Aug 08 11:36:48 2014 -0700
@@ -764,7 +764,7 @@
                 break;
             case 4: // integer
                 try {
-                    value = new Integer(Integer.parseInt(aValue));
+                    value = Integer.valueOf(aValue);
                 } catch (NumberFormatException nfe) {
                     throw new SAXException(property + " invalid value");
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthStyle.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthStyle.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,6 +33,7 @@
 import java.util.HashMap;
 import java.util.Map;
 import javax.swing.text.JTextComponent;
+import sun.swing.SwingUtilities2;
 
 /**
  * <code>SynthStyle</code> is a set of style properties.
@@ -303,7 +304,8 @@
               }));
 
         DEFAULT_VALUES.put("InternalFrame.icon",
-                           LookAndFeel.makeIcon(BasicLookAndFeel.class,
+                           SwingUtilities2.makeIcon(BasicLookAndFeel.class,
+                                                    BasicLookAndFeel.class,
                                                     "icons/JavaCup16.png"));
 
         DEFAULT_VALUES.put("InternalFrame.windowBindings",
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2556,7 +2556,7 @@
             if (caretPos != dot) {
                 // the caret moved
                 firePropertyChange(ACCESSIBLE_CARET_PROPERTY,
-                    new Integer(caretPos), new Integer(dot));
+                    caretPos, dot);
                 caretPos = dot;
 
                 try {
--- a/jdk/src/share/classes/javax/swing/text/html/CSS.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/CSS.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1934,13 +1934,13 @@
                 return Boolean.FALSE;
             } else if (key == StyleConstants.Alignment) {
                 if (svalue.equals("right")) {
-                    return new Integer(StyleConstants.ALIGN_RIGHT);
+                    return StyleConstants.ALIGN_RIGHT;
                 } else if (svalue.equals("center")) {
-                    return new Integer(StyleConstants.ALIGN_CENTER);
+                    return StyleConstants.ALIGN_CENTER;
                 } else if  (svalue.equals("justify")) {
-                    return new Integer(StyleConstants.ALIGN_JUSTIFIED);
+                    return StyleConstants.ALIGN_JUSTIFIED;
                 }
-                return new Integer(StyleConstants.ALIGN_LEFT);
+                return StyleConstants.ALIGN_LEFT;
             } else if (key == StyleConstants.StrikeThrough) {
                 if (svalue.indexOf("line-through") >= 0) {
                     return Boolean.TRUE;
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Fri Aug 08 11:36:48 2014 -0700
@@ -623,7 +623,7 @@
      * @param n  the number of tokens to buffer
      */
     public void setTokenThreshold(int n) {
-        putProperty(TokenThreshold, new Integer(n));
+        putProperty(TokenThreshold, n);
     }
 
     /**
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFGenerator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFGenerator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -165,14 +165,14 @@
         foregroundColor = StyleConstants.getForeground(a);
         if (foregroundColor != null &&
             colorTable.get(foregroundColor) == null) {
-            colorTable.put(foregroundColor, new Integer(colorCount));
+            colorTable.put(foregroundColor, colorCount);
             colorCount ++;
         }
 
         backgroundColor = a.getAttribute(StyleConstants.Background);
         if (backgroundColor != null &&
             colorTable.get(backgroundColor) == null) {
-            colorTable.put(backgroundColor, new Integer(colorCount));
+            colorTable.put(backgroundColor, colorCount);
             colorCount ++;
         }
 
@@ -183,7 +183,7 @@
 
         if (fontName != null &&
             fontTable.get(fontName) == null) {
-            fontTable.put(fontName, new Integer(fontCount));
+            fontTable.put(fontName, fontCount);
             fontCount ++;
         }
     }
@@ -200,7 +200,7 @@
             Integer aNum = styleTable.get(a);
             if (aNum == null) {
                 styleCount = styleCount + 1;
-                aNum = new Integer(styleCount);
+                aNum = styleCount;
                 styleTable.put(a, aNum);
             }
         }
--- a/jdk/src/share/classes/jdk/nio/zipfs/ZipFileAttributeView.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/jdk/nio/zipfs/ZipFileAttributeView.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,6 +59,7 @@
         this.isZipView = isZipView;
     }
 
+    @SuppressWarnings("unchecked") // Cast to V
     static <V extends FileAttributeView> V get(ZipPath path, Class<V> type) {
         if (type == null)
             throw new NullPointerException();
--- a/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java	Fri Aug 08 11:36:48 2014 -0700
@@ -271,6 +271,7 @@
     }
 
     @Override
+    @SuppressWarnings("unchecked") // Cast to A
     public <A extends BasicFileAttributes> A
         readAttributes(Path path, Class<A> type, LinkOption... options)
         throws IOException
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Fri Aug 08 11:36:48 2014 -0700
@@ -364,7 +364,7 @@
         }
 
         void getMethods() throws ClassNotFoundException, NoSuchMethodException {
-            Class<?> c  = Class.forName("sun.security.ec.ECParameters");
+            Class<?> c  = Class.forName("sun.security.util.ECParameters");
             Class<?>[] params = new Class<?>[] { ECPoint.class,
                                                  EllipticCurve.class };
             encodePoint = c.getMethod("encodePoint", params);
@@ -372,7 +372,7 @@
             getCurveName = c.getMethod("getCurveName", params);
             params = new Class<?>[] { byte[].class, EllipticCurve.class };
             decodePoint = c.getMethod("decodePoint", params);
-            c  = Class.forName("sun.security.ec.NamedCurve");
+            c  = Class.forName("sun.security.util.NamedCurve");
             params = new Class<?>[] { String.class };
             getECParameterSpec = c.getMethod("getECParameterSpec", params);
         }
@@ -477,7 +477,7 @@
                 throw new MarshalException(ite);
             }
 /*
-                ecPoint = sun.security.ec.ECParameters.decodePoint(
+                ecPoint = sun.security.util.ECParameters.decodePoint(
                     Base64.decode(curElem), ecParams.getCurve());
 */
             ECPublicKeySpec spec = new ECPublicKeySpec(ecPoint, ecParams);
--- a/jdk/src/share/classes/sun/applet/AppletClassLoader.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletClassLoader.java	Fri Aug 08 11:36:48 2014 -0700
@@ -137,7 +137,7 @@
      * Override loadClass so that class loading errors can be caught in
      * order to print better error messages.
      */
-    public synchronized Class loadClass(String name, boolean resolve)
+    public synchronized Class<?> loadClass(String name, boolean resolve)
         throws ClassNotFoundException
     {
         // First check if we have permission to access the package. This
@@ -166,7 +166,7 @@
      * Finds the applet class with the specified name. First searches
      * loaded JAR files then the applet code base for the class.
      */
-    protected Class findClass(String name) throws ClassNotFoundException {
+    protected Class<?> findClass(String name) throws ClassNotFoundException {
 
         int index = name.indexOf(';');
         String cookie = "";
@@ -192,9 +192,9 @@
         String encodedName = ParseUtil.encodePath(name.replace('.', '/'), false);
         final String path = (new StringBuffer(encodedName)).append(".class").append(cookie).toString();
         try {
-            byte[] b = (byte[]) AccessController.doPrivileged(
-                               new PrivilegedExceptionAction() {
-                public Object run() throws IOException {
+            byte[] b = AccessController.doPrivileged(
+                               new PrivilegedExceptionAction<byte[]>() {
+                public byte[] run() throws IOException {
                    try {
                         URL finalURL = new URL(base, path);
 
@@ -556,9 +556,10 @@
      * name. First checks loaded JAR files then the applet code base for all
      * available resources.
      */
-    public Enumeration findResources(String name) throws IOException {
+    @Override
+    public Enumeration<URL> findResources(String name) throws IOException {
 
-        final Enumeration e = super.findResources(name);
+        final Enumeration<URL> e = super.findResources(name);
 
         // 6215746:  Disable META-INF/* lookup from codebase in
         // applet/plugin classloader. [stanley.ho]
@@ -576,9 +577,9 @@
         }
 
         final URL url = u;
-        return new Enumeration() {
+        return new Enumeration<URL>() {
             private boolean done;
-            public Object nextElement() {
+            public URL nextElement() {
                 if (!done) {
                     if (e.hasMoreElements()) {
                         return e.nextElement();
@@ -601,7 +602,7 @@
      * attribute. The argument can either be the relative path
      * of the class file itself or just the name of the class.
      */
-    Class loadCode(String name) throws ClassNotFoundException {
+    Class<?> loadCode(String name) throws ClassNotFoundException {
         // first convert any '/' or native file separator to .
         name = name.replace('/', '.');
         name = name.replace(File.separatorChar, '.');
@@ -646,7 +647,7 @@
     public ThreadGroup getThreadGroup() {
       synchronized (threadGroupSynchronizer) {
         if (threadGroup == null || threadGroup.isDestroyed()) {
-            AccessController.doPrivileged(new PrivilegedAction() {
+            AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 public Object run() {
                     threadGroup = new AppletThreadGroup(base + "-threadGroup");
                     // threadGroup.setDaemon(true);
@@ -770,8 +771,8 @@
 
 
     // Hash map to store applet compatibility info
-    private HashMap jdk11AppletInfo = new HashMap();
-    private HashMap jdk12AppletInfo = new HashMap();
+    private HashMap<String, Boolean> jdk11AppletInfo = new HashMap<>();
+    private HashMap<String, Boolean> jdk12AppletInfo = new HashMap<>();
 
     /**
      * Set applet target level as JDK 1.1.
@@ -780,7 +781,7 @@
      * @param bool true if JDK is targeted for JDK 1.1;
      *             false otherwise.
      */
-    void setJDK11Target(Class clazz, boolean bool)
+    void setJDK11Target(Class<?> clazz, boolean bool)
     {
          jdk11AppletInfo.put(clazz.toString(), Boolean.valueOf(bool));
     }
@@ -792,7 +793,7 @@
      * @param bool true if JDK is targeted for JDK 1.2;
      *             false otherwise.
      */
-    void setJDK12Target(Class clazz, boolean bool)
+    void setJDK12Target(Class<?> clazz, boolean bool)
     {
         jdk12AppletInfo.put(clazz.toString(), Boolean.valueOf(bool));
     }
@@ -805,9 +806,9 @@
      *         FALSE if applet is not;
      *         null if applet is unknown.
      */
-    Boolean isJDK11Target(Class clazz)
+    Boolean isJDK11Target(Class<?> clazz)
     {
-        return (Boolean) jdk11AppletInfo.get(clazz.toString());
+        return jdk11AppletInfo.get(clazz.toString());
     }
 
     /**
@@ -818,9 +819,9 @@
      *         FALSE if applet is not;
      *         null if applet is unknown.
      */
-    Boolean isJDK12Target(Class clazz)
+    Boolean isJDK12Target(Class<?> clazz)
     {
-        return (Boolean) jdk12AppletInfo.get(clazz.toString());
+        return jdk12AppletInfo.get(clazz.toString());
     }
 
     private static AppletMessageHandler mh =
--- a/jdk/src/share/classes/sun/applet/AppletImageRef.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletImageRef.java	Fri Aug 08 11:36:48 2014 -0700
@@ -65,7 +65,7 @@
      * invoke reconstitute().
      */
     public synchronized void flush() {
-        SoftReference s = soft;
+        SoftReference<Image> s = soft;
         if (s != null) s.clear();
         soft = null;
     }
@@ -74,9 +74,9 @@
      * Sets the thing to the specified object.
      * @param thing the specified object
      */
-    public synchronized void setThing(Object thing) {
+    public synchronized void setThing(Image thing) {
         flush();
-        soft = new SoftReference(thing);
+        soft = new SoftReference<>(thing);
     }
 
     /**
--- a/jdk/src/share/classes/sun/applet/AppletObjectInputStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletObjectInputStream.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,7 +59,7 @@
      * Make a primitive array class
      */
 
-    private Class primitiveType(char type) {
+    private Class<?> primitiveType(char type) {
         switch (type) {
         case 'B': return byte.class;
         case 'C': return char.class;
@@ -76,13 +76,13 @@
     /**
      * Use the given ClassLoader rather than using the system class
      */
-    protected Class resolveClass(ObjectStreamClass classDesc)
+    protected Class<?> resolveClass(ObjectStreamClass classDesc)
         throws IOException, ClassNotFoundException {
 
         String cname = classDesc.getName();
         if (cname.startsWith("[")) {
             // An array
-            Class component;            // component class
+            Class<?> component;            // component class
             int dcount;                 // dimension
             for (dcount=1; cname.charAt(dcount)=='['; dcount++) ;
             if (cname.charAt(dcount) == 'L') {
--- a/jdk/src/share/classes/sun/applet/AppletPanel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletPanel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -179,7 +179,7 @@
 
         handler = new Thread(appletGroup, this, "thread " + nm);
         // set the context class loader for this thread
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 @Override
                 public Object run() {
                     handler.setContextClassLoader(loader);
@@ -253,7 +253,7 @@
     /**
      * AppletEvent Queue
      */
-    private Queue queue = null;
+    private Queue<Integer> queue = null;
 
 
     synchronized public void addAppletListener(AppletListener l) {
@@ -282,7 +282,7 @@
         synchronized(this) {
             if (queue == null) {
                 //System.out.println("SEND0= " + id);
-                queue = new Queue();
+                queue = new Queue<>();
             }
             Integer eventId = Integer.valueOf(id);
             queue.enqueue(eventId);
@@ -309,7 +309,7 @@
         while (queue == null || queue.isEmpty()) {
             wait();
         }
-        Integer eventId = (Integer)queue.dequeue();
+        Integer eventId = queue.dequeue();
         return new AppletEvent(this, eventId.intValue(), null);
     }
 
@@ -631,14 +631,15 @@
      * calls KeyboardFocusManager directly.
      */
     private Component getMostRecentFocusOwnerForWindow(Window w) {
-        Method meth = (Method)AccessController.doPrivileged(new PrivilegedAction() {
+        Method meth = AccessController.doPrivileged(
+            new PrivilegedAction<Method>() {
                 @Override
-                public Object run() {
+                public Method run() {
                     Method meth = null;
                     try {
                         meth = KeyboardFocusManager.class.getDeclaredMethod(
                                 "getMostRecentFocusOwner",
-                                new Class[]{Window.class});
+                                new Class<?>[]{Window.class});
                         meth.setAccessible(true);
                     } catch (Exception e) {
                         // Must never happen
@@ -988,7 +989,7 @@
     /**
      * The class loaders
      */
-    private static HashMap classloaders = new HashMap();
+    private static HashMap<String, AppletClassLoader> classloaders = new HashMap<>();
 
     /**
      * Flush a class loader.
@@ -1001,7 +1002,7 @@
      * Flush all class loaders.
      */
     public static synchronized void flushClassLoaders() {
-        classloaders = new HashMap();
+        classloaders = new HashMap<>();
     }
 
     /**
@@ -1018,14 +1019,14 @@
      * Get a class loader. Create in a restricted context
      */
     synchronized AppletClassLoader getClassLoader(final URL codebase, final String key) {
-        AppletClassLoader c = (AppletClassLoader)classloaders.get(key);
+        AppletClassLoader c = classloaders.get(key);
         if (c == null) {
             AccessControlContext acc =
                 getAccessControlContext(codebase);
-            c = (AppletClassLoader)
-                AccessController.doPrivileged(new PrivilegedAction() {
+            c = AccessController.doPrivileged(
+                    new PrivilegedAction<AppletClassLoader>() {
                         @Override
-                        public Object run() {
+                        public AppletClassLoader run() {
                             AppletClassLoader ac = createClassLoader(codebase);
                             /* Should the creation of the classloader be
                              * within the class synchronized block?  Since
@@ -1043,8 +1044,7 @@
                              * (which timeout when called from the browser).
                              */
                             synchronized (getClass()) {
-                                AppletClassLoader res =
-                                    (AppletClassLoader)classloaders.get(key);
+                                AppletClassLoader res = classloaders.get(key);
                                 if (res == null) {
                                     classloaders.put(key, ac);
                                     return ac;
@@ -1066,10 +1066,10 @@
      */
     private AccessControlContext getAccessControlContext(final URL codebase) {
 
-        PermissionCollection perms = (PermissionCollection)
-            AccessController.doPrivileged(new PrivilegedAction() {
+        PermissionCollection perms = AccessController.doPrivileged(
+                new PrivilegedAction<PermissionCollection>() {
                     @Override
-                    public Object run() {
+                    public PermissionCollection run() {
                         Policy p = java.security.Policy.getPolicy();
                         if (p != null) {
                             return p.getPermissions(new CodeSource(null,
@@ -1172,13 +1172,15 @@
         // critical section of the window list in AppContext.
         synchronized (Window.class)
         {
-            WeakReference weakRef = null;
+            WeakReference<Window> weakRef = null;
             // Remove frame from the Window list in wrong AppContext
             {
                 // Lookup current frame's AppContext
-                Vector<WeakReference<Window>> windowList = (Vector<WeakReference<Window>>)oldAppContext.get(Window.class);
+                @SuppressWarnings("unchecked")
+                Vector<WeakReference<Window>> windowList =
+                    (Vector<WeakReference<Window>>)oldAppContext.get(Window.class);
                 if (windowList != null) {
-                    for (WeakReference ref : windowList) {
+                    for (WeakReference<Window> ref : windowList) {
                         if (ref.get() == frame) {
                             weakRef = ref;
                             break;
@@ -1195,7 +1197,9 @@
 
             // Insert frame into the Window list in the applet's AppContext map
             {
-                Vector<WeakReference<Window>> windowList = (Vector)newAppContext.get(Window.class);
+                @SuppressWarnings("unchecked")
+                Vector<WeakReference<Window>> windowList =
+                    (Vector<WeakReference<Window>>)newAppContext.get(Window.class);
                 if (windowList == null) {
                     windowList = new Vector<WeakReference<Window>>();
                     newAppContext.put(Window.class, windowList);
@@ -1224,7 +1228,7 @@
         // synchronized on applet class object, so calling from
         // different instances of the same applet will be
         // serialized.
-        Class appletClass = applet.getClass();
+        Class<?> appletClass = applet.getClass();
 
         synchronized(appletClass)  {
             // Determine if the JDK level of an applet has been
--- a/jdk/src/share/classes/sun/applet/AppletProps.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletProps.java	Fri Aug 08 11:36:48 2014 -0700
@@ -105,9 +105,9 @@
         String proxyPortValue = proxyPort.getText().trim();
 
         // Get properties
-        final Properties props = (Properties) AccessController.doPrivileged(
-             new PrivilegedAction() {
-                 public Object run() {
+        final Properties props = AccessController.doPrivileged(
+             new PrivilegedAction<Properties>() {
+                 public Properties run() {
                      return System.getProperties();
                  }
         });
@@ -148,7 +148,7 @@
         // Save properties
         try {
             reset();
-            AccessController.doPrivileged(new PrivilegedExceptionAction() {
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                 public Object run() throws IOException {
                     File dotAV = Main.theUserPropertiesFile;
                     FileOutputStream out = new FileOutputStream(dotAV);
--- a/jdk/src/share/classes/sun/applet/AppletSecurity.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletSecurity.java	Fri Aug 08 11:36:48 2014 -0700
@@ -80,7 +80,7 @@
     }
 
     // Cache to store known restricted packages
-    private HashSet restrictedPackages = new HashSet();
+    private HashSet<String> restrictedPackages = new HashSet<>();
 
     /**
      * Reset from Properties
@@ -90,11 +90,11 @@
         // Clear cache
         restrictedPackages.clear();
 
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run()
             {
                 // Enumerate system properties
-                Enumeration e = System.getProperties().propertyNames();
+                Enumeration<?> e = System.getProperties().propertyNames();
 
                 while (e.hasMoreElements())
                 {
@@ -130,7 +130,7 @@
             return (AppletClassLoader)loader;
 
         // if that fails, get all the classes on the stack and check them.
-        Class[] context = getClassContext();
+        Class<?>[] context = getClassContext();
         for (int i = 0; i < context.length; i++) {
             loader = context[i].getClassLoader();
             if (loader instanceof AppletClassLoader)
@@ -148,37 +148,38 @@
             final ClassLoader currentLoader = context[i].getClassLoader();
 
             if (currentLoader instanceof URLClassLoader) {
-                loader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
-                    public Object run() {
+                loader = AccessController.doPrivileged(
+                    new PrivilegedAction<ClassLoader>() {
+                        public ClassLoader run() {
+
+                            AccessControlContext acc = null;
+                            ProtectionDomain[] pds = null;
 
-                        AccessControlContext acc = null;
-                        ProtectionDomain[] pds = null;
+                            try {
+                                acc = (AccessControlContext) facc.get(currentLoader);
+                                if (acc == null) {
+                                    return null;
+                                }
 
-                        try {
-                            acc = (AccessControlContext) facc.get(currentLoader);
-                            if (acc == null) {
-                                return null;
+                                pds = (ProtectionDomain[]) fcontext.get(acc);
+                                if (pds == null) {
+                                    return null;
+                                }
+                            } catch (Exception e) {
+                                throw new UnsupportedOperationException(e);
                             }
 
-                            pds = (ProtectionDomain[]) fcontext.get(acc);
-                            if (pds == null) {
-                                return null;
-                            }
-                        } catch (Exception e) {
-                            throw new UnsupportedOperationException(e);
-                        }
+                            for (int i=0; i<pds.length; i++) {
+                                ClassLoader cl = pds[i].getClassLoader();
 
-                        for (int i=0; i<pds.length; i++) {
-                            ClassLoader cl = pds[i].getClassLoader();
-
-                            if (cl instanceof AppletClassLoader) {
-                                    return cl;
+                                if (cl instanceof AppletClassLoader) {
+                                        return cl;
+                                }
                             }
+
+                            return null;
                         }
-
-                        return null;
-                    }
-                });
+                    });
 
                 if (loader != null) {
                     return (AppletClassLoader) loader;
@@ -282,9 +283,9 @@
         super.checkPackageAccess(pkgname);
 
         // now check the list of restricted packages
-        for (Iterator iter = restrictedPackages.iterator(); iter.hasNext();)
+        for (Iterator<String> iter = restrictedPackages.iterator(); iter.hasNext();)
         {
-            String pkg = (String) iter.next();
+            String pkg = iter.next();
 
             // Prevent matching "sun" and "sunir" even if they
             // starts with similar beginning characters
--- a/jdk/src/share/classes/sun/applet/AppletViewer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletViewer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -94,7 +94,7 @@
 
     @Override
     public AppletViewer createAppletViewer(int x, int y,
-                                           URL doc, Hashtable atts) {
+                                           URL doc, Hashtable<String, String> atts) {
         return new AppletViewer(x, y, doc, atts, System.out, this);
     }
 
@@ -156,7 +156,7 @@
     /**
      * Create the applet viewer.
      */
-    public AppletViewer(int x, int y, URL doc, Hashtable atts,
+    public AppletViewer(int x, int y, URL doc, Hashtable<String, String> atts,
                         PrintStream statusMsgStream, AppletViewerFactory factory) {
         this.factory = factory;
         this.statusMsgStream = statusMsgStream;
@@ -350,7 +350,7 @@
      *             s.  Whitespace not stripped.
      */
     private String [] splitSeparator(String sep, String s) {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<>();
         int tokenStart = 0;
         int tokenEnd   = 0;
 
@@ -370,7 +370,7 @@
      * Methods for java.applet.AppletContext
      */
 
-    private static Map audioClips = new HashMap();
+    private static Map<URL, AudioClip> audioClips = new HashMap<>();
 
     /**
      * Get an audio clip.
@@ -379,7 +379,7 @@
     public AudioClip getAudioClip(URL url) {
         checkConnect(url);
         synchronized (audioClips) {
-            AudioClip clip = (AudioClip)audioClips.get(url);
+            AudioClip clip = audioClips.get(url);
             if (clip == null) {
                 audioClips.put(url, clip = new AppletAudioClip(url));
             }
@@ -387,7 +387,7 @@
         }
     }
 
-    private static Map imageRefs = new HashMap();
+    private static Map<URL, AppletImageRef> imageRefs = new HashMap<>();
 
     /**
      * Get an image.
@@ -403,7 +403,7 @@
     static Image getCachedImage(URL url) {
         // System.getSecurityManager().checkConnection(url.getHost(), url.getPort());
         synchronized (imageRefs) {
-            AppletImageRef ref = (AppletImageRef)imageRefs.get(url);
+            AppletImageRef ref = imageRefs.get(url);
             if (ref == null) {
                 ref = new AppletImageRef(url);
                 imageRefs.put(url, ref);
@@ -419,7 +419,7 @@
         imageRefs.clear();
     }
 
-    static Vector appletPanels = new Vector();
+    static Vector<AppletPanel> appletPanels = new Vector<>();
 
     /**
      * Get an applet by name.
@@ -430,8 +430,8 @@
         name = name.toLowerCase();
         SocketPermission panelSp =
             new SocketPermission(panel.getCodeBase().getHost(), "connect");
-        for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) {
-            AppletPanel p = (AppletPanel)e.nextElement();
+        for (Enumeration<AppletPanel> e = appletPanels.elements() ; e.hasMoreElements() ;) {
+            AppletPanel p = e.nextElement();
             String param = p.getParameter("name");
             if (param != null) {
                 param = param.toLowerCase();
@@ -455,14 +455,14 @@
      * applets on this page.
      */
     @Override
-    public Enumeration getApplets() {
+    public Enumeration<Applet> getApplets() {
         AppletSecurity security = (AppletSecurity)System.getSecurityManager();
-        Vector v = new Vector();
+        Vector<Applet> v = new Vector<>();
         SocketPermission panelSp =
             new SocketPermission(panel.getCodeBase().getHost(), "connect");
 
-        for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) {
-            AppletPanel p = (AppletPanel)e.nextElement();
+        for (Enumeration<AppletPanel> e = appletPanels.elements() ; e.hasMoreElements() ;) {
+            AppletPanel p = e.nextElement();
             if (p.getDocumentBase().equals(panel.getDocumentBase())) {
 
                 SocketPermission sp =
@@ -509,7 +509,7 @@
     }
 
     @Override
-    public Iterator getStreamKeys(){
+    public Iterator<String> getStreamKeys(){
         // We do nothing.
         return null;
     }
@@ -517,7 +517,7 @@
     /**
      * System parameters.
      */
-    static Hashtable systemParam = new Hashtable();
+    static Hashtable<String, String> systemParam = new Hashtable<>();
 
     static {
         systemParam.put("codebase", "codebase");
@@ -533,32 +533,32 @@
     /**
      * Print the HTML tag.
      */
-    public static void printTag(PrintStream out, Hashtable atts) {
+    public static void printTag(PrintStream out, Hashtable<String, String> atts) {
         out.print("<applet");
 
-        String v = (String)atts.get("codebase");
+        String v = atts.get("codebase");
         if (v != null) {
             out.print(" codebase=\"" + v + "\"");
         }
 
-        v = (String)atts.get("code");
+        v = atts.get("code");
         if (v == null) {
             v = "applet.class";
         }
         out.print(" code=\"" + v + "\"");
-        v = (String)atts.get("width");
+        v = atts.get("width");
         if (v == null) {
             v = "150";
         }
         out.print(" width=" + v);
 
-        v = (String)atts.get("height");
+        v = atts.get("height");
         if (v == null) {
             v = "100";
         }
         out.print(" height=" + v);
 
-        v = (String)atts.get("name");
+        v = atts.get("name");
         if (v != null) {
             out.print(" name=\"" + v + "\"");
         }
@@ -568,8 +568,8 @@
         int len = atts.size();
         String params[] = new String[len];
         len = 0;
-        for (Enumeration e = atts.keys() ; e.hasMoreElements() ;) {
-            String param = (String)e.nextElement();
+        for (Enumeration<String> e = atts.keys() ; e.hasMoreElements() ;) {
+            String param = e.nextElement();
             int i = 0;
             for (; i < len ; i++) {
                 if (params[i].compareTo(param) >= 0) {
@@ -649,7 +649,7 @@
      * Save the applet to a well known file (for now) as a serialized object
      */
     void appletSave() {
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
 
             @Override
             public Object run() {
@@ -702,8 +702,10 @@
     void appletClone() {
         Point p = location();
         updateAtts();
+        @SuppressWarnings("unchecked")
+        Hashtable<String, String> tmp = (Hashtable<String, String>) panel.atts.clone();
         factory.createAppletViewer(p.x + XDELTA, p.y + YDELTA,
-                                   panel.documentURL, (Hashtable)panel.atts.clone());
+                                   panel.documentURL, tmp);
     }
 
     /**
@@ -884,8 +886,8 @@
             @Override
             public void run()
             {
-                for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) {
-                    AppletPanel p = (AppletPanel)e.nextElement();
+                for (Enumeration<AppletPanel> e = appletPanels.elements() ; e.hasMoreElements() ;) {
+                    AppletPanel p = e.nextElement();
                     appletShutdown(p);
                 }
                 appletSystemExit();
@@ -1016,8 +1018,8 @@
     /**
      * Scan tag
      */
-    public static Hashtable scanTag(Reader in) throws IOException {
-        Hashtable atts = new Hashtable();
+    public static Hashtable<String, String> scanTag(Reader in) throws IOException {
+        Hashtable<String, String> atts = new Hashtable<>();
         skipSpace(in);
         while (c >= 0 && c != '>') {
             String att = scanIdentifier(in);
@@ -1122,7 +1124,7 @@
         url = conn.getURL();
 
         int ydisp = 1;
-        Hashtable atts = null;
+        Hashtable<String, String> atts = null;
 
         while(true) {
             c = in.read();
@@ -1172,12 +1174,12 @@
                 else {
                     String nm = scanIdentifier(in);
                     if (nm.equalsIgnoreCase("param")) {
-                        Hashtable t = scanTag(in);
-                        String att = (String)t.get("name");
+                        Hashtable<String, String> t = scanTag(in);
+                        String att = t.get("name");
                         if (att == null) {
                             statusMsgStream.println(requiresNameWarning);
                         } else {
-                            String val = (String)t.get("value");
+                            String val = t.get("value");
                             if (val == null) {
                                 statusMsgStream.println(requiresNameWarning);
                             } else if (atts != null) {
@@ -1235,13 +1237,13 @@
                     }
                     else if (nm.equalsIgnoreCase("app")) {
                         statusMsgStream.println(appNotLongerSupportedWarning);
-                        Hashtable atts2 = scanTag(in);
-                        nm = (String)atts2.get("class");
+                        Hashtable<String, String> atts2 = scanTag(in);
+                        nm = atts2.get("class");
                         if (nm != null) {
                             atts2.remove("class");
                             atts2.put("code", nm + ".class");
                         }
-                        nm = (String)atts2.get("src");
+                        nm = atts2.get("src");
                         if (nm != null) {
                             atts2.remove("src");
                             atts2.put("codebase", nm);
--- a/jdk/src/share/classes/sun/applet/AppletViewerFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletViewerFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -35,7 +35,8 @@
 
 public
 interface AppletViewerFactory {
-        public AppletViewer createAppletViewer(int x, int y, URL doc, Hashtable atts);
+        public AppletViewer createAppletViewer(int x, int y, URL doc,
+                                               Hashtable<String, String> atts);
         public MenuBar getBaseMenuBar();
         public boolean isStandalone();
 }
--- a/jdk/src/share/classes/sun/applet/AppletViewerPanel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/AppletViewerPanel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -59,7 +59,7 @@
     /**
      * The attributes of the applet.
      */
-    Hashtable atts;
+    Hashtable<String, String> atts;
 
     /*
      * JDK 1.1 serialVersionUID
@@ -69,7 +69,7 @@
     /**
      * Construct an applet viewer and start the applet.
      */
-    AppletViewerPanel(URL documentURL, Hashtable atts) {
+    AppletViewerPanel(URL documentURL, Hashtable<String, String> atts) {
         this.documentURL = documentURL;
         this.atts = atts;
 
@@ -105,7 +105,7 @@
      * Get an applet parameter.
      */
     public String getParameter(String name) {
-        return (String)atts.get(name.toLowerCase());
+        return atts.get(name.toLowerCase());
     }
 
     /**
--- a/jdk/src/share/classes/sun/applet/Main.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/applet/Main.java	Fri Aug 08 11:36:48 2014 -0700
@@ -84,7 +84,7 @@
     /**
      * The list of valid URLs passed in to AppletViewer.
      */
-    private static Vector urlList = new Vector(1);
+    private static Vector<URL> urlList = new Vector<>(1);
 
     // This is used in init().  Getting rid of this is desirable but depends
     // on whether the property that uses it is necessary/standard.
@@ -153,7 +153,7 @@
                 // XXX 5/17 this parsing method should be changed/fixed so that
                 // it doesn't do both parsing of the html file and launching of
                 // the AppletPanel
-                AppletViewer.parse((URL) urlList.elementAt(i), encoding);
+                AppletViewer.parse(urlList.elementAt(i), encoding);
             } catch (IOException e) {
                 System.err.println(lookup("main.err.io", e.getMessage()));
                 return 1;
@@ -307,10 +307,10 @@
         // 2) Reflection removes any build dependency between appletviewer
         // and jdb.
         try {
-            Class c = Class.forName("com.sun.tools.example.debug.tty.TTY", true,
+            Class<?> c = Class.forName("com.sun.tools.example.debug.tty.TTY", true,
                                     ClassLoader.getSystemClassLoader());
             Method m = c.getDeclaredMethod("main",
-                                           new Class[] { String[].class });
+                                           new Class<?>[] { String[].class });
             m.invoke(null, new Object[] { newArgs });
         } catch (ClassNotFoundException cnfe) {
             System.err.println(lookup("main.debug.cantfinddebug"));
@@ -367,7 +367,7 @@
         // Read in the System properties.  If something is going to be
         // over-written, warn about it.
         Properties sysProps = System.getProperties();
-        for (Enumeration e = sysProps.propertyNames(); e.hasMoreElements(); ) {
+        for (Enumeration<?> e = sysProps.propertyNames(); e.hasMoreElements(); ) {
             String key = (String) e.nextElement();
             String val = sysProps.getProperty(key);
             String oldVal;
--- a/jdk/src/share/classes/sun/audio/AudioData.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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 sun.audio;
-
-import java.io.*;
-import java.util.Arrays;
-
-import javax.sound.sampled.*;
-
-
-/**
- * A clip of audio data. This data can be used to construct an
- * AudioDataStream, which can be played. <p>
- *
- * @author  Arthur van Hoff
- * @author  Kara Kytle
- * @see     AudioDataStream
- * @see     AudioPlayer
- */
-
- /*
-  * the idea here is that the AudioData object encapsulates the
-  * data you need to play an audio clip based on a defined set
-  * of data.  to do this, you require the audio data (a byte
-  * array rather than an arbitrary input stream) and a format
-  * object.
-  */
-
-
-public final class AudioData {
-
-    private static final AudioFormat DEFAULT_FORMAT =
-        new AudioFormat(AudioFormat.Encoding.ULAW,
-                        8000,   // sample rate
-                        8,      // sample size in bits
-                        1,      // channels
-                        1,      // frame size in bytes
-                        8000,   // frame rate
-                        true ); // bigendian (irrelevant for 8-bit data)
-
-    AudioFormat format;   // carry forth the format array amusement
-    byte buffer[];
-
-    /**
-     * Constructor
-     */
-    public AudioData(final byte[] buffer) {
-        // if we cannot extract valid format information, we resort to assuming
-        // the data will be 8k mono u-law in order to provide maximal backwards
-        // compatibility....
-        this(DEFAULT_FORMAT, buffer);
-
-        // okay, we need to extract the format and the byte buffer of data
-        try {
-            AudioInputStream ais = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer));
-            this.format = ais.getFormat();
-            ais.close();
-            // $$fb 2002-10-27: buffer contains the file header now!
-        } catch (IOException e) {
-            // use default format
-        } catch (UnsupportedAudioFileException e1 ) {
-            // use default format
-        }
-    }
-
-
-    /**
-     * Non-public constructor; this is the one we use in ADS and CADS
-     * constructors.
-     */
-    AudioData(final AudioFormat format, final byte[] buffer) {
-        this.format = format;
-        if (buffer != null) {
-            this.buffer = Arrays.copyOf(buffer, buffer.length);
-        }
-    }
-}
--- a/jdk/src/share/classes/sun/audio/AudioDataStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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 sun.audio;
-
-import java.io.*;
-
-/**
- * An input stream to play AudioData.
- *
- * @see AudioPlayer
- * @see AudioData
- * @author Arthur van Hoff
- * @author Kara Kytle
- */
-public class AudioDataStream extends ByteArrayInputStream {
-
-    private final AudioData ad;
-
-    /**
-     * Constructor
-     */
-    public AudioDataStream(final AudioData data) {
-
-        super(data.buffer);
-        this.ad = data;
-    }
-
-    final AudioData getAudioData() {
-        return ad;
-    }
-}
--- a/jdk/src/share/classes/sun/audio/AudioDevice.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,419 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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 sun.audio;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-
-import javax.sound.sampled.*;
-import javax.sound.midi.*;
-import com.sun.media.sound.DataPusher;
-import com.sun.media.sound.Toolkit;
-
-/**
- * This class provides an interface to the Headspace Audio engine through
- * the Java Sound API.
- *
- * This class emulates systems with multiple audio channels, mixing
- * multiple streams for the workstation's single-channel device.
- *
- * @see AudioData
- * @see AudioDataStream
- * @see AudioStream
- * @see AudioStreamSequence
- * @see ContinuousAudioDataStream
- * @author David Rivas
- * @author Kara Kytle
- * @author Jan Borgersen
- * @author Florian Bomers
- */
-
-public final class AudioDevice {
-
-    private boolean DEBUG = false  /*true*/ ;
-
-    private Vector<Info> infos;
-
-    /** Are we currently playing audio? */
-    private boolean playing = false;
-
-    /** Handle to the JS audio mixer. */
-    private Mixer mixer = null;
-
-
-
-    /**
-     * The default audio player. This audio player is initialized
-     * automatically.
-     */
-    public static final AudioDevice device = new AudioDevice();
-
-    /**
-     * Create an AudioDevice instance.
-     */
-    private AudioDevice() {
-        infos = new Vector<>();
-    }
-
-
-    private synchronized void startSampled( AudioInputStream as,
-                                            InputStream in ) throws UnsupportedAudioFileException,
-                                  LineUnavailableException {
-
-        Info info = null;
-        DataPusher datapusher = null;
-        DataLine.Info lineinfo = null;
-        SourceDataLine sourcedataline = null;
-
-        // if ALAW or ULAW, we must convert....
-        as = Toolkit.getPCMConvertedAudioInputStream(as);
-
-        if( as==null ) {
-            // could not convert
-            return;
-        }
-
-        lineinfo = new DataLine.Info(SourceDataLine.class,
-                                     as.getFormat());
-        if( !(AudioSystem.isLineSupported(lineinfo))) {
-            return;
-        }
-        sourcedataline = (SourceDataLine)AudioSystem.getLine(lineinfo);
-        datapusher = new DataPusher(sourcedataline, as);
-
-        info = new Info( null, in, datapusher );
-        infos.addElement( info );
-
-        datapusher.start();
-    }
-
-    private synchronized void startMidi( InputStream bis,
-                                         InputStream in ) throws InvalidMidiDataException,
-                                  MidiUnavailableException  {
-
-        Sequencer sequencer = null;
-        Info info = null;
-
-        sequencer = MidiSystem.getSequencer( );
-        sequencer.open();
-        try {
-            sequencer.setSequence( bis );
-        } catch( IOException e ) {
-            throw new InvalidMidiDataException( e.getMessage() );
-        }
-
-        info = new Info( sequencer, in, null );
-
-        infos.addElement( info );
-
-        // fix for bug 4302884: Audio device is not released when AudioClip stops
-        sequencer.addMetaEventListener(info);
-
-        sequencer.start();
-
-    }
-
-
-
-    /**
-     *  Open an audio channel.
-     */
-    public synchronized void openChannel(InputStream in) {
-
-
-        if(DEBUG) {
-            System.out.println("AudioDevice: openChannel");
-            System.out.println("input stream =" + in);
-        }
-
-        Info info = null;
-
-        // is this already playing?  if so, then just return
-        for(int i=0; i<infos.size(); i++) {
-            info = infos.elementAt(i);
-            if( info.in == in ) {
-
-                return;
-            }
-        }
-
-
-        AudioInputStream as = null;
-
-        if( in instanceof AudioStream ) {
-
-            if ( ((AudioStream)in).midiformat != null ) {
-
-                // it's a midi file
-                try {
-                    startMidi( ((AudioStream)in).stream, in );
-                } catch (Exception e) {
-                    return;
-                }
-
-
-            } else if( ((AudioStream)in).ais != null ) {
-
-                // it's sampled audio
-                try {
-                    startSampled( ((AudioStream)in).ais, in );
-                } catch (Exception e) {
-                    return;
-                }
-
-            }
-        } else if (in instanceof AudioDataStream ) {
-            if (in instanceof ContinuousAudioDataStream) {
-                try {
-                    AudioInputStream ais = new AudioInputStream(in,
-                                                                ((AudioDataStream)in).getAudioData().format,
-                                                                AudioSystem.NOT_SPECIFIED);
-                    startSampled(ais, in );
-                } catch (Exception e) {
-                    return;
-                }
-            }
-            else {
-                try {
-                    AudioInputStream ais = new AudioInputStream(in,
-                                                                ((AudioDataStream)in).getAudioData().format,
-                                                                ((AudioDataStream)in).getAudioData().buffer.length);
-                    startSampled(ais, in );
-                } catch (Exception e) {
-                    return;
-                }
-            }
-        } else {
-            BufferedInputStream bis = new BufferedInputStream( in, 1024 );
-
-            try {
-
-                try {
-                    as = AudioSystem.getAudioInputStream(bis);
-                } catch(IOException ioe) {
-                    return;
-                }
-
-                startSampled( as, in );
-
-            } catch( UnsupportedAudioFileException e ) {
-
-                try {
-                    try {
-                        MidiFileFormat mff =
-                            MidiSystem.getMidiFileFormat( bis );
-                    } catch(IOException ioe1) {
-                        return;
-                    }
-
-                    startMidi( bis, in );
-
-
-                } catch( InvalidMidiDataException e1 ) {
-
-                    // $$jb:08.01.99: adding this section to make some of our other
-                    // legacy classes work.....
-                    // not MIDI either, special case handling for all others
-
-                    AudioFormat defformat = new AudioFormat( AudioFormat.Encoding.ULAW,
-                                                             8000, 8, 1, 1, 8000, true );
-                    try {
-                        AudioInputStream defaif = new AudioInputStream( bis,
-                                                                        defformat, AudioSystem.NOT_SPECIFIED);
-                        startSampled( defaif, in );
-                    } catch (UnsupportedAudioFileException es) {
-                        return;
-                    } catch (LineUnavailableException es2) {
-                        return;
-                    }
-
-                } catch( MidiUnavailableException e2 ) {
-
-                    // could not open sequence
-                    return;
-                }
-
-            } catch( LineUnavailableException e ) {
-
-                return;
-            }
-        }
-
-        // don't forget adjust for a new stream.
-        notify();
-    }
-
-
-    /**
-     *  Close an audio channel.
-     */
-    public synchronized void closeChannel(InputStream in) {
-
-        if(DEBUG) {
-            System.out.println("AudioDevice.closeChannel");
-        }
-
-        if (in == null) return;         // can't go anywhere here!
-
-        Info info;
-
-        for(int i=0; i<infos.size(); i++) {
-
-            info = infos.elementAt(i);
-
-            if( info.in == in ) {
-
-                if( info.sequencer != null ) {
-
-                    info.sequencer.stop();
-                    //info.sequencer.close();
-                    infos.removeElement( info );
-
-                } else if( info.datapusher != null ) {
-
-                    info.datapusher.stop();
-                    infos.removeElement( info );
-                }
-            }
-        }
-        notify();
-    }
-
-
-    /**
-     * Open the device (done automatically)
-     */
-    public synchronized void open() {
-
-        // $$jb: 06.24.99: This is done on a per-stream
-        // basis using the new JS API now.
-    }
-
-
-    /**
-     * Close the device (done automatically)
-     */
-    public synchronized void close() {
-
-        // $$jb: 06.24.99: This is done on a per-stream
-        // basis using the new JS API now.
-
-    }
-
-
-    /**
-     * Play open audio stream(s)
-     */
-    public void play() {
-
-        // $$jb: 06.24.99:  Holdover from old architechture ...
-        // we now open/close the devices as needed on a per-stream
-        // basis using the JavaSound API.
-
-        if (DEBUG) {
-            System.out.println("exiting play()");
-        }
-    }
-
-    /**
-     * Close streams
-     */
-    public synchronized void closeStreams() {
-
-        Info info;
-
-        for(int i=0; i<infos.size(); i++) {
-
-            info = infos.elementAt(i);
-
-            if( info.sequencer != null ) {
-
-                info.sequencer.stop();
-                info.sequencer.close();
-                infos.removeElement( info );
-
-            } else if( info.datapusher != null ) {
-
-                info.datapusher.stop();
-                infos.removeElement( info );
-            }
-        }
-
-
-        if (DEBUG) {
-            System.err.println("Audio Device: Streams all closed.");
-        }
-        // Empty the hash table.
-        infos = new Vector<>();
-    }
-
-    /**
-     * Number of channels currently open.
-     */
-    public int openChannels() {
-        return infos.size();
-    }
-
-    /**
-     * Make the debug info print out.
-     */
-    void setVerbose(boolean v) {
-        DEBUG = v;
-    }
-
-
-
-
-
-
-    // INFO CLASS
-
-    final class Info implements MetaEventListener {
-
-        final Sequencer   sequencer;
-        final InputStream in;
-        final DataPusher  datapusher;
-
-        Info( Sequencer sequencer, InputStream in, DataPusher datapusher ) {
-
-            this.sequencer  = sequencer;
-            this.in         = in;
-            this.datapusher = datapusher;
-        }
-
-        public void meta(MetaMessage event) {
-            if (event.getType() == 47 && sequencer != null) {
-                sequencer.close();
-            }
-        }
-    }
-
-
-
-}
--- a/jdk/src/share/classes/sun/audio/AudioPlayer.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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 sun.audio;
-
-import java.io.InputStream;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-
-/**
- * This class provides an interface to play audio streams.
- *
- * To play an audio stream use:
- * <pre>
- *      AudioPlayer.player.start(audiostream);
- * </pre>
- * To stop playing an audio stream use:
- * <pre>
- *      AudioPlayer.player.stop(audiostream);
- * </pre>
- * To play an audio stream from a URL use:
- * <pre>
- *      AudioStream audiostream = new AudioStream(url.openStream());
- *      AudioPlayer.player.start(audiostream);
- * </pre>
- * To play a continuous sound you first have to
- * create an AudioData instance and use it to construct a
- * ContinuousAudioDataStream.
- * For example:
- * <pre>
- *      AudioData data = new AudioStream(url.openStream()).getData();
- *      ContinuousAudioDataStream audiostream = new ContinuousAudioDataStream(data);
- *      AudioPlayer.player.start(audiostream);
- * </pre>
- *
- * @see AudioData
- * @see AudioDataStream
- * @see AudioDevice
- * @see AudioStream
- * @author Arthur van Hoff, Thomas Ball
- */
-
-public final class AudioPlayer extends Thread {
-
-        private final AudioDevice devAudio;
-        private final static boolean DEBUG = false /*true*/;
-
-        /**
-         * The default audio player. This audio player is initialized
-         * automatically.
-         */
-        public static final AudioPlayer player = getAudioPlayer();
-
-        private static ThreadGroup getAudioThreadGroup() {
-
-            if(DEBUG) { System.out.println("AudioPlayer.getAudioThreadGroup()"); }
-            ThreadGroup g = currentThread().getThreadGroup();
-            while ((g.getParent() != null) &&
-                   (g.getParent().getParent() != null)) {
-                g = g.getParent();
-            }
-            return g;
-        }
-
-        /**
-         * Create an AudioPlayer thread in a privileged block.
-         */
-
-        private static AudioPlayer getAudioPlayer() {
-
-            if(DEBUG) { System.out.println("> AudioPlayer.getAudioPlayer()"); }
-            PrivilegedAction<AudioPlayer> action = new PrivilegedAction<AudioPlayer>() {
-                    public AudioPlayer run() {
-                        AudioPlayer t = new AudioPlayer();
-                        t.setPriority(MAX_PRIORITY);
-                        t.setDaemon(true);
-                        t.start();
-                        return t;
-                    }
-                };
-            return  AccessController.doPrivileged(action);
-        }
-
-        /**
-         * Construct an AudioPlayer.
-         */
-        private AudioPlayer() {
-
-            super(getAudioThreadGroup(), "Audio Player");
-            if(DEBUG) { System.out.println("> AudioPlayer private constructor"); }
-            devAudio = AudioDevice.device;
-            devAudio.open();
-            if(DEBUG) { System.out.println("< AudioPlayer private constructor completed"); }
-        }
-
-
-        /**
-         * Start playing a stream. The stream will continue to play
-         * until the stream runs out of data, or it is stopped.
-         * @see AudioPlayer#stop
-         */
-        public synchronized void start(InputStream in) {
-
-            if(DEBUG) {
-                System.out.println("> AudioPlayer.start");
-                System.out.println("  InputStream = " + in);
-            }
-            devAudio.openChannel(in);
-            notify();
-            if(DEBUG) {
-                System.out.println("< AudioPlayer.start completed");
-            }
-        }
-
-        /**
-         * Stop playing a stream. The stream will stop playing,
-         * nothing happens if the stream wasn't playing in the
-         * first place.
-         * @see AudioPlayer#start
-         */
-        public synchronized void stop(InputStream in) {
-
-            if(DEBUG) {
-                System.out.println("> AudioPlayer.stop");
-            }
-
-            devAudio.closeChannel(in);
-            if(DEBUG) {
-                System.out.println("< AudioPlayer.stop completed");
-            }
-        }
-
-        /**
-         * Main mixing loop. This is called automatically when the AudioPlayer
-         * is created.
-         */
-        public void run() {
-
-            // $$jb: 06.24.99: With the JS API, mixing is no longer done by AudioPlayer
-            // or AudioDevice ... it's done by the API itself, so this bit of legacy
-            // code does nothing.
-            // $$jb: 10.21.99: But it appears that some legacy applications
-            // check to see if this thread is alive or not, so we need to spin here.
-
-            devAudio.play();
-            if(DEBUG) {
-                System.out.println("AudioPlayer mixing loop.");
-            }
-            while(true) {
-                try{
-                    Thread.sleep(5000);
-                    //wait();
-                } catch(Exception e) {
-                    break;
-                    // interrupted
-                }
-            }
-            if(DEBUG) {
-                System.out.println("AudioPlayer exited.");
-            }
-
-        }
-    }
--- a/jdk/src/share/classes/sun/audio/AudioSecurityAction.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1999, 2002, 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 sun.audio;
-
-public interface AudioSecurityAction {
-    Object run();
-}
--- a/jdk/src/share/classes/sun/audio/AudioSecurityExceptionAction.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1999, 2002, 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 sun.audio;
-
-public interface AudioSecurityExceptionAction {
-    Object run() throws Exception;
-}
--- a/jdk/src/share/classes/sun/audio/AudioStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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 sun.audio;
-
-import java.io.InputStream;
-import java.io.FilterInputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-
-import javax.sound.sampled.*;
-import javax.sound.midi.*;
-
-/**
- * Convert an InputStream to an AudioStream.
- *
- */
-
-
-public final class AudioStream extends FilterInputStream {
-
-    // AudioContainerInputStream acis;
-    AudioInputStream ais = null;
-    AudioFormat format = null;
-    MidiFileFormat midiformat = null;
-    InputStream stream = null;
-
-
-    /*
-     * create the AudioStream; if we survive without throwing
-     * an exception, we should now have some subclass of
-     * ACIS with all the header info already read
-     */
-
-    public AudioStream(InputStream in) throws IOException {
-
-        super(in);
-
-        stream = in;
-
-        if( in.markSupported() == false ) {
-
-            stream = new BufferedInputStream( in, 1024 );
-        }
-
-        try {
-            ais = AudioSystem.getAudioInputStream( stream );
-            format = ais.getFormat();
-            this.in = ais;
-
-        } catch (UnsupportedAudioFileException e ) {
-
-            // not an audio file, see if it's midi...
-            try {
-                midiformat = MidiSystem.getMidiFileFormat( stream );
-
-            } catch (InvalidMidiDataException e1) {
-                throw new IOException("could not create audio stream from input stream");
-            }
-        }
-    }
-
-
-
-
-    /**
-     * A blocking read.
-     */
-    /*    public int read(byte buf[], int pos, int len) throws IOException {
-
-          return(acis.readFully(buf, pos, len));
-          }
-    */
-
-    /**
-     * Get the data.
-     */
-    public AudioData getData() throws IOException {
-        int length = getLength();
-
-        //limit the memory to 1M, so too large au file won't load
-        if (length < 1024*1024) {
-            byte [] buffer = new byte[length];
-            try {
-                ais.read(buffer, 0, length);
-            } catch (IOException ex) {
-                throw new IOException("Could not create AudioData Object");
-            }
-            return new AudioData(format, buffer);
-        }
-
-        /*              acis.setData();
-
-                        if (acis.stream instanceof ByteArrayInputStream) {
-                        Format[] format = acis.getFormat();
-                        byte[] bytes = acis.getBytes();
-                        if (bytes == null)
-                        throw new IOException("could not create AudioData object: no data received");
-                        return new AudioData((AudioFormat)format[0], bytes);
-                        }
-        */
-
-        throw new IOException("could not create AudioData object");
-    }
-
-
-    public int getLength() {
-
-        if( ais != null && format != null ) {
-            return (int) (ais.getFrameLength() *
-                          ais.getFormat().getFrameSize() );
-
-        } else if ( midiformat != null ) {
-            return midiformat.getByteLength();
-
-        } else {
-            return -1;
-        }
-    }
-}
--- a/jdk/src/share/classes/sun/audio/AudioStreamSequence.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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 sun.audio;
-
-import java.io.InputStream;
-import java.io.SequenceInputStream;
-import java.util.Enumeration;
-
-/**
- * Convert a sequence of input streams into a single InputStream.
- * This class can be used to play two audio clips in sequence.<p>
- * For example:
- * <pre>
- *      Vector v = new Vector();
- *      v.addElement(audiostream1);
- *      v.addElement(audiostream2);
- *      AudioStreamSequence audiostream = new AudioStreamSequence(v.elements());
- *      AudioPlayer.player.start(audiostream);
- * </pre>
- * @see AudioPlayer
- * @author Arthur van Hoff
- */
-public final class AudioStreamSequence extends SequenceInputStream {
-        /**
-         * Create an AudioStreamSequence given an
-         * enumeration of streams.
-         */
-        public AudioStreamSequence(Enumeration<? extends InputStream> e) {
-            super(e);
-        }
-}
--- a/jdk/src/share/classes/sun/audio/AudioTranslatorStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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 sun.audio;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * Translator for native audio formats (not implemented in this release).
- *
- */
-public final class AudioTranslatorStream extends NativeAudioStream {
-
-        private final int length = 0;
-
-        public AudioTranslatorStream(InputStream in) throws IOException {
-            super(in);
-            // No translators supported yet.
-            throw new InvalidAudioFormatException();
-        }
-
-        public int getLength() {
-            return length;
-        }
-    }
--- a/jdk/src/share/classes/sun/audio/ContinuousAudioDataStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, 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 sun.audio;
-
-/**
- * Create a continuous audio stream. This wraps a stream
- * around an AudioData object, the stream is restarted
- * at the beginning everytime the end is reached, thus
- * creating continuous sound.<p>
- * For example:
- * <pre>
- *   AudioData data = AudioData.getAudioData(url);
- *   ContinuousAudioDataStream audiostream = new ContinuousAudioDataStream(data);
- *   AudioPlayer.player.start(audiostream);
- * </pre>
- *
- * @see AudioPlayer
- * @see AudioData
- * @author Arthur van Hoff
- */
-
-public final class ContinuousAudioDataStream extends AudioDataStream {
-
-
-    /**
-         * Create a continuous stream of audio.
-         */
-        public ContinuousAudioDataStream(AudioData data) {
-
-            super(data);
-        }
-
-
-        public int read() {
-
-            int i = super.read();
-
-            if (i == -1) {
-                reset();
-                i = super.read();
-            }
-
-            return i;
-        }
-
-
-        public int read(byte ab[], int i1, int j) {
-
-            int k;
-
-            for (k = 0; k < j; ) {
-                int i2 = super.read(ab, i1 + k, j - k);
-                if (i2 >= 0) k += i2;
-                else reset();
-            }
-
-            return k;
-        }
-    }
--- a/jdk/src/share/classes/sun/audio/InvalidAudioFormatException.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, 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 sun.audio;
-import java.io.IOException;
-
-/**
- * Signals an invalid audio stream for the stream handler.
- */
-@SuppressWarnings("serial") // JDK-implementation class
-final class InvalidAudioFormatException extends IOException {
-
-
-    /**
-     * Constructor.
-     */
-    InvalidAudioFormatException() {
-        super();
-    }
-
-    /**
-     * Constructor with a detail message.
-     */
-    InvalidAudioFormatException(String s) {
-        super(s);
-    }
-}
--- a/jdk/src/share/classes/sun/audio/NativeAudioStream.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1999, 2002, 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 sun.audio;
-
-import java.io.InputStream;
-import java.io.DataInputStream;
-import java.io.FilterInputStream;
-import java.io.IOException;
-
-/**
- * A Sun-specific AudioStream that supports native audio formats.
- *
- */
-
- /*
- * note: this file used to do the real header reading and
- * format verification for .au files (the only kind supported).
- * now we are way more cool than that and don't need this
- * functionality here; i'm just gutting this class and letting
- * it contain an ACIS instead (so now it should work for
- * all the data types we support....).
- */
-
-public
-    class NativeAudioStream extends FilterInputStream {
-
-
-        public NativeAudioStream(InputStream in) throws IOException {
-
-            super(in);
-        }
-
-        public int getLength() {
-            return 0;
-        }
-    }
--- a/jdk/src/share/classes/sun/awt/AWTAccessor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -481,11 +481,16 @@
         void setAppContext(MenuComponent menuComp, AppContext appContext);
 
         /**
-         * Returns the menu container of the menu component
+         * Returns the menu container of the menu component.
          */
         MenuContainer getParent(MenuComponent menuComp);
 
         /**
+         * Sets the menu container of the menu component.
+         */
+        void  setParent(MenuComponent menuComp, MenuContainer menuContainer);
+
+        /**
          * Gets the font used for this menu component.
          */
         Font getFont_NoClientCode(MenuComponent menuComp);
--- a/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1322,7 +1322,7 @@
             return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
                                       fractionalMetricsHint);
         case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
-            return new Integer(lcdTextContrast);
+            return lcdTextContrast;
         case SunHints.INTKEY_INTERPOLATION:
             switch (interpolationHint) {
             case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
--- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Fri Aug 08 11:36:48 2014 -0700
@@ -384,7 +384,8 @@
     }
     public static LCMSImageLayout createImageLayout(Raster r) {
         LCMSImageLayout l = new LCMSImageLayout();
-        if (r instanceof ByteComponentRaster) {
+        if (r instanceof ByteComponentRaster &&
+                r.getSampleModel() instanceof ComponentSampleModel) {
             ByteComponentRaster br = (ByteComponentRaster)r;
 
             ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel();
--- a/jdk/src/share/classes/sun/misc/JavaLangAccess.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/misc/JavaLangAccess.java	Fri Aug 08 11:36:48 2014 -0700
@@ -132,4 +132,14 @@
      * Invokes the finalize method of the given object.
      */
     void invokeFinalize(Object o) throws Throwable;
+
+    /**
+     * Invokes Long.formatUnsignedLong(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
+
+    /**
+     * Invokes Integer.formatUnsignedInt(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len);
 }
--- a/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Fri Aug 08 11:36:48 2014 -0700
@@ -301,7 +301,7 @@
             throw new IOException(fe);
         }
         try {
-            ftp.login(user, password.toCharArray());
+            ftp.login(user, password == null ? null : password.toCharArray());
         } catch (sun.net.ftp.FtpProtocolException e) {
             ftp.close();
             // Backward compatibility
--- a/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1173,8 +1173,7 @@
         if (!sun.misc.VM.isBooted())
             return;
 
-        String map = AccessController.doPrivileged(
-            (PrivilegedAction<String>) () -> System.getProperty("sun.nio.cs.map"));
+        String map = getProperty("sun.nio.cs.map");
         boolean sjisIsMS932 = false;
         boolean iso2022jpIsMS50221 = false;
         boolean iso2022jpIsMS50220 = false;
@@ -1294,8 +1293,7 @@
 
             }
         }
-        String osName = AccessController.doPrivileged(
-            (PrivilegedAction<String>) () -> System.getProperty("os.name"));
+        String osName = getProperty("os.name");
         if ("SunOS".equals(osName) || "Linux".equals(osName) || "AIX".equals(osName)
                || osName.contains("OS X")) {
             charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
@@ -1308,6 +1306,18 @@
         initialized = true;
     }
 
+    private static String getProperty(String key) {
+        // this method may be called during initialization of
+        // system class loader and thus not using lambda
+        return AccessController.doPrivileged(
+            new PrivilegedAction<String>() {
+                @Override
+                public String run() {
+                    return System.getProperty(key);
+                }
+            });
+    }
+
     public static String[] aliasesFor(String charsetName) {
         if (instance == null)
             return null;
--- a/jdk/src/share/classes/sun/print/CustomMediaSizeName.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/print/CustomMediaSizeName.java	Fri Aug 08 11:36:48 2014 -0700
@@ -67,6 +67,22 @@
                                             MediaSize.INCH);
         } catch (IllegalArgumentException iae) {
         }
+        // The public API method finds a closest match even if it not
+        // all that close. Here we want to be sure its *really* close.
+        if (mediaName != null) {
+            MediaSize sz = MediaSize.getMediaSizeForName(mediaName);
+            if (sz == null) {
+                mediaName = null;
+            } else {
+                float w = sz.getX(MediaSize.INCH);
+                float h = sz.getY(MediaSize.INCH);
+                float dw = Math.abs(w - width);
+                float dh = Math.abs(h - length);
+                if (dw > 0.1 || dh > 0.1) {
+                    mediaName = null;
+                }
+            }
+        }
     }
 
     /**
--- a/jdk/src/share/classes/sun/print/PSPrinterJob.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java	Fri Aug 08 11:36:48 2014 -0700
@@ -168,13 +168,6 @@
     private static final String IMAGE_STR =     " string /imStr exch def";
     private static final String IMAGE_RESTORE = "imSave restore";
 
-    private static final String COORD_PREP =    " 0 exch translate "
-                                              + "1 -1 scale"
-                                              + "[72 " + PS_XRES + " div "
-                                              + "0 0 "
-                                              + "72 " + PS_YRES + " div "
-                                              + "0 0]concat";
-
     private static final String SetFontName = "F";
 
     private static final String DrawStringName = "S";
@@ -275,6 +268,9 @@
 
    private AffineTransform mLastTransform;
 
+   private double xres = PS_XRES;
+   private double yres = PS_XRES;
+
    /* non-null if printing EPS for Java Plugin */
    private EPSPrinter epsPrinter = null;
 
@@ -796,6 +792,15 @@
         }
     }
 
+    private String getCoordPrep() {
+        return " 0 exch translate "
+             + "1 -1 scale"
+             + "[72 " + getXRes() + " div "
+             + "0 0 "
+             + "72 " + getYRes() + " div "
+             + "0 0]concat";
+    }
+
     /**
      * The RasterPrintJob super class calls this method
      * at the start of each page.
@@ -852,7 +857,7 @@
             mPSStream.println(" >> setpagedevice");
         }
         mPSStream.println(PAGE_SAVE);
-        mPSStream.println(paperHeight + COORD_PREP);
+        mPSStream.println(paperHeight + getCoordPrep());
     }
 
     /**
@@ -1493,14 +1498,22 @@
      * to be rendered.
      */
     protected double getXRes() {
-        return PS_XRES;
+        return xres;
     }
     /**
      * Return the y resolution of the coordinates
      * to be rendered.
      */
     protected double getYRes() {
-        return PS_YRES;
+        return yres;
+    }
+
+    /**
+     * Set the resolution at which to print.
+     */
+    protected void setXYRes(double x, double y) {
+        xres = x;
+        yres = y;
     }
 
     /**
--- a/jdk/src/share/classes/sun/print/RasterPrinterJob.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/print/RasterPrinterJob.java	Fri Aug 08 11:36:48 2014 -0700
@@ -72,6 +72,7 @@
 import javax.print.attribute.AttributeSet;
 import javax.print.attribute.HashPrintRequestAttributeSet;
 import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.ResolutionSyntax;
 import javax.print.attribute.Size2DSyntax;
 import javax.print.attribute.standard.Chromaticity;
 import javax.print.attribute.standard.Copies;
@@ -86,6 +87,7 @@
 import javax.print.attribute.standard.MediaSizeName;
 import javax.print.attribute.standard.OrientationRequested;
 import javax.print.attribute.standard.PageRanges;
+import javax.print.attribute.standard.PrinterResolution;
 import javax.print.attribute.standard.PrinterState;
 import javax.print.attribute.standard.PrinterStateReason;
 import javax.print.attribute.standard.PrinterStateReasons;
@@ -283,6 +285,7 @@
     private String jobNameAttr;
     private String userNameAttr;
     private PageRanges pageRangesAttr;
+    protected PrinterResolution printerResAttr;
     protected Sides sidesAttr;
     protected String destinationAttr;
     protected boolean noJobSheet = false;
@@ -1064,6 +1067,14 @@
                                           attrset));
     }
 
+    /**
+     * Set the device resolution.
+     * Overridden and used only by the postscript code.
+     * Windows code pulls the information from the attribute set itself.
+     */
+    protected void setXYRes(double x, double y) {
+    }
+
     /* subclasses may need to pull extra information out of the attribute set
      * They can override this method & call super.setAttributes()
      */
@@ -1072,6 +1083,7 @@
         /*  reset all values to defaults */
         setCollated(false);
         sidesAttr = null;
+        printerResAttr = null;
         pageRangesAttr = null;
         copiesAttr = 0;
         jobNameAttr = null;
@@ -1117,6 +1129,18 @@
             sidesAttr = Sides.ONE_SIDED;
         }
 
+        printerResAttr = (PrinterResolution)attributes.get(PrinterResolution.class);
+        if (service.isAttributeCategorySupported(PrinterResolution.class)) {
+            if (!isSupportedValue(printerResAttr,  attributes)) {
+               printerResAttr = (PrinterResolution)
+                   service.getDefaultAttributeValue(PrinterResolution.class);
+            }
+            double xr =
+               printerResAttr.getCrossFeedResolution(ResolutionSyntax.DPI);
+            double yr = printerResAttr.getFeedResolution(ResolutionSyntax.DPI);
+            setXYRes(xr, yr);
+        }
+
         pageRangesAttr =  (PageRanges)attributes.get(PageRanges.class);
         if (!isSupportedValue(pageRangesAttr, attributes)) {
             pageRangesAttr = null;
--- a/jdk/src/share/classes/sun/print/ServiceDialog.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/print/ServiceDialog.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1017,8 +1017,8 @@
             format.setParseIntegerOnly(true);
             format.setDecimalSeparatorAlwaysShown(false);
             NumberFormatter nf = new NumberFormatter(format);
-            nf.setMinimum(new Integer(1));
-            nf.setMaximum(new Integer(Integer.MAX_VALUE));
+            nf.setMinimum(1);
+            nf.setMaximum(Integer.MAX_VALUE);
             nf.setAllowsInvalid(true);
             nf.setCommitsOnValidEdit(true);
             tfRangeFrom = new JFormattedTextField(nf);
@@ -1110,12 +1110,12 @@
 
             if (min < 1) {
                 min = 1;
-                tfRangeFrom.setValue(new Integer(1));
+                tfRangeFrom.setValue(1);
             }
 
             if (max < min) {
                 max = min;
-                tfRangeTo.setValue(new Integer(min));
+                tfRangeTo.setValue(min);
             }
 
             PageRanges pr = new PageRanges(min, max);
@@ -1165,8 +1165,8 @@
             } else { // RANGE
                 rbPages.setSelected(true);
             }
-            tfRangeFrom.setValue(new Integer(min));
-            tfRangeTo.setValue(new Integer(max));
+            tfRangeFrom.setValue(min);
+            tfRangeTo.setValue(max);
             rbAll.setEnabled(prSupported);
             rbPages.setEnabled(prSupported);
             setupRangeWidgets();
@@ -1274,14 +1274,14 @@
                 min = 1;
                 max = Integer.MAX_VALUE;
             }
-            snModel.setMinimum(new Integer(min));
-            snModel.setMaximum(new Integer(max));
+            snModel.setMinimum(min);
+            snModel.setMaximum(max);
 
             int value = cp.getValue();
             if ((value < min) || (value > max)) {
                 value = min;
             }
-            snModel.setValue(new Integer(value));
+            snModel.setValue(value);
 
             // setup Collate checkbox
             if (psCurrent.isAttributeCategorySupported(scCategory)) {
@@ -2762,7 +2762,7 @@
             if ((value < 1) || (value > 100)) {
                 value = 1;
             }
-            snModel.setValue(new Integer(value));
+            snModel.setValue(value);
             lblPriority.setEnabled(jpSupported);
             spinPriority.setEnabled(jpSupported);
 
--- a/jdk/src/share/classes/sun/security/ec/CurveDB.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,669 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, 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 sun.security.ec;
-
-import java.math.BigInteger;
-
-import java.security.spec.*;
-
-import java.util.*;
-import java.util.regex.Pattern;
-
-/**
- * Repository for well-known Elliptic Curve parameters. It is used by both
- * the SunPKCS11 and SunJSSE code.
- *
- * @since   1.6
- * @author  Andreas Sterbenz
- */
-public class CurveDB {
-    private final static int P  = 1; // prime curve
-    private final static int B  = 2; // binary curve
-    private final static int PD = 5; // prime curve, mark as default
-    private final static int BD = 6; // binary curve, mark as default
-
-    private static final Map<String,NamedCurve> oidMap =
-        new LinkedHashMap<String,NamedCurve>();
-    private static final Map<String,NamedCurve> nameMap =
-        new HashMap<String,NamedCurve>();
-    private static final Map<Integer,NamedCurve> lengthMap =
-        new HashMap<Integer,NamedCurve>();
-
-    private static Collection<? extends NamedCurve> specCollection;
-
-    static final String SPLIT_PATTERN = ",|\\[|\\]";
-
-    // Used by SunECEntries
-    static Collection<? extends NamedCurve>getSupportedCurves() {
-        return specCollection;
-    }
-
-    // Return a NamedCurve for the specified OID/name or null if unknown.
-    static NamedCurve lookup(String name) {
-        NamedCurve spec = oidMap.get(name);
-        if (spec != null) {
-            return spec;
-        }
-
-        return nameMap.get(name);
-    }
-
-    // Return EC parameters for the specified field size. If there are known
-    // NIST recommended parameters for the given length, they are returned.
-    // Otherwise, if there are multiple matches for the given size, an
-    // arbitrary one is returns.
-    // If no parameters are known, the method returns null.
-    // NOTE that this method returns both prime and binary curves.
-    static NamedCurve lookup(int length) {
-        return lengthMap.get(length);
-    }
-
-    // Convert the given ECParameterSpec object to a NamedCurve object.
-    // If params does not represent a known named curve, return null.
-    static NamedCurve lookup(ECParameterSpec params) {
-        if ((params instanceof NamedCurve) || (params == null)) {
-            return (NamedCurve)params;
-        }
-
-        // This is a hack to allow SunJSSE to work with 3rd party crypto
-        // providers for ECC and not just SunPKCS11.
-        // This can go away once we decide how to expose curve names in the
-        // public API.
-        // Note that it assumes that the 3rd party provider encodes named
-        // curves using the short form, not explicitly. If it did that, then
-        // the SunJSSE TLS ECC extensions are wrong, which could lead to
-        // interoperability problems.
-        int fieldSize = params.getCurve().getField().getFieldSize();
-        for (NamedCurve namedCurve : specCollection) {
-            // ECParameterSpec does not define equals, so check all the
-            // components ourselves.
-            // Quick field size check first
-            if (namedCurve.getCurve().getField().getFieldSize() != fieldSize) {
-                continue;
-            }
-            if (namedCurve.getCurve().equals(params.getCurve()) == false) {
-                continue;
-            }
-            if (namedCurve.getGenerator().equals(params.getGenerator()) ==
-                    false) {
-                continue;
-            }
-            if (namedCurve.getOrder().equals(params.getOrder()) == false) {
-                continue;
-            }
-            if (namedCurve.getCofactor() != params.getCofactor()) {
-                continue;
-            }
-            // everything matches our named curve, return it
-            return namedCurve;
-        }
-        // no match found
-        return null;
-    }
-
-    private static BigInteger bi(String s) {
-        return new BigInteger(s, 16);
-    }
-
-    private static void add(String name, String soid, int type, String sfield,
-            String a, String b, String x, String y, String n, int h,
-            Pattern nameSplitPattern) {
-        BigInteger p = bi(sfield);
-        ECField field;
-        if ((type == P) || (type == PD)) {
-            field = new ECFieldFp(p);
-        } else if ((type == B) || (type == BD)) {
-            field = new ECFieldF2m(p.bitLength() - 1, p);
-        } else {
-            throw new RuntimeException("Invalid type: " + type);
-        }
-
-        EllipticCurve curve = new EllipticCurve(field, bi(a), bi(b));
-        ECPoint g = new ECPoint(bi(x), bi(y));
-
-        NamedCurve params = new NamedCurve(name, soid, curve, g, bi(n), h);
-        if (oidMap.put(soid, params) != null) {
-            throw new RuntimeException("Duplication oid: " + soid);
-        }
-
-        String[] commonNames = nameSplitPattern.split(name);
-        for (String commonName : commonNames) {
-            if (nameMap.put(commonName.trim(), params) != null) {
-                throw new RuntimeException("Duplication name: " + commonName);
-            }
-        }
-
-        int len = field.getFieldSize();
-        if ((type == PD) || (type == BD) || (lengthMap.get(len) == null)) {
-            // add entry if none present for this field size or if
-            // the curve is marked as a default curve.
-            lengthMap.put(len, params);
-        }
-    }
-
-    static {
-        Pattern nameSplitPattern = Pattern.compile(SPLIT_PATTERN);
-
-        /* SEC2 prime curves */
-        add("secp112r1", "1.3.132.0.6", P,
-            "DB7C2ABF62E35E668076BEAD208B",
-            "DB7C2ABF62E35E668076BEAD2088",
-            "659EF8BA043916EEDE8911702B22",
-            "09487239995A5EE76B55F9C2F098",
-            "A89CE5AF8724C0A23E0E0FF77500",
-            "DB7C2ABF62E35E7628DFAC6561C5",
-            1, nameSplitPattern);
-
-        add("secp112r2", "1.3.132.0.7", P,
-            "DB7C2ABF62E35E668076BEAD208B",
-            "6127C24C05F38A0AAAF65C0EF02C",
-            "51DEF1815DB5ED74FCC34C85D709",
-            "4BA30AB5E892B4E1649DD0928643",
-            "adcd46f5882e3747def36e956e97",
-            "36DF0AAFD8B8D7597CA10520D04B",
-            4, nameSplitPattern);
-
-        add("secp128r1", "1.3.132.0.28", P,
-            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
-            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC",
-            "E87579C11079F43DD824993C2CEE5ED3",
-            "161FF7528B899B2D0C28607CA52C5B86",
-            "CF5AC8395BAFEB13C02DA292DDED7A83",
-            "FFFFFFFE0000000075A30D1B9038A115",
-            1, nameSplitPattern);
-
-        add("secp128r2", "1.3.132.0.29", P,
-            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
-            "D6031998D1B3BBFEBF59CC9BBFF9AEE1",
-            "5EEEFCA380D02919DC2C6558BB6D8A5D",
-            "7B6AA5D85E572983E6FB32A7CDEBC140",
-            "27B6916A894D3AEE7106FE805FC34B44",
-            "3FFFFFFF7FFFFFFFBE0024720613B5A3",
-            4, nameSplitPattern);
-
-        add("secp160k1", "1.3.132.0.9", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
-            "0000000000000000000000000000000000000000",
-            "0000000000000000000000000000000000000007",
-            "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
-            "938CF935318FDCED6BC28286531733C3F03C4FEE",
-            "0100000000000000000001B8FA16DFAB9ACA16B6B3",
-            1, nameSplitPattern);
-
-        add("secp160r1", "1.3.132.0.8", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
-            "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
-            "4A96B5688EF573284664698968C38BB913CBFC82",
-            "23A628553168947D59DCC912042351377AC5FB32",
-            "0100000000000000000001F4C8F927AED3CA752257",
-            1, nameSplitPattern);
-
-        add("secp160r2", "1.3.132.0.30", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
-            "B4E134D3FB59EB8BAB57274904664D5AF50388BA",
-            "52DCB034293A117E1F4FF11B30F7199D3144CE6D",
-            "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
-            "0100000000000000000000351EE786A818F3A1A16B",
-            1, nameSplitPattern);
-
-        add("secp192k1", "1.3.132.0.31", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
-            "000000000000000000000000000000000000000000000000",
-            "000000000000000000000000000000000000000000000003",
-            "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
-            "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
-            "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D",
-            1, nameSplitPattern);
-
-        add("secp192r1 [NIST P-192, X9.62 prime192v1]", "1.2.840.10045.3.1.1", PD,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-            "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
-            "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
-            "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
-            "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831",
-            1, nameSplitPattern);
-
-        add("secp224k1", "1.3.132.0.32", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
-            "00000000000000000000000000000000000000000000000000000000",
-            "00000000000000000000000000000000000000000000000000000005",
-            "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
-            "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
-            "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7",
-            1, nameSplitPattern);
-
-        add("secp224r1 [NIST P-224]", "1.3.132.0.33", PD,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
-            "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
-            "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
-            "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D",
-            1, nameSplitPattern);
-
-        add("secp256k1", "1.3.132.0.10", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
-            "0000000000000000000000000000000000000000000000000000000000000000",
-            "0000000000000000000000000000000000000000000000000000000000000007",
-            "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
-            "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",
-            1, nameSplitPattern);
-
-        add("secp256r1 [NIST P-256, X9.62 prime256v1]", "1.2.840.10045.3.1.7", PD,
-            "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
-            "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
-            "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
-            "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
-            "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
-            "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
-            1, nameSplitPattern);
-
-        add("secp384r1 [NIST P-384]", "1.3.132.0.34", PD,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
-            "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
-            "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
-            "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
-            1, nameSplitPattern);
-
-        add("secp521r1 [NIST P-521]", "1.3.132.0.35", PD,
-            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
-            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
-            "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
-            "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
-            "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
-            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
-            1, nameSplitPattern);
-
-        /* ANSI X9.62 prime curves */
-        add("X9.62 prime192v2", "1.2.840.10045.3.1.2", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-            "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
-            "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
-            "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
-            "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31",
-            1, nameSplitPattern);
-
-        add("X9.62 prime192v3", "1.2.840.10045.3.1.3", P,
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-            "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
-            "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
-            "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
-            "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13",
-            1, nameSplitPattern);
-
-        add("X9.62 prime239v1", "1.2.840.10045.3.1.4", P,
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-            "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
-            "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
-            "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B",
-            1, nameSplitPattern);
-
-        add("X9.62 prime239v2", "1.2.840.10045.3.1.5", P,
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-            "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
-            "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
-            "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
-            "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063",
-            1, nameSplitPattern);
-
-        add("X9.62 prime239v3", "1.2.840.10045.3.1.6", P,
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-            "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
-            "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
-            "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
-            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551",
-            1, nameSplitPattern);
-
-        /* SEC2 binary curves */
-        add("sect113r1", "1.3.132.0.4", B,
-            "020000000000000000000000000201",
-            "003088250CA6E7C7FE649CE85820F7",
-            "00E8BEE4D3E2260744188BE0E9C723",
-            "009D73616F35F4AB1407D73562C10F",
-            "00A52830277958EE84D1315ED31886",
-            "0100000000000000D9CCEC8A39E56F",
-            2, nameSplitPattern);
-
-        add("sect113r2", "1.3.132.0.5", B,
-            "020000000000000000000000000201",
-            "00689918DBEC7E5A0DD6DFC0AA55C7",
-            "0095E9A9EC9B297BD4BF36E059184F",
-            "01A57A6A7B26CA5EF52FCDB8164797",
-            "00B3ADC94ED1FE674C06E695BABA1D",
-            "010000000000000108789B2496AF93",
-            2, nameSplitPattern);
-
-        add("sect131r1", "1.3.132.0.22", B,
-            "080000000000000000000000000000010D",
-            "07A11B09A76B562144418FF3FF8C2570B8",
-            "0217C05610884B63B9C6C7291678F9D341",
-            "0081BAF91FDF9833C40F9C181343638399",
-            "078C6E7EA38C001F73C8134B1B4EF9E150",
-            "0400000000000000023123953A9464B54D",
-            2, nameSplitPattern);
-
-        add("sect131r2", "1.3.132.0.23", B,
-            "080000000000000000000000000000010D",
-            "03E5A88919D7CAFCBF415F07C2176573B2",
-            "04B8266A46C55657AC734CE38F018F2192",
-            "0356DCD8F2F95031AD652D23951BB366A8",
-            "0648F06D867940A5366D9E265DE9EB240F",
-            "0400000000000000016954A233049BA98F",
-            2, nameSplitPattern);
-
-        add("sect163k1 [NIST K-163]", "1.3.132.0.1", BD,
-            "0800000000000000000000000000000000000000C9",
-            "000000000000000000000000000000000000000001",
-            "000000000000000000000000000000000000000001",
-            "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8",
-            "0289070FB05D38FF58321F2E800536D538CCDAA3D9",
-            "04000000000000000000020108A2E0CC0D99F8A5EF",
-            2, nameSplitPattern);
-
-        add("sect163r1", "1.3.132.0.2", B,
-            "0800000000000000000000000000000000000000C9",
-            "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2",
-            "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9",
-            "0369979697AB43897789566789567F787A7876A654",
-            "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883",
-            "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B",
-            2, nameSplitPattern);
-
-        add("sect163r2 [NIST B-163]", "1.3.132.0.15", BD,
-            "0800000000000000000000000000000000000000C9",
-            "000000000000000000000000000000000000000001",
-            "020A601907B8C953CA1481EB10512F78744A3205FD",
-            "03F0EBA16286A2D57EA0991168D4994637E8343E36",
-            "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1",
-            "040000000000000000000292FE77E70C12A4234C33",
-            2, nameSplitPattern);
-
-        add("sect193r1", "1.3.132.0.24", B,
-            "02000000000000000000000000000000000000000000008001",
-            "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01",
-            "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814",
-            "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1",
-            "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05",
-            "01000000000000000000000000C7F34A778F443ACC920EBA49",
-            2, nameSplitPattern);
-
-        add("sect193r2", "1.3.132.0.25", B,
-            "02000000000000000000000000000000000000000000008001",
-            "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B",
-            "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE",
-            "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F",
-            "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C",
-            "010000000000000000000000015AAB561B005413CCD4EE99D5",
-            2, nameSplitPattern);
-
-        add("sect233k1 [NIST K-233]", "1.3.132.0.26", BD,
-            "020000000000000000000000000000000000000004000000000000000001",
-            "000000000000000000000000000000000000000000000000000000000000",
-            "000000000000000000000000000000000000000000000000000000000001",
-            "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
-            "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
-            "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF",
-            4, nameSplitPattern);
-
-        add("sect233r1 [NIST B-233]", "1.3.132.0.27", B,
-            "020000000000000000000000000000000000000004000000000000000001",
-            "000000000000000000000000000000000000000000000000000000000001",
-            "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD",
-            "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B",
-            "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052",
-            "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7",
-            2, nameSplitPattern);
-
-        add("sect239k1", "1.3.132.0.3", B,
-            "800000000000000000004000000000000000000000000000000000000001",
-            "000000000000000000000000000000000000000000000000000000000000",
-            "000000000000000000000000000000000000000000000000000000000001",
-            "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC",
-            "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA",
-            "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5",
-            4, nameSplitPattern);
-
-        add("sect283k1 [NIST K-283]", "1.3.132.0.16", BD,
-            "0800000000000000000000000000000000000000000000000000000000000000000010A1",
-            "000000000000000000000000000000000000000000000000000000000000000000000000",
-            "000000000000000000000000000000000000000000000000000000000000000000000001",
-            "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836",
-            "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259",
-            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61",
-            4, nameSplitPattern);
-
-        add("sect283r1 [NIST B-283]", "1.3.132.0.17", B,
-            "0800000000000000000000000000000000000000000000000000000000000000000010A1",
-            "000000000000000000000000000000000000000000000000000000000000000000000001",
-            "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5",
-            "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053",
-            "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4",
-            "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307",
-            2, nameSplitPattern);
-
-        add("sect409k1 [NIST K-409]", "1.3.132.0.36", BD,
-            "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
-            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
-            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-            "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
-            "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
-            "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF",
-            4, nameSplitPattern);
-
-        add("sect409r1 [NIST B-409]", "1.3.132.0.37", B,
-            "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
-            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-            "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F",
-            "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7",
-            "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706",
-            "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173",
-            2, nameSplitPattern);
-
-        add("sect571k1 [NIST K-571]", "1.3.132.0.38", BD,
-            "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
-            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
-            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-            "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972",
-            "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3",
-            "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001",
-            4, nameSplitPattern);
-
-        add("sect571r1 [NIST B-571]", "1.3.132.0.39", B,
-            "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
-            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-            "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A",
-            "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19",
-            "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B",
-            "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47",
-            2, nameSplitPattern);
-
-        /* ANSI X9.62 binary curves */
-        add("X9.62 c2tnb191v1", "1.2.840.10045.3.0.5", B,
-            "800000000000000000000000000000000000000000000201",
-            "2866537B676752636A68F56554E12640276B649EF7526267",
-            "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC",
-            "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D",
-            "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB",
-            "40000000000000000000000004A20E90C39067C893BBB9A5",
-            2, nameSplitPattern);
-
-        add("X9.62 c2tnb191v2", "1.2.840.10045.3.0.6", B,
-            "800000000000000000000000000000000000000000000201",
-            "401028774D7777C7B7666D1366EA432071274F89FF01E718",
-            "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01",
-            "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10",
-            "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A",
-            "20000000000000000000000050508CB89F652824E06B8173",
-            4, nameSplitPattern);
-
-        add("X9.62 c2tnb191v3", "1.2.840.10045.3.0.7", B,
-            "800000000000000000000000000000000000000000000201",
-            "6C01074756099122221056911C77D77E77A777E7E7E77FCB",
-            "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8",
-            "375D4CE24FDE434489DE8746E71786015009E66E38A926DD",
-            "545A39176196575D985999366E6AD34CE0A77CD7127B06BE",
-            "155555555555555555555555610C0B196812BFB6288A3EA3",
-            6, nameSplitPattern);
-
-        add("X9.62 c2tnb239v1", "1.2.840.10045.3.0.11", B,
-            "800000000000000000000000000000000000000000000000001000000001",
-            "32010857077C5431123A46B808906756F543423E8D27877578125778AC76",
-            "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16",
-            "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D",
-            "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305",
-            "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447",
-            4, nameSplitPattern);
-
-        add("X9.62 c2tnb239v2", "1.2.840.10045.3.0.12", B,
-            "800000000000000000000000000000000000000000000000001000000001",
-            "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F",
-            "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B",
-            "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205",
-            "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833",
-            "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D",
-            6, nameSplitPattern);
-
-        add("X9.62 c2tnb239v3", "1.2.840.10045.3.0.13", B,
-            "800000000000000000000000000000000000000000000000001000000001",
-            "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F",
-            "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40",
-            "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92",
-            "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461",
-            "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF",
-            0xA, nameSplitPattern);
-
-        add("X9.62 c2tnb359v1", "1.2.840.10045.3.0.18", B,
-            "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001",
-            "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557",
-            "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988",
-            "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097",
-            "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD",
-            "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B",
-            0x4C, nameSplitPattern);
-
-        add("X9.62 c2tnb431r1", "1.2.840.10045.3.0.20", B,
-            "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001",
-            "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F",
-            "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618",
-            "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7",
-            "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760",
-            "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91",
-            0x2760, nameSplitPattern);
-
-        /* ANSI X9.62 binary curves from the 1998 standard but forbidden
-         * in the 2005 version of the standard.
-         * We don't register them but leave them here for the time being in
-         * case we need to support them after all.
-         */
-/*
-        add("X9.62 c2pnb163v1", "1.2.840.10045.3.0.1", B,
-            "080000000000000000000000000000000000000107",
-            "072546B5435234A422E0789675F432C89435DE5242",
-            "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9",
-            "07AF69989546103D79329FCC3D74880F33BBE803CB",
-            "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F",
-            "0400000000000000000001E60FC8821CC74DAEAFC1",
-            2, nameSplitPattern);
-
-        add("X9.62 c2pnb163v2", "1.2.840.10045.3.0.2", B,
-            "080000000000000000000000000000000000000107",
-            "0108B39E77C4B108BED981ED0E890E117C511CF072",
-            "0667ACEB38AF4E488C407433FFAE4F1C811638DF20",
-            "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5",
-            "079F684DDF6684C5CD258B3890021B2386DFD19FC5",
-            "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7",
-            2, nameSplitPattern);
-
-        add("X9.62 c2pnb163v3", "1.2.840.10045.3.0.3", B,
-            "080000000000000000000000000000000000000107",
-            "07A526C63D3E25A256A007699F5447E32AE456B50E",
-            "03F7061798EB99E238FD6F1BF95B48FEEB4854252B",
-            "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB",
-            "05B935590C155E17EA48EB3FF3718B893DF59A05D0",
-            "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309",
-            2, nameSplitPattern);
-
-        add("X9.62 c2pnb176w1", "1.2.840.10045.3.0.4", B,
-            "0100000000000000000000000000000000080000000007",
-            "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B",
-            "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2",
-            "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798",
-            "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C",
-            "00010092537397ECA4F6145799D62B0A19CE06FE26AD",
-            0xFF6E, nameSplitPattern);
-
-        add("X9.62 c2pnb208w1", "1.2.840.10045.3.0.10", B,
-            "010000000000000000000000000000000800000000000000000007",
-            "0000000000000000000000000000000000000000000000000000",
-            "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E",
-            "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A",
-            "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3",
-            "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D",
-            0xFE48, nameSplitPattern);
-
-        add("X9.62 c2pnb272w1", "1.2.840.10045.3.0.16", B,
-            "010000000000000000000000000000000000000000000000000000010000000000000B",
-            "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20",
-            "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7",
-            "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D",
-            "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23",
-            "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521",
-            0xFF06, nameSplitPattern);
-
-        add("X9.62 c2pnb304w1", "1.2.840.10045.3.0.17", B,
-            "010000000000000000000000000000000000000000000000000000000000000000000000000807",
-            "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681",
-            "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE",
-            "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614",
-            "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B",
-            "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D",
-            0xFE2E, nameSplitPattern);
-
-        add("X9.62 c2pnb368w1", "1.2.840.10045.3.0.19", B,
-            "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007",
-            "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D",
-            "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A",
-            "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F",
-            "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310",
-            "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967",
-            0xFF70, nameSplitPattern);
-*/
-
-        specCollection = Collections.unmodifiableCollection(oidMap.values());
-    }
-}
--- a/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,11 +32,10 @@
 import java.security.spec.ECParameterSpec;
 import java.security.spec.ECPoint;
 
-import sun.security.ec.NamedCurve;
-import sun.security.ec.ECParameters;
 import sun.security.ec.ECPrivateKeyImpl;
 import sun.security.ec.ECPublicKeyImpl;
 import sun.security.jca.JCAUtil;
+import sun.security.util.ECParameters;
 import sun.security.util.ECUtil;
 
 /**
--- a/jdk/src/share/classes/sun/security/ec/ECParameters.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, 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 sun.security.ec;
-
-import java.io.IOException;
-
-import java.security.*;
-import java.security.spec.*;
-
-import sun.security.util.*;
-
-/**
- * This class implements encoding and decoding of Elliptic Curve parameters
- * as specified in RFC 3279.
- *
- * However, only named curves are currently supported.
- *
- * ASN.1 from RFC 3279 follows. Note that X9.62 (2005) has added some additional
- * options.
- *
- * <pre>
- *    EcpkParameters ::= CHOICE {
- *      ecParameters  ECParameters,
- *      namedCurve    OBJECT IDENTIFIER,
- *      implicitlyCA  NULL }
- *
- *    ECParameters ::= SEQUENCE {
- *       version   ECPVer,          -- version is always 1
- *       fieldID   FieldID,         -- identifies the finite field over
- *                                  -- which the curve is defined
- *       curve     Curve,           -- coefficients a and b of the
- *                                  -- elliptic curve
- *       base      ECPoint,         -- specifies the base point P
- *                                  -- on the elliptic curve
- *       order     INTEGER,         -- the order n of the base point
- *       cofactor  INTEGER OPTIONAL -- The integer h = #E(Fq)/n
- *       }
- *
- *    ECPVer ::= INTEGER {ecpVer1(1)}
- *
- *    Curve ::= SEQUENCE {
- *       a         FieldElement,
- *       b         FieldElement,
- *       seed      BIT STRING OPTIONAL }
- *
- *    FieldElement ::= OCTET STRING
- *
- *    ECPoint ::= OCTET STRING
- * </pre>
- *
- * @since   1.6
- * @author  Andreas Sterbenz
- */
-public final class ECParameters extends AlgorithmParametersSpi {
-
-    // used by ECPublicKeyImpl and ECPrivateKeyImpl
-    static AlgorithmParameters getAlgorithmParameters(ECParameterSpec spec)
-            throws InvalidKeyException {
-        try {
-            AlgorithmParameters params =
-                AlgorithmParameters.getInstance("EC", "SunEC");
-            params.init(spec);
-            return params;
-        } catch (GeneralSecurityException e) {
-            throw new InvalidKeyException("EC parameters error", e);
-        }
-    }
-
-    /*
-     * The parameters these AlgorithmParameters object represents.
-     * Currently, it is always an instance of NamedCurve.
-     */
-    private NamedCurve namedCurve;
-
-    // A public constructor is required by AlgorithmParameters class.
-    public ECParameters() {
-        // empty
-    }
-
-    // AlgorithmParameterSpi methods
-
-    protected void engineInit(AlgorithmParameterSpec paramSpec)
-            throws InvalidParameterSpecException {
-
-        if (paramSpec == null) {
-            throw new InvalidParameterSpecException
-                ("paramSpec must not be null");
-        }
-
-        if (paramSpec instanceof NamedCurve) {
-            namedCurve = (NamedCurve)paramSpec;
-            return;
-        }
-
-        if (paramSpec instanceof ECParameterSpec) {
-            namedCurve = CurveDB.lookup((ECParameterSpec)paramSpec);
-        } else if (paramSpec instanceof ECGenParameterSpec) {
-            String name = ((ECGenParameterSpec)paramSpec).getName();
-            namedCurve = CurveDB.lookup(name);
-        } else if (paramSpec instanceof ECKeySizeParameterSpec) {
-            int keySize = ((ECKeySizeParameterSpec)paramSpec).getKeySize();
-            namedCurve = CurveDB.lookup(keySize);
-        } else {
-            throw new InvalidParameterSpecException
-                ("Only ECParameterSpec and ECGenParameterSpec supported");
-        }
-
-        if (namedCurve == null) {
-            throw new InvalidParameterSpecException(
-                "Not a supported curve: " + paramSpec);
-        }
-    }
-
-    protected void engineInit(byte[] params) throws IOException {
-        DerValue encodedParams = new DerValue(params);
-        if (encodedParams.tag == DerValue.tag_ObjectId) {
-            ObjectIdentifier oid = encodedParams.getOID();
-            NamedCurve spec = CurveDB.lookup(oid.toString());
-            if (spec == null) {
-                throw new IOException("Unknown named curve: " + oid);
-            }
-
-            namedCurve = spec;
-            return;
-        }
-
-        throw new IOException("Only named ECParameters supported");
-
-        // The code below is incomplete.
-        // It is left as a starting point for a complete parsing implementation.
-
-/*
-        if (encodedParams.tag != DerValue.tag_Sequence) {
-            throw new IOException("Unsupported EC parameters, tag: " +
-                encodedParams.tag);
-        }
-
-        encodedParams.data.reset();
-
-        DerInputStream in = encodedParams.data;
-
-        int version = in.getInteger();
-        if (version != 1) {
-            throw new IOException("Unsupported EC parameters version: " +
-               version);
-        }
-        ECField field = parseField(in);
-        EllipticCurve curve = parseCurve(in, field);
-        ECPoint point = parsePoint(in, curve);
-
-        BigInteger order = in.getBigInteger();
-        int cofactor = 0;
-
-        if (in.available() != 0) {
-            cofactor = in.getInteger();
-        }
-
-        // XXX HashAlgorithm optional
-
-        if (encodedParams.data.available() != 0) {
-            throw new IOException("encoded params have " +
-                                  encodedParams.data.available() +
-                                  " extra bytes");
-        }
-
-        return new ECParameterSpec(curve, point, order, cofactor);
-*/
-    }
-
-    protected void engineInit(byte[] params, String decodingMethod)
-            throws IOException {
-        engineInit(params);
-    }
-
-    protected <T extends AlgorithmParameterSpec> T
-            engineGetParameterSpec(Class<T> spec)
-            throws InvalidParameterSpecException {
-
-        if (spec.isAssignableFrom(ECParameterSpec.class)) {
-            return spec.cast(namedCurve);
-        }
-
-        if (spec.isAssignableFrom(ECGenParameterSpec.class)) {
-            // Ensure the name is the Object ID
-            String name = namedCurve.getObjectId();
-            return spec.cast(new ECGenParameterSpec(name));
-        }
-
-        if (spec.isAssignableFrom(ECKeySizeParameterSpec.class)) {
-            int keySize = namedCurve.getCurve().getField().getFieldSize();
-            return spec.cast(new ECKeySizeParameterSpec(keySize));
-        }
-
-        throw new InvalidParameterSpecException(
-            "Only ECParameterSpec and ECGenParameterSpec supported");
-    }
-
-    protected byte[] engineGetEncoded() throws IOException {
-        return namedCurve.getEncoded();
-    }
-
-    protected byte[] engineGetEncoded(String encodingMethod)
-            throws IOException {
-        return engineGetEncoded();
-    }
-
-    protected String engineToString() {
-        if (namedCurve == null) {
-            return "Not initialized";
-        }
-
-        return namedCurve.toString();
-    }
-}
-
--- a/jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,11 @@
 import java.security.interfaces.*;
 import java.security.spec.*;
 
-import sun.security.util.*;
+import sun.security.util.DerInputStream;
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ECParameters;
+import sun.security.util.ECUtil;
 import sun.security.x509.AlgorithmId;
 import sun.security.pkcs.PKCS8Key;
 
--- a/jdk/src/share/classes/sun/security/ec/ECPublicKeyImpl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ec/ECPublicKeyImpl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,7 +31,9 @@
 import java.security.interfaces.*;
 import java.security.spec.*;
 
-import sun.security.util.*;
+import sun.security.util.ECParameters;
+import sun.security.util.ECUtil;
+
 import sun.security.x509.*;
 
 /**
--- a/jdk/src/share/classes/sun/security/ec/NamedCurve.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, 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 sun.security.ec;
-
-import java.io.IOException;
-import java.math.BigInteger;
-
-import java.security.spec.*;
-
-import sun.security.util.DerOutputStream;
-import sun.security.util.ObjectIdentifier;
-
-
-/**
- * Contains Elliptic Curve parameters.
- *
- * @since   1.6
- * @author  Andreas Sterbenz
- */
-class NamedCurve extends ECParameterSpec {
-
-    // friendly name for toString() output
-    private final String name;
-
-    // well known OID
-    private final String oid;
-
-    // encoded form (as NamedCurve identified via OID)
-    private final byte[] encoded;
-
-    NamedCurve(String name, String oid, EllipticCurve curve,
-            ECPoint g, BigInteger n, int h) {
-        super(curve, g, n, h);
-        this.name = name;
-        this.oid = oid;
-
-        DerOutputStream out = new DerOutputStream();
-
-        try {
-            out.putOID(new ObjectIdentifier(oid));
-        } catch (IOException e) {
-            throw new RuntimeException("Internal error", e);
-        }
-
-        encoded = out.toByteArray();
-    }
-
-    String getName() {
-        return name;
-    }
-
-    byte[] getEncoded() {
-        return encoded.clone();
-    }
-
-    String getObjectId() {
-        return oid;
-    }
-
-    public String toString() {
-        return name + " (" + oid + ")";
-    }
-}
--- a/jdk/src/share/classes/sun/security/ec/SunECEntries.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ec/SunECEntries.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, 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
@@ -29,6 +29,8 @@
 import java.util.Map;
 
 import java.util.regex.Pattern;
+import sun.security.util.CurveDB;
+import sun.security.util.NamedCurve;
 
 /**
  * Defines the entries of the SunEC provider.
@@ -55,7 +57,7 @@
         /*
          * Algorithm Parameter engine
          */
-        map.put("AlgorithmParameters.EC", "sun.security.ec.ECParameters");
+        map.put("AlgorithmParameters.EC", "sun.security.util.ECParameters");
         map.put("Alg.Alias.AlgorithmParameters.EllipticCurve", "EC");
         map.put("Alg.Alias.AlgorithmParameters.1.2.840.10045.2.1", "EC");
 
--- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,11 +40,13 @@
 import java.security.AccessController;
 import java.security.AccessControlContext;
 import java.security.Key;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import javax.crypto.Cipher;
 import javax.security.auth.Subject;
-import javax.security.auth.kerberos.*;
+import javax.security.auth.kerberos.ServicePermission;
+import javax.security.auth.kerberos.KerberosCredMessage;
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KerberosTicket;
 import sun.security.krb5.internal.Ticket;
 
 /**
@@ -118,6 +120,7 @@
 
     // XXX See if the required info from these can be extracted and
     // stored elsewhere
+    private Credentials tgt;
     private Credentials serviceCreds;
     private KrbApReq apReq;
     Ticket serviceTicket;
@@ -616,7 +619,6 @@
                                            "No TGT available");
                     }
                     myName = (Krb5NameElement) myCred.getName();
-                    Credentials tgt;
                     final Krb5ProxyCredential second;
                     if (myCred instanceof Krb5InitCredential) {
                         second = null;
@@ -750,7 +752,6 @@
                     // No need to write anything;
                     // just validate the incoming token
                     new AcceptSecContextToken(this, serviceCreds, apReq, is);
-                    serviceCreds = null;
                     apReq = null;
                     state = STATE_DONE;
                 } else {
@@ -1304,6 +1305,9 @@
     public final void dispose() throws GSSException {
         state = STATE_DELETED;
         delegatedCred = null;
+        tgt = null;
+        serviceCreds = null;
+        key = null;
     }
 
     public final Provider getProvider() {
@@ -1424,6 +1428,9 @@
         switch (type) {
             case KRB5_GET_SESSION_KEY:
                 return new KerberosSessionKey(key);
+            case KRB5_GET_SESSION_KEY_EX:
+                return new javax.security.auth.kerberos.EncryptionKey(
+                        key.getBytes(), key.getEType());
             case KRB5_GET_TKT_FLAGS:
                 return tktFlags.clone();
             case KRB5_GET_AUTHZ_DATA:
@@ -1435,6 +1442,26 @@
                 }
             case KRB5_GET_AUTHTIME:
                 return authTime;
+            case KRB5_GET_KRB_CRED:
+                if (!isInitiator()) {
+                    throw new GSSException(GSSException.UNAVAILABLE, -1,
+                            "KRB_CRED not available on acceptor side.");
+                }
+                KerberosPrincipal sender = new KerberosPrincipal(
+                        myName.getKrb5PrincipalName().getName());
+                KerberosPrincipal recipient = new KerberosPrincipal(
+                        peerName.getKrb5PrincipalName().getName());
+                try {
+                    byte[] krbCred = new KrbCred(tgt, serviceCreds, key)
+                            .getMessage();
+                    return new KerberosCredMessage(
+                            sender, recipient, krbCred);
+                } catch (KrbException | IOException e) {
+                    GSSException gsse = new GSSException(GSSException.UNAVAILABLE, -1,
+                            "KRB_CRED not generated correctly.");
+                    gsse.initCause(e);
+                    throw gsse;
+                }
         }
         throw new GSSException(GSSException.UNAVAILABLE, -1,
                 "Inquire type not supported.");
@@ -1456,4 +1483,5 @@
     public void setAuthzData(com.sun.security.jgss.AuthorizationDataEntry[] authzData) {
         this.authzData = authzData;
     }
+
 }
--- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,8 +29,8 @@
 import sun.security.jgss.GSSCaller;
 import sun.security.jgss.spi.*;
 import sun.security.krb5.*;
-import sun.security.krb5.Config;
-import javax.security.auth.kerberos.*;
+import javax.security.auth.kerberos.KerberosTicket;
+import javax.security.auth.kerberos.KerberosPrincipal;
 import java.net.InetAddress;
 import java.io.IOException;
 import java.util.Date;
--- a/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -523,13 +523,6 @@
                     valid = false;
                 }
 
-                // get the mechanism token
-                byte[] mechToken = initToken.getMechToken();
-                if (mechToken == null) {
-                    throw new GSSException(GSSException.FAILURE, -1,
-                            "mechToken is missing");
-                }
-
                 /*
                  * Select the best match between the list of mechs
                  * that the initiator requested and the list that
@@ -545,7 +538,19 @@
                 internal_mech = mech_wanted;
 
                 // get the token for mechanism
-                byte[] accept_token = GSS_acceptSecContext(mechToken);
+                byte[] accept_token;
+
+                if (mechList[0].equals(mech_wanted)) {
+                    // get the mechanism token
+                    byte[] mechToken = initToken.getMechToken();
+                    if (mechToken == null) {
+                        throw new GSSException(GSSException.FAILURE, -1,
+                                "mechToken is missing");
+                    }
+                    accept_token = GSS_acceptSecContext(mechToken);
+                } else {
+                    accept_token = null;
+                }
 
                 // verify MIC
                 if (!GSSUtil.useMSInterop() && valid) {
@@ -594,9 +599,27 @@
                 retVal = targToken.getEncoded();
 
             } else if (state == STATE_IN_PROCESS) {
+                // read data
+                byte[] token = new byte[is.available()];
+                SpNegoToken.readFully(is, token);
+                if (DEBUG) {
+                    System.out.println("SpNegoContext.acceptSecContext: " +
+                            "receiving token = " +
+                            SpNegoToken.getHexBytes(token));
+                }
+
+                // read the SPNEGO token
+                // token will be validated when parsing
+                NegTokenTarg inputToken = new NegTokenTarg(token);
+
+                if (DEBUG) {
+                    System.out.println("SpNegoContext.acceptSecContext: " +
+                            "received token of type = " +
+                            SpNegoToken.getTokenName(inputToken.getType()));
+                }
+
                 // read the token
-                byte[] client_token = new byte[is.available()];
-                SpNegoToken.readFully(is, client_token);
+                byte[] client_token = inputToken.getResponseToken();
                 byte[] accept_token = GSS_acceptSecContext(client_token);
                 if (accept_token == null) {
                     valid = false;
@@ -1055,7 +1078,7 @@
      * This is only valid on the acceptor side of the context.
      * @return GSSCredentialSpi object for the delegated credential
      * @exception GSSException
-     * @see GSSContext#getDelegCredState
+     * @see GSSContext#getCredDelegState
      */
     public final GSSCredentialSpi getDelegCred() throws GSSException {
         if (state != STATE_IN_PROCESS && state != STATE_DONE)
--- a/jdk/src/share/classes/sun/security/pkcs11/P11KeyStore.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11KeyStore.java	Fri Aug 08 11:36:48 2014 -0700
@@ -67,8 +67,6 @@
 import sun.security.util.DerValue;
 import sun.security.util.ECUtil;
 
-import sun.security.ec.ECParameters;
-
 import sun.security.pkcs11.Secmod.*;
 import static sun.security.pkcs11.P11Util.*;
 
--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Fri Aug 08 11:36:48 2014 -0700
@@ -593,7 +593,7 @@
 
         // AlgorithmParameters for EC.
         // Only needed until we have an EC implementation in the SUN provider.
-        d(AGP, "EC",            "sun.security.ec.ECParameters",
+        d(AGP, "EC",            "sun.security.util.ECParameters",
                                                 s("1.2.840.10045.2.1"),
                 m(CKM_EC_KEY_PAIR_GEN, CKM_ECDH1_DERIVE,
                     CKM_ECDSA, CKM_ECDSA_SHA1));
@@ -1032,7 +1032,7 @@
             } else if (type == KS) {
                 return token.getKeyStore();
             } else if (type == AGP) {
-                return new sun.security.ec.ECParameters();
+                return new sun.security.util.ECParameters();
             } else {
                 throw new NoSuchAlgorithmException("Unknown type: " + type);
             }
--- a/jdk/src/share/classes/sun/security/provider/SecureRandom.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/provider/SecureRandom.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -29,6 +29,7 @@
 import java.security.MessageDigest;
 import java.security.SecureRandomSpi;
 import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
 
 /**
  * <p>This class provides a crytpographically strong pseudo-random number
@@ -94,9 +95,19 @@
      */
     private void init(byte[] seed) {
         try {
-            digest = MessageDigest.getInstance("SHA");
-        } catch (NoSuchAlgorithmException e) {
-            throw new InternalError("internal error: SHA-1 not available.", e);
+            /*
+             * Use the local SUN implementation to avoid native
+             * performance overhead.
+             */
+            digest = MessageDigest.getInstance("SHA", "SUN");
+        } catch (NoSuchProviderException | NoSuchAlgorithmException e) {
+            // Fallback to any available.
+            try {
+                digest = MessageDigest.getInstance("SHA");
+            } catch (NoSuchAlgorithmException exc) {
+                throw new InternalError(
+                    "internal error: SHA-1 not available.", exc);
+            }
         }
 
         if (seed != null) {
@@ -265,9 +276,19 @@
         s.defaultReadObject ();
 
         try {
-            digest = MessageDigest.getInstance("SHA");
-        } catch (NoSuchAlgorithmException e) {
-            throw new InternalError("internal error: SHA-1 not available.", e);
+            /*
+             * Use the local SUN implementation to avoid native
+             * performance overhead.
+             */
+            digest = MessageDigest.getInstance("SHA", "SUN");
+        } catch (NoSuchProviderException | NoSuchAlgorithmException e) {
+            // Fallback to any available.
+            try {
+                digest = MessageDigest.getInstance("SHA");
+            } catch (NoSuchAlgorithmException exc) {
+                throw new InternalError(
+                    "internal error: SHA-1 not available.", exc);
+            }
         }
     }
 }
--- a/jdk/src/share/classes/sun/security/ssl/DHCrypt.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/DHCrypt.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -188,7 +188,7 @@
      *         the same size as the Diffie-Hellman modulus.
      */
     SecretKey getAgreedSecret(BigInteger peerPublicValue,
-            boolean keyIsValidated) throws IOException {
+            boolean keyIsValidated) throws SSLHandshakeException {
         try {
             KeyFactory kf = JsseJce.getKeyFactory("DiffieHellman");
             DHPublicKeySpec spec =
@@ -211,7 +211,8 @@
             ka.doPhase(publicKey, true);
             return ka.generateSecret("TlsPremasterSecret");
         } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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 javax.crypto.SecretKey;
 import javax.crypto.KeyAgreement;
+import javax.net.ssl.SSLHandshakeException;
 
 /**
  * Helper class for the ECDH key exchange. It generates the appropriate
@@ -88,19 +89,20 @@
     }
 
     // called by ClientHandshaker with either the server's static or ephemeral public key
-    SecretKey getAgreedSecret(PublicKey peerPublicKey) {
+    SecretKey getAgreedSecret(PublicKey peerPublicKey) throws SSLHandshakeException {
         try {
             KeyAgreement ka = JsseJce.getKeyAgreement("ECDH");
             ka.init(privateKey);
             ka.doPhase(peerPublicKey, true);
             return ka.generateSecret("TlsPremasterSecret");
         } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
     // called by ServerHandshaker
-    SecretKey getAgreedSecret(byte[] encodedPoint) {
+    SecretKey getAgreedSecret(byte[] encodedPoint) throws SSLHandshakeException {
         try {
             ECParameterSpec params = publicKey.getParams();
             ECPoint point = JsseJce.decodePoint(encodedPoint, params.getCurve());
@@ -108,10 +110,9 @@
             ECPublicKeySpec spec = new ECPublicKeySpec(point, params);
             PublicKey peerPublicKey = kf.generatePublic(spec);
             return getAgreedSecret(peerPublicKey);
-        } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
-        } catch (java.io.IOException e) {
-            throw new RuntimeException("Could not generate secret", e);
+        } catch (GeneralSecurityException | java.io.IOException e) {
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/security/ssl/Handshaker.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/Handshaker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -656,8 +656,15 @@
      */
     ProtocolList getActiveProtocols() {
         if (activeProtocols == null) {
+            boolean enabledSSL20Hello = false;
             ArrayList<ProtocolVersion> protocols = new ArrayList<>(4);
             for (ProtocolVersion protocol : enabledProtocols.collection()) {
+                // Need not to check the SSL20Hello protocol.
+                if (protocol.v == ProtocolVersion.SSL20Hello.v) {
+                    enabledSSL20Hello = true;
+                    continue;
+                }
+
                 boolean found = false;
                 for (CipherSuite suite : enabledCipherSuites.collection()) {
                     if (suite.isAvailable() && suite.obsoleted > protocol.v &&
@@ -684,6 +691,11 @@
                         "No available cipher suite for " + protocol);
                 }
             }
+
+            if (!protocols.isEmpty() && enabledSSL20Hello) {
+                protocols.add(ProtocolVersion.SSL20Hello);
+            }
+
             activeProtocols = new ProtocolList(protocols);
         }
 
--- a/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java	Fri Aug 08 11:36:48 2014 -0700
@@ -176,7 +176,7 @@
     private final static int ARBITRARY_PRIME = 0xff01;
     private final static int ARBITRARY_CHAR2 = 0xff02;
 
-    // See sun.security.ec.NamedCurve for the OIDs
+    // See sun.security.util.NamedCurve for the OIDs
     private final static String[] NAMED_CURVE_OID_TABLE = new String[] {
         null,                   //  (0) unused
         "1.3.132.0.1",          //  (1) sect163k1, NIST K-163
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/security/util/CurveDB.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2006, 2014, 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 sun.security.util;
+
+import java.math.BigInteger;
+
+import java.security.spec.*;
+
+import java.util.*;
+import java.util.regex.Pattern;
+
+/**
+ * Repository for well-known Elliptic Curve parameters. It is used by both
+ * the SunPKCS11 and SunJSSE code.
+ *
+ * @since   1.6
+ * @author  Andreas Sterbenz
+ */
+public class CurveDB {
+    private final static int P  = 1; // prime curve
+    private final static int B  = 2; // binary curve
+    private final static int PD = 5; // prime curve, mark as default
+    private final static int BD = 6; // binary curve, mark as default
+
+    private static final Map<String,NamedCurve> oidMap =
+        new LinkedHashMap<String,NamedCurve>();
+    private static final Map<String,NamedCurve> nameMap =
+        new HashMap<String,NamedCurve>();
+    private static final Map<Integer,NamedCurve> lengthMap =
+        new HashMap<Integer,NamedCurve>();
+
+    private static Collection<? extends NamedCurve> specCollection;
+
+    public static final String SPLIT_PATTERN = ",|\\[|\\]";
+
+    // Used by SunECEntries
+    public static Collection<? extends NamedCurve>getSupportedCurves() {
+        return specCollection;
+    }
+
+    // Return a NamedCurve for the specified OID/name or null if unknown.
+    static NamedCurve lookup(String name) {
+        NamedCurve spec = oidMap.get(name);
+        if (spec != null) {
+            return spec;
+        }
+
+        return nameMap.get(name);
+    }
+
+    // Return EC parameters for the specified field size. If there are known
+    // NIST recommended parameters for the given length, they are returned.
+    // Otherwise, if there are multiple matches for the given size, an
+    // arbitrary one is returns.
+    // If no parameters are known, the method returns null.
+    // NOTE that this method returns both prime and binary curves.
+    static NamedCurve lookup(int length) {
+        return lengthMap.get(length);
+    }
+
+    // Convert the given ECParameterSpec object to a NamedCurve object.
+    // If params does not represent a known named curve, return null.
+    static NamedCurve lookup(ECParameterSpec params) {
+        if ((params instanceof NamedCurve) || (params == null)) {
+            return (NamedCurve)params;
+        }
+
+        // This is a hack to allow SunJSSE to work with 3rd party crypto
+        // providers for ECC and not just SunPKCS11.
+        // This can go away once we decide how to expose curve names in the
+        // public API.
+        // Note that it assumes that the 3rd party provider encodes named
+        // curves using the short form, not explicitly. If it did that, then
+        // the SunJSSE TLS ECC extensions are wrong, which could lead to
+        // interoperability problems.
+        int fieldSize = params.getCurve().getField().getFieldSize();
+        for (NamedCurve namedCurve : specCollection) {
+            // ECParameterSpec does not define equals, so check all the
+            // components ourselves.
+            // Quick field size check first
+            if (namedCurve.getCurve().getField().getFieldSize() != fieldSize) {
+                continue;
+            }
+            if (namedCurve.getCurve().equals(params.getCurve()) == false) {
+                continue;
+            }
+            if (namedCurve.getGenerator().equals(params.getGenerator()) ==
+                    false) {
+                continue;
+            }
+            if (namedCurve.getOrder().equals(params.getOrder()) == false) {
+                continue;
+            }
+            if (namedCurve.getCofactor() != params.getCofactor()) {
+                continue;
+            }
+            // everything matches our named curve, return it
+            return namedCurve;
+        }
+        // no match found
+        return null;
+    }
+
+    private static BigInteger bi(String s) {
+        return new BigInteger(s, 16);
+    }
+
+    private static void add(String name, String soid, int type, String sfield,
+            String a, String b, String x, String y, String n, int h,
+            Pattern nameSplitPattern) {
+        BigInteger p = bi(sfield);
+        ECField field;
+        if ((type == P) || (type == PD)) {
+            field = new ECFieldFp(p);
+        } else if ((type == B) || (type == BD)) {
+            field = new ECFieldF2m(p.bitLength() - 1, p);
+        } else {
+            throw new RuntimeException("Invalid type: " + type);
+        }
+
+        EllipticCurve curve = new EllipticCurve(field, bi(a), bi(b));
+        ECPoint g = new ECPoint(bi(x), bi(y));
+
+        NamedCurve params = new NamedCurve(name, soid, curve, g, bi(n), h);
+        if (oidMap.put(soid, params) != null) {
+            throw new RuntimeException("Duplication oid: " + soid);
+        }
+
+        String[] commonNames = nameSplitPattern.split(name);
+        for (String commonName : commonNames) {
+            if (nameMap.put(commonName.trim(), params) != null) {
+                throw new RuntimeException("Duplication name: " + commonName);
+            }
+        }
+
+        int len = field.getFieldSize();
+        if ((type == PD) || (type == BD) || (lengthMap.get(len) == null)) {
+            // add entry if none present for this field size or if
+            // the curve is marked as a default curve.
+            lengthMap.put(len, params);
+        }
+    }
+
+    static {
+        Pattern nameSplitPattern = Pattern.compile(SPLIT_PATTERN);
+
+        /* SEC2 prime curves */
+        add("secp112r1", "1.3.132.0.6", P,
+            "DB7C2ABF62E35E668076BEAD208B",
+            "DB7C2ABF62E35E668076BEAD2088",
+            "659EF8BA043916EEDE8911702B22",
+            "09487239995A5EE76B55F9C2F098",
+            "A89CE5AF8724C0A23E0E0FF77500",
+            "DB7C2ABF62E35E7628DFAC6561C5",
+            1, nameSplitPattern);
+
+        add("secp112r2", "1.3.132.0.7", P,
+            "DB7C2ABF62E35E668076BEAD208B",
+            "6127C24C05F38A0AAAF65C0EF02C",
+            "51DEF1815DB5ED74FCC34C85D709",
+            "4BA30AB5E892B4E1649DD0928643",
+            "adcd46f5882e3747def36e956e97",
+            "36DF0AAFD8B8D7597CA10520D04B",
+            4, nameSplitPattern);
+
+        add("secp128r1", "1.3.132.0.28", P,
+            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
+            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC",
+            "E87579C11079F43DD824993C2CEE5ED3",
+            "161FF7528B899B2D0C28607CA52C5B86",
+            "CF5AC8395BAFEB13C02DA292DDED7A83",
+            "FFFFFFFE0000000075A30D1B9038A115",
+            1, nameSplitPattern);
+
+        add("secp128r2", "1.3.132.0.29", P,
+            "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
+            "D6031998D1B3BBFEBF59CC9BBFF9AEE1",
+            "5EEEFCA380D02919DC2C6558BB6D8A5D",
+            "7B6AA5D85E572983E6FB32A7CDEBC140",
+            "27B6916A894D3AEE7106FE805FC34B44",
+            "3FFFFFFF7FFFFFFFBE0024720613B5A3",
+            4, nameSplitPattern);
+
+        add("secp160k1", "1.3.132.0.9", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
+            "0000000000000000000000000000000000000000",
+            "0000000000000000000000000000000000000007",
+            "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
+            "938CF935318FDCED6BC28286531733C3F03C4FEE",
+            "0100000000000000000001B8FA16DFAB9ACA16B6B3",
+            1, nameSplitPattern);
+
+        add("secp160r1", "1.3.132.0.8", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
+            "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
+            "4A96B5688EF573284664698968C38BB913CBFC82",
+            "23A628553168947D59DCC912042351377AC5FB32",
+            "0100000000000000000001F4C8F927AED3CA752257",
+            1, nameSplitPattern);
+
+        add("secp160r2", "1.3.132.0.30", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
+            "B4E134D3FB59EB8BAB57274904664D5AF50388BA",
+            "52DCB034293A117E1F4FF11B30F7199D3144CE6D",
+            "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
+            "0100000000000000000000351EE786A818F3A1A16B",
+            1, nameSplitPattern);
+
+        add("secp192k1", "1.3.132.0.31", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
+            "000000000000000000000000000000000000000000000000",
+            "000000000000000000000000000000000000000000000003",
+            "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
+            "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
+            "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D",
+            1, nameSplitPattern);
+
+        add("secp192r1 [NIST P-192, X9.62 prime192v1]", "1.2.840.10045.3.1.1", PD,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
+            "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
+            "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
+            "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
+            "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831",
+            1, nameSplitPattern);
+
+        add("secp224k1", "1.3.132.0.32", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
+            "00000000000000000000000000000000000000000000000000000000",
+            "00000000000000000000000000000000000000000000000000000005",
+            "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
+            "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
+            "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7",
+            1, nameSplitPattern);
+
+        add("secp224r1 [NIST P-224]", "1.3.132.0.33", PD,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
+            "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
+            "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
+            "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D",
+            1, nameSplitPattern);
+
+        add("secp256k1", "1.3.132.0.10", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
+            "0000000000000000000000000000000000000000000000000000000000000000",
+            "0000000000000000000000000000000000000000000000000000000000000007",
+            "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
+            "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",
+            1, nameSplitPattern);
+
+        add("secp256r1 [NIST P-256, X9.62 prime256v1]", "1.2.840.10045.3.1.7", PD,
+            "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
+            "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
+            "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
+            "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
+            "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
+            "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
+            1, nameSplitPattern);
+
+        add("secp384r1 [NIST P-384]", "1.3.132.0.34", PD,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
+            "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
+            "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
+            "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
+            1, nameSplitPattern);
+
+        add("secp521r1 [NIST P-521]", "1.3.132.0.35", PD,
+            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
+            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
+            "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
+            "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
+            "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
+            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
+            1, nameSplitPattern);
+
+        /* ANSI X9.62 prime curves */
+        add("X9.62 prime192v2", "1.2.840.10045.3.1.2", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
+            "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
+            "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
+            "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
+            "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31",
+            1, nameSplitPattern);
+
+        add("X9.62 prime192v3", "1.2.840.10045.3.1.3", P,
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
+            "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
+            "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
+            "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
+            "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
+            "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13",
+            1, nameSplitPattern);
+
+        add("X9.62 prime239v1", "1.2.840.10045.3.1.4", P,
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
+            "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
+            "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
+            "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B",
+            1, nameSplitPattern);
+
+        add("X9.62 prime239v2", "1.2.840.10045.3.1.5", P,
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
+            "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
+            "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
+            "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
+            "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063",
+            1, nameSplitPattern);
+
+        add("X9.62 prime239v3", "1.2.840.10045.3.1.6", P,
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
+            "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
+            "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
+            "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
+            "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551",
+            1, nameSplitPattern);
+
+        /* SEC2 binary curves */
+        add("sect113r1", "1.3.132.0.4", B,
+            "020000000000000000000000000201",
+            "003088250CA6E7C7FE649CE85820F7",
+            "00E8BEE4D3E2260744188BE0E9C723",
+            "009D73616F35F4AB1407D73562C10F",
+            "00A52830277958EE84D1315ED31886",
+            "0100000000000000D9CCEC8A39E56F",
+            2, nameSplitPattern);
+
+        add("sect113r2", "1.3.132.0.5", B,
+            "020000000000000000000000000201",
+            "00689918DBEC7E5A0DD6DFC0AA55C7",
+            "0095E9A9EC9B297BD4BF36E059184F",
+            "01A57A6A7B26CA5EF52FCDB8164797",
+            "00B3ADC94ED1FE674C06E695BABA1D",
+            "010000000000000108789B2496AF93",
+            2, nameSplitPattern);
+
+        add("sect131r1", "1.3.132.0.22", B,
+            "080000000000000000000000000000010D",
+            "07A11B09A76B562144418FF3FF8C2570B8",
+            "0217C05610884B63B9C6C7291678F9D341",
+            "0081BAF91FDF9833C40F9C181343638399",
+            "078C6E7EA38C001F73C8134B1B4EF9E150",
+            "0400000000000000023123953A9464B54D",
+            2, nameSplitPattern);
+
+        add("sect131r2", "1.3.132.0.23", B,
+            "080000000000000000000000000000010D",
+            "03E5A88919D7CAFCBF415F07C2176573B2",
+            "04B8266A46C55657AC734CE38F018F2192",
+            "0356DCD8F2F95031AD652D23951BB366A8",
+            "0648F06D867940A5366D9E265DE9EB240F",
+            "0400000000000000016954A233049BA98F",
+            2, nameSplitPattern);
+
+        add("sect163k1 [NIST K-163]", "1.3.132.0.1", BD,
+            "0800000000000000000000000000000000000000C9",
+            "000000000000000000000000000000000000000001",
+            "000000000000000000000000000000000000000001",
+            "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8",
+            "0289070FB05D38FF58321F2E800536D538CCDAA3D9",
+            "04000000000000000000020108A2E0CC0D99F8A5EF",
+            2, nameSplitPattern);
+
+        add("sect163r1", "1.3.132.0.2", B,
+            "0800000000000000000000000000000000000000C9",
+            "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2",
+            "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9",
+            "0369979697AB43897789566789567F787A7876A654",
+            "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883",
+            "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B",
+            2, nameSplitPattern);
+
+        add("sect163r2 [NIST B-163]", "1.3.132.0.15", BD,
+            "0800000000000000000000000000000000000000C9",
+            "000000000000000000000000000000000000000001",
+            "020A601907B8C953CA1481EB10512F78744A3205FD",
+            "03F0EBA16286A2D57EA0991168D4994637E8343E36",
+            "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1",
+            "040000000000000000000292FE77E70C12A4234C33",
+            2, nameSplitPattern);
+
+        add("sect193r1", "1.3.132.0.24", B,
+            "02000000000000000000000000000000000000000000008001",
+            "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01",
+            "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814",
+            "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1",
+            "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05",
+            "01000000000000000000000000C7F34A778F443ACC920EBA49",
+            2, nameSplitPattern);
+
+        add("sect193r2", "1.3.132.0.25", B,
+            "02000000000000000000000000000000000000000000008001",
+            "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B",
+            "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE",
+            "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F",
+            "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C",
+            "010000000000000000000000015AAB561B005413CCD4EE99D5",
+            2, nameSplitPattern);
+
+        add("sect233k1 [NIST K-233]", "1.3.132.0.26", BD,
+            "020000000000000000000000000000000000000004000000000000000001",
+            "000000000000000000000000000000000000000000000000000000000000",
+            "000000000000000000000000000000000000000000000000000000000001",
+            "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
+            "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
+            "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF",
+            4, nameSplitPattern);
+
+        add("sect233r1 [NIST B-233]", "1.3.132.0.27", B,
+            "020000000000000000000000000000000000000004000000000000000001",
+            "000000000000000000000000000000000000000000000000000000000001",
+            "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD",
+            "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B",
+            "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052",
+            "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7",
+            2, nameSplitPattern);
+
+        add("sect239k1", "1.3.132.0.3", B,
+            "800000000000000000004000000000000000000000000000000000000001",
+            "000000000000000000000000000000000000000000000000000000000000",
+            "000000000000000000000000000000000000000000000000000000000001",
+            "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC",
+            "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA",
+            "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5",
+            4, nameSplitPattern);
+
+        add("sect283k1 [NIST K-283]", "1.3.132.0.16", BD,
+            "0800000000000000000000000000000000000000000000000000000000000000000010A1",
+            "000000000000000000000000000000000000000000000000000000000000000000000000",
+            "000000000000000000000000000000000000000000000000000000000000000000000001",
+            "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836",
+            "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259",
+            "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61",
+            4, nameSplitPattern);
+
+        add("sect283r1 [NIST B-283]", "1.3.132.0.17", B,
+            "0800000000000000000000000000000000000000000000000000000000000000000010A1",
+            "000000000000000000000000000000000000000000000000000000000000000000000001",
+            "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5",
+            "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053",
+            "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4",
+            "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307",
+            2, nameSplitPattern);
+
+        add("sect409k1 [NIST K-409]", "1.3.132.0.36", BD,
+            "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
+            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
+            "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
+            "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
+            "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF",
+            4, nameSplitPattern);
+
+        add("sect409r1 [NIST B-409]", "1.3.132.0.37", B,
+            "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
+            "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
+            "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F",
+            "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7",
+            "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706",
+            "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173",
+            2, nameSplitPattern);
+
+        add("sect571k1 [NIST K-571]", "1.3.132.0.38", BD,
+            "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
+            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
+            "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972",
+            "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3",
+            "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001",
+            4, nameSplitPattern);
+
+        add("sect571r1 [NIST B-571]", "1.3.132.0.39", B,
+            "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
+            "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
+            "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A",
+            "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19",
+            "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B",
+            "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47",
+            2, nameSplitPattern);
+
+        /* ANSI X9.62 binary curves */
+        add("X9.62 c2tnb191v1", "1.2.840.10045.3.0.5", B,
+            "800000000000000000000000000000000000000000000201",
+            "2866537B676752636A68F56554E12640276B649EF7526267",
+            "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC",
+            "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D",
+            "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB",
+            "40000000000000000000000004A20E90C39067C893BBB9A5",
+            2, nameSplitPattern);
+
+        add("X9.62 c2tnb191v2", "1.2.840.10045.3.0.6", B,
+            "800000000000000000000000000000000000000000000201",
+            "401028774D7777C7B7666D1366EA432071274F89FF01E718",
+            "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01",
+            "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10",
+            "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A",
+            "20000000000000000000000050508CB89F652824E06B8173",
+            4, nameSplitPattern);
+
+        add("X9.62 c2tnb191v3", "1.2.840.10045.3.0.7", B,
+            "800000000000000000000000000000000000000000000201",
+            "6C01074756099122221056911C77D77E77A777E7E7E77FCB",
+            "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8",
+            "375D4CE24FDE434489DE8746E71786015009E66E38A926DD",
+            "545A39176196575D985999366E6AD34CE0A77CD7127B06BE",
+            "155555555555555555555555610C0B196812BFB6288A3EA3",
+            6, nameSplitPattern);
+
+        add("X9.62 c2tnb239v1", "1.2.840.10045.3.0.11", B,
+            "800000000000000000000000000000000000000000000000001000000001",
+            "32010857077C5431123A46B808906756F543423E8D27877578125778AC76",
+            "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16",
+            "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D",
+            "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305",
+            "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447",
+            4, nameSplitPattern);
+
+        add("X9.62 c2tnb239v2", "1.2.840.10045.3.0.12", B,
+            "800000000000000000000000000000000000000000000000001000000001",
+            "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F",
+            "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B",
+            "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205",
+            "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833",
+            "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D",
+            6, nameSplitPattern);
+
+        add("X9.62 c2tnb239v3", "1.2.840.10045.3.0.13", B,
+            "800000000000000000000000000000000000000000000000001000000001",
+            "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F",
+            "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40",
+            "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92",
+            "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461",
+            "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF",
+            0xA, nameSplitPattern);
+
+        add("X9.62 c2tnb359v1", "1.2.840.10045.3.0.18", B,
+            "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001",
+            "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557",
+            "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988",
+            "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097",
+            "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD",
+            "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B",
+            0x4C, nameSplitPattern);
+
+        add("X9.62 c2tnb431r1", "1.2.840.10045.3.0.20", B,
+            "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001",
+            "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F",
+            "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618",
+            "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7",
+            "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760",
+            "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91",
+            0x2760, nameSplitPattern);
+
+        /* ANSI X9.62 binary curves from the 1998 standard but forbidden
+         * in the 2005 version of the standard.
+         * We don't register them but leave them here for the time being in
+         * case we need to support them after all.
+         */
+/*
+        add("X9.62 c2pnb163v1", "1.2.840.10045.3.0.1", B,
+            "080000000000000000000000000000000000000107",
+            "072546B5435234A422E0789675F432C89435DE5242",
+            "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9",
+            "07AF69989546103D79329FCC3D74880F33BBE803CB",
+            "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F",
+            "0400000000000000000001E60FC8821CC74DAEAFC1",
+            2, nameSplitPattern);
+
+        add("X9.62 c2pnb163v2", "1.2.840.10045.3.0.2", B,
+            "080000000000000000000000000000000000000107",
+            "0108B39E77C4B108BED981ED0E890E117C511CF072",
+            "0667ACEB38AF4E488C407433FFAE4F1C811638DF20",
+            "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5",
+            "079F684DDF6684C5CD258B3890021B2386DFD19FC5",
+            "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7",
+            2, nameSplitPattern);
+
+        add("X9.62 c2pnb163v3", "1.2.840.10045.3.0.3", B,
+            "080000000000000000000000000000000000000107",
+            "07A526C63D3E25A256A007699F5447E32AE456B50E",
+            "03F7061798EB99E238FD6F1BF95B48FEEB4854252B",
+            "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB",
+            "05B935590C155E17EA48EB3FF3718B893DF59A05D0",
+            "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309",
+            2, nameSplitPattern);
+
+        add("X9.62 c2pnb176w1", "1.2.840.10045.3.0.4", B,
+            "0100000000000000000000000000000000080000000007",
+            "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B",
+            "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2",
+            "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798",
+            "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C",
+            "00010092537397ECA4F6145799D62B0A19CE06FE26AD",
+            0xFF6E, nameSplitPattern);
+
+        add("X9.62 c2pnb208w1", "1.2.840.10045.3.0.10", B,
+            "010000000000000000000000000000000800000000000000000007",
+            "0000000000000000000000000000000000000000000000000000",
+            "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E",
+            "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A",
+            "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3",
+            "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D",
+            0xFE48, nameSplitPattern);
+
+        add("X9.62 c2pnb272w1", "1.2.840.10045.3.0.16", B,
+            "010000000000000000000000000000000000000000000000000000010000000000000B",
+            "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20",
+            "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7",
+            "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D",
+            "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23",
+            "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521",
+            0xFF06, nameSplitPattern);
+
+        add("X9.62 c2pnb304w1", "1.2.840.10045.3.0.17", B,
+            "010000000000000000000000000000000000000000000000000000000000000000000000000807",
+            "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681",
+            "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE",
+            "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614",
+            "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B",
+            "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D",
+            0xFE2E, nameSplitPattern);
+
+        add("X9.62 c2pnb368w1", "1.2.840.10045.3.0.19", B,
+            "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007",
+            "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D",
+            "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A",
+            "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F",
+            "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310",
+            "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967",
+            0xFF70, nameSplitPattern);
+*/
+
+        specCollection = Collections.unmodifiableCollection(oidMap.values());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/security/util/ECParameters.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2006, 2014, 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 sun.security.util;
+
+import java.io.IOException;
+
+import java.security.*;
+import java.security.spec.*;
+
+/**
+ * This class implements encoding and decoding of Elliptic Curve parameters
+ * as specified in RFC 3279.
+ *
+ * However, only named curves are currently supported.
+ *
+ * ASN.1 from RFC 3279 follows. Note that X9.62 (2005) has added some additional
+ * options.
+ *
+ * <pre>
+ *    EcpkParameters ::= CHOICE {
+ *      ecParameters  ECParameters,
+ *      namedCurve    OBJECT IDENTIFIER,
+ *      implicitlyCA  NULL }
+ *
+ *    ECParameters ::= SEQUENCE {
+ *       version   ECPVer,          -- version is always 1
+ *       fieldID   FieldID,         -- identifies the finite field over
+ *                                  -- which the curve is defined
+ *       curve     Curve,           -- coefficients a and b of the
+ *                                  -- elliptic curve
+ *       base      ECPoint,         -- specifies the base point P
+ *                                  -- on the elliptic curve
+ *       order     INTEGER,         -- the order n of the base point
+ *       cofactor  INTEGER OPTIONAL -- The integer h = #E(Fq)/n
+ *       }
+ *
+ *    ECPVer ::= INTEGER {ecpVer1(1)}
+ *
+ *    Curve ::= SEQUENCE {
+ *       a         FieldElement,
+ *       b         FieldElement,
+ *       seed      BIT STRING OPTIONAL }
+ *
+ *    FieldElement ::= OCTET STRING
+ *
+ *    ECPoint ::= OCTET STRING
+ * </pre>
+ *
+ * @since   1.6
+ * @author  Andreas Sterbenz
+ */
+public final class ECParameters extends AlgorithmParametersSpi {
+
+    // used by ECPublicKeyImpl and ECPrivateKeyImpl
+    public static AlgorithmParameters getAlgorithmParameters(ECParameterSpec spec)
+            throws InvalidKeyException {
+        try {
+            AlgorithmParameters params =
+                AlgorithmParameters.getInstance("EC", "SunEC");
+            params.init(spec);
+            return params;
+        } catch (GeneralSecurityException e) {
+            throw new InvalidKeyException("EC parameters error", e);
+        }
+    }
+
+    /*
+     * The parameters these AlgorithmParameters object represents.
+     * Currently, it is always an instance of NamedCurve.
+     */
+    private NamedCurve namedCurve;
+
+    // A public constructor is required by AlgorithmParameters class.
+    public ECParameters() {
+        // empty
+    }
+
+    // AlgorithmParameterSpi methods
+
+    protected void engineInit(AlgorithmParameterSpec paramSpec)
+            throws InvalidParameterSpecException {
+
+        if (paramSpec == null) {
+            throw new InvalidParameterSpecException
+                ("paramSpec must not be null");
+        }
+
+        if (paramSpec instanceof NamedCurve) {
+            namedCurve = (NamedCurve)paramSpec;
+            return;
+        }
+
+        if (paramSpec instanceof ECParameterSpec) {
+            namedCurve = CurveDB.lookup((ECParameterSpec)paramSpec);
+        } else if (paramSpec instanceof ECGenParameterSpec) {
+            String name = ((ECGenParameterSpec)paramSpec).getName();
+            namedCurve = CurveDB.lookup(name);
+        } else if (paramSpec instanceof ECKeySizeParameterSpec) {
+            int keySize = ((ECKeySizeParameterSpec)paramSpec).getKeySize();
+            namedCurve = CurveDB.lookup(keySize);
+        } else {
+            throw new InvalidParameterSpecException
+                ("Only ECParameterSpec and ECGenParameterSpec supported");
+        }
+
+        if (namedCurve == null) {
+            throw new InvalidParameterSpecException(
+                "Not a supported curve: " + paramSpec);
+        }
+    }
+
+    protected void engineInit(byte[] params) throws IOException {
+        DerValue encodedParams = new DerValue(params);
+        if (encodedParams.tag == DerValue.tag_ObjectId) {
+            ObjectIdentifier oid = encodedParams.getOID();
+            NamedCurve spec = CurveDB.lookup(oid.toString());
+            if (spec == null) {
+                throw new IOException("Unknown named curve: " + oid);
+            }
+
+            namedCurve = spec;
+            return;
+        }
+
+        throw new IOException("Only named ECParameters supported");
+
+        // The code below is incomplete.
+        // It is left as a starting point for a complete parsing implementation.
+
+/*
+        if (encodedParams.tag != DerValue.tag_Sequence) {
+            throw new IOException("Unsupported EC parameters, tag: " +
+                encodedParams.tag);
+        }
+
+        encodedParams.data.reset();
+
+        DerInputStream in = encodedParams.data;
+
+        int version = in.getInteger();
+        if (version != 1) {
+            throw new IOException("Unsupported EC parameters version: " +
+               version);
+        }
+        ECField field = parseField(in);
+        EllipticCurve curve = parseCurve(in, field);
+        ECPoint point = parsePoint(in, curve);
+
+        BigInteger order = in.getBigInteger();
+        int cofactor = 0;
+
+        if (in.available() != 0) {
+            cofactor = in.getInteger();
+        }
+
+        // XXX HashAlgorithm optional
+
+        if (encodedParams.data.available() != 0) {
+            throw new IOException("encoded params have " +
+                                  encodedParams.data.available() +
+                                  " extra bytes");
+        }
+
+        return new ECParameterSpec(curve, point, order, cofactor);
+*/
+    }
+
+    protected void engineInit(byte[] params, String decodingMethod)
+            throws IOException {
+        engineInit(params);
+    }
+
+    protected <T extends AlgorithmParameterSpec> T
+            engineGetParameterSpec(Class<T> spec)
+            throws InvalidParameterSpecException {
+
+        if (spec.isAssignableFrom(ECParameterSpec.class)) {
+            return spec.cast(namedCurve);
+        }
+
+        if (spec.isAssignableFrom(ECGenParameterSpec.class)) {
+            // Ensure the name is the Object ID
+            String name = namedCurve.getObjectId();
+            return spec.cast(new ECGenParameterSpec(name));
+        }
+
+        if (spec.isAssignableFrom(ECKeySizeParameterSpec.class)) {
+            int keySize = namedCurve.getCurve().getField().getFieldSize();
+            return spec.cast(new ECKeySizeParameterSpec(keySize));
+        }
+
+        throw new InvalidParameterSpecException(
+            "Only ECParameterSpec and ECGenParameterSpec supported");
+    }
+
+    protected byte[] engineGetEncoded() throws IOException {
+        return namedCurve.getEncoded();
+    }
+
+    protected byte[] engineGetEncoded(String encodingMethod)
+            throws IOException {
+        return engineGetEncoded();
+    }
+
+    protected String engineToString() {
+        if (namedCurve == null) {
+            return "Not initialized";
+        }
+
+        return namedCurve.toString();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/security/util/NamedCurve.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2006, 2014, 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 sun.security.util;
+
+import java.io.IOException;
+import java.math.BigInteger;
+
+import java.security.spec.*;
+
+
+/**
+ * Contains Elliptic Curve parameters.
+ *
+ * @since   1.6
+ * @author  Andreas Sterbenz
+ */
+public final class NamedCurve extends ECParameterSpec {
+
+    // friendly name for toString() output
+    private final String name;
+
+    // well known OID
+    private final String oid;
+
+    // encoded form (as NamedCurve identified via OID)
+    private final byte[] encoded;
+
+    NamedCurve(String name, String oid, EllipticCurve curve,
+            ECPoint g, BigInteger n, int h) {
+        super(curve, g, n, h);
+        this.name = name;
+        this.oid = oid;
+
+        DerOutputStream out = new DerOutputStream();
+
+        try {
+            out.putOID(new ObjectIdentifier(oid));
+        } catch (IOException e) {
+            throw new RuntimeException("Internal error", e);
+        }
+
+        encoded = out.toByteArray();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public byte[] getEncoded() {
+        return encoded.clone();
+    }
+
+    public String getObjectId() {
+        return oid;
+    }
+
+    public String toString() {
+        return name + " (" + oid + ")";
+    }
+}
--- a/jdk/src/share/classes/sun/swing/PrintingStatus.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/swing/PrintingStatus.java	Fri Aug 08 11:36:48 2014 -0700
@@ -295,7 +295,7 @@
         private void updateStatusOnEDT(int pageIndex) {
             assert SwingUtilities.isEventDispatchThread();
             Object[] pageNumber = new Object[]{
-                new Integer(pageIndex + 1)};
+                pageIndex + 1};
             statusLabel.setText(statusFormat.format(pageNumber));
         }
     }
--- a/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,6 +49,8 @@
 import sun.print.ProxyPrintGraphics;
 import sun.awt.*;
 import java.io.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.*;
 import sun.font.FontDesignMetrics;
 import sun.font.FontUtilities;
@@ -1486,9 +1488,60 @@
     public static Object makeIcon(final Class<?> baseClass,
                                   final Class<?> rootClass,
                                   final String imageFile) {
+        return makeIcon(baseClass, rootClass, imageFile, true);
+    }
 
-        return new UIDefaults.LazyValue() {
-            public Object createValue(UIDefaults table) {
+    /**
+     * Utility method that creates a <code>UIDefaults.LazyValue</code> that
+     * creates an <code>ImageIcon</code> <code>UIResource</code> for the
+     * specified image file name. The image is loaded using
+     * <code>getResourceAsStream</code>, starting with a call to that method
+     * on the base class parameter. If it cannot be found, searching will
+     * continue through the base class' inheritance hierarchy, up to and
+     * including <code>rootClass</code>.
+     *
+     * Finds an image with a given name without privileges enabled.
+     *
+     * @param baseClass the first class to use in searching for the resource
+     * @param rootClass an ancestor of <code>baseClass</code> to finish the
+     *                  search at
+     * @param imageFile the name of the file to be found
+     * @return a lazy value that creates the <code>ImageIcon</code>
+     *         <code>UIResource</code> for the image,
+     *         or null if it cannot be found
+     */
+    public static Object makeIcon_Unprivileged(final Class<?> baseClass,
+                                  final Class<?> rootClass,
+                                  final String imageFile) {
+        return makeIcon(baseClass, rootClass, imageFile, false);
+    }
+
+    private static Object makeIcon(final Class<?> baseClass,
+                                  final Class<?> rootClass,
+                                  final String imageFile,
+                                  final boolean enablePrivileges) {
+        return (UIDefaults.LazyValue) (table) -> {
+            byte[] buffer = enablePrivileges ? AccessController.doPrivileged(
+                    (PrivilegedAction<byte[]>) ()
+                    -> getIconBytes(baseClass, rootClass, imageFile))
+                    : getIconBytes(baseClass, rootClass, imageFile);
+
+            if (buffer == null) {
+                return null;
+            }
+            if (buffer.length == 0) {
+                System.err.println("warning: " + imageFile
+                        + " is zero-length");
+                return null;
+            }
+
+            return new ImageIconUIResource(buffer);
+        };
+    }
+
+    private static byte[] getIconBytes(final Class<?> baseClass,
+                                  final Class<?> rootClass,
+                                  final String imageFile) {
                 /* Copy resource into a byte array.  This is
                  * necessary because several browsers consider
                  * Class.getResource a security risk because it
@@ -1496,60 +1549,38 @@
                  * Class.getResourceAsStream just returns raw
                  * bytes, which we can convert to an image.
                  */
-                byte[] buffer =
-                    java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedAction<byte[]>() {
-                    public byte[] run() {
-                        try {
-                            InputStream resource = null;
                             Class<?> srchClass = baseClass;
 
                             while (srchClass != null) {
-                                resource = srchClass.getResourceAsStream(imageFile);
 
-                                if (resource != null || srchClass == rootClass) {
+            try (InputStream resource =
+                    srchClass.getResourceAsStream(imageFile)) {
+                if (resource == null) {
+                    if (srchClass == rootClass) {
                                     break;
                                 }
-
                                 srchClass = srchClass.getSuperclass();
+                    continue;
                             }
 
-                            if (resource == null) {
-                                return null;
-                            }
-
-                            BufferedInputStream in =
-                                new BufferedInputStream(resource);
-                            ByteArrayOutputStream out =
-                                new ByteArrayOutputStream(1024);
+                try (BufferedInputStream in
+                        = new BufferedInputStream(resource);
+                        ByteArrayOutputStream out
+                        = new ByteArrayOutputStream(1024)) {
                             byte[] buffer = new byte[1024];
                             int n;
                             while ((n = in.read(buffer)) > 0) {
                                 out.write(buffer, 0, n);
                             }
-                            in.close();
                             out.flush();
                             return out.toByteArray();
+                }
                         } catch (IOException ioe) {
                             System.err.println(ioe.toString());
                         }
+        }
                         return null;
                     }
-                });
-
-                if (buffer == null) {
-                    return null;
-                }
-                if (buffer.length == 0) {
-                    System.err.println("warning: " + imageFile +
-                                       " is zero-length");
-                    return null;
-                }
-
-                return new ImageIconUIResource(buffer);
-            }
-        };
-    }
 
     /* Used to help decide if AA text rendering should be used, so
      * this local display test should be additionally qualified
--- a/jdk/src/share/classes/sun/tools/asm/Assembler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/asm/Assembler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -238,7 +238,7 @@
         // if a local variable table is generated
         if ((field != null) && env.debug_vars()) {
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             if (v != null) {
                 for (Enumeration<MemberDefinition> e = v.elements() ; e.hasMoreElements() ;) {
                     MemberDefinition f = e.nextElement();
@@ -386,7 +386,7 @@
         if ((field != null) && field.getArguments() != null) {
               int sum = 0;
               @SuppressWarnings("unchecked")
-              Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+              Vector<MemberDefinition> v = field.getArguments();
               for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                   MemberDefinition f = e.nextElement();
                   sum += f.getType().stackSize();
@@ -858,7 +858,7 @@
         if ((field != null) && (field.getArguments() != null)) {
             int reg = 0;
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                 MemberDefinition f = e.nextElement();
                 locals[reg] = f;
@@ -875,7 +875,7 @@
         if ((field != null) && (field.getArguments() != null)) {
             int reg = 0;
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                 MemberDefinition f = e.nextElement();
                 locals[reg] = f;
--- a/jdk/src/share/classes/sun/tools/asm/ConstantPool.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/asm/ConstantPool.java	Fri Aug 08 11:36:48 2014 -0700
@@ -42,7 +42,7 @@
  */
 public final
 class ConstantPool implements RuntimeConstants {
-    Hashtable<Object,ConstantPoolData> hash = new Hashtable<>(101);
+    Hashtable<Object, ConstantPoolData> hash = new Hashtable<>(101);
 
     /**
      * Find an entry, may return 0
--- a/jdk/src/share/classes/sun/tools/asm/SwitchData.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/asm/SwitchData.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,9 +39,9 @@
 class SwitchData {
     int minValue, maxValue;
     Label defaultLabel = new Label();
-    Hashtable<Integer,Label> tab = new Hashtable<>();
+    Hashtable<Integer, Label> tab = new Hashtable<>();
 // JCOV
-    Hashtable<Integer,Long> whereCaseTab = null;
+    Hashtable<Integer, Long> whereCaseTab = null;
 // end JCOV
 
     /**
@@ -92,13 +92,13 @@
 
 // JCOV
     public void initTableCase() {
-        whereCaseTab = new Hashtable<Integer,Long>();
+        whereCaseTab = new Hashtable<Integer, Long>();
     }
     public void addTableCase(int index, long where) {
         if (whereCaseTab != null)
             whereCaseTab.put(Integer.valueOf(index), Long.valueOf(where));
     }
-    // this puts String key into Hashtable<Integer,Long>
+    // this puts String key into Hashtable<Integer, Long>
     @SuppressWarnings("unchecked")
     public void addTableDefault(long where) {
         if (whereCaseTab != null)
@@ -123,7 +123,7 @@
      * hash table will be an Integer, with the value being a label.  The
      * enumeration returns the keys in sorted order.
      */
-    SwitchDataEnumeration(Hashtable<Integer,Label> tab) {
+    SwitchDataEnumeration(Hashtable<Integer, Label> tab) {
         table = new Integer[tab.size()];
         int i = 0;
         for (Enumeration<Integer> e = tab.keys() ; e.hasMoreElements() ; ) {
--- a/jdk/src/share/classes/sun/tools/java/BinaryClass.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/BinaryClass.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,7 @@
 class BinaryClass extends ClassDefinition implements Constants {
     BinaryConstantPool cpool;
     BinaryAttribute atts;
-    Vector dependencies;
+    Vector<ClassDeclaration> dependencies;
     private boolean haveLoadedNested = false;
 
     /**
@@ -51,7 +51,7 @@
      */
     public BinaryClass(Object source, ClassDeclaration declaration, int modifiers,
                            ClassDeclaration superClass, ClassDeclaration interfaces[],
-                           Vector dependencies) {
+                           Vector<ClassDeclaration> dependencies) {
         super(source, 0, declaration, modifiers, null, null);
         this.dependencies = dependencies;
         this.superClass = superClass;
@@ -134,7 +134,7 @@
         BinaryConstantPool cpool = new BinaryConstantPool(in);
 
         // The dependencies of this class
-        Vector dependencies = cpool.getDependencies(env);
+        Vector<ClassDeclaration> dependencies = cpool.getDependencies(env);
 
         // Read modifiers
         int classMod = in.readUnsignedShort() & ACCM_CLASS;  // JVM 4.1 ClassFile.access_flags
@@ -500,7 +500,7 @@
     /**
      * Get the dependencies
      */
-    public Enumeration getDependencies() {
+    public Enumeration<ClassDeclaration> getDependencies() {
         return dependencies.elements();
     }
 
--- a/jdk/src/share/classes/sun/tools/java/BinaryConstantPool.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/BinaryConstantPool.java	Fri Aug 08 11:36:48 2014 -0700
@@ -222,8 +222,8 @@
      * Get a list of dependencies, ie: all the classes referenced in this
      * constant pool.
      */
-    public Vector getDependencies(Environment env) {
-        Vector v = new Vector();
+    public Vector<ClassDeclaration> getDependencies(Environment env) {
+        Vector<ClassDeclaration> v = new Vector<>();
         for (int i = 1 ; i < cpool.length ; i++) {
             switch(types[i]) {
               case CONSTANT_CLASS:
@@ -234,8 +234,9 @@
         return v;
     }
 
-    Hashtable indexHashObject, indexHashAscii;
-    Vector MoreStuff;
+    Hashtable<Object, Integer> indexHashObject;
+    Hashtable<Object, Integer> indexHashAscii;
+    Vector<String> MoreStuff;
 
     /**
      * Find the index of an Object in the constant pool
@@ -243,7 +244,7 @@
     public int indexObject(Object obj, Environment env) {
         if (indexHashObject == null)
             createIndexHash(env);
-        Integer result = (Integer)indexHashObject.get(obj);
+        Integer result = indexHashObject.get(obj);
         if (result == null)
             throw new IndexOutOfBoundsException("Cannot find object " + obj + " of type " +
                                 obj.getClass() + " in constant pool");
@@ -257,9 +258,9 @@
     public int indexString(String string, Environment env) {
         if (indexHashObject == null)
             createIndexHash(env);
-        Integer result = (Integer)indexHashAscii.get(string);
+        Integer result = indexHashAscii.get(string);
         if (result == null) {
-            if (MoreStuff == null) MoreStuff = new Vector();
+            if (MoreStuff == null) MoreStuff = new Vector<>();
             result = cpool.length + MoreStuff.size();
             MoreStuff.addElement(string);
             indexHashAscii.put(string, result);
@@ -273,8 +274,8 @@
      */
 
     public void createIndexHash(Environment env) {
-        indexHashObject = new Hashtable();
-        indexHashAscii = new Hashtable();
+        indexHashObject = new Hashtable<>();
+        indexHashAscii = new Hashtable<>();
         for (int i = 1; i < cpool.length; i++) {
             if (types[i] == CONSTANT_UTF8) {
                 indexHashAscii.put(cpool[i], i);
@@ -342,7 +343,7 @@
             }
         }
         for (int i = cpool.length; i < length; i++) {
-            String string = (String)(MoreStuff.elementAt(i - cpool.length));
+            String string = MoreStuff.elementAt(i - cpool.length);
             out.writeByte(CONSTANT_UTF8);
             out.writeUTF(string);
         }
--- a/jdk/src/share/classes/sun/tools/java/BinaryMember.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/BinaryMember.java	Fri Aug 08 11:36:48 2014 -0700
@@ -82,9 +82,9 @@
     /**
      * Get arguments
      */
-    public Vector getArguments() {
+    public Vector<MemberDefinition> getArguments() {
         if (isConstructor() && (getClassDefinition().getSuperClass() == null)) {
-            Vector v = new Vector();
+            Vector<MemberDefinition> v = new Vector<>();
             v.addElement(new LocalMember(0, getClassDefinition(), 0,
                                         getClassDefinition().getType(), idThis));
             return v;
--- a/jdk/src/share/classes/sun/tools/java/ClassDefinition.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/ClassDefinition.java	Fri Aug 08 11:36:48 2014 -0700
@@ -64,14 +64,14 @@
     protected boolean nestError;
     protected UplevelReference references;
     protected boolean referencesFrozen;
-    private Hashtable fieldHash = new Hashtable(31);
+    private Hashtable<Identifier, MemberDefinition> fieldHash = new Hashtable<>(31);
     private int abstr;
 
     // Table of local and anonymous classes whose internal names are constructed
     // using the current class as a prefix.  This is part of a fix for
     // bugid 4054523 and 4030421.  See also 'Environment.getClassDefinition'
     // and 'BatchEnvironment.makeClassDefinition'.  Allocated on demand.
-    private Hashtable localClasses = null;
+    private Hashtable<String, ClassDefinition> localClasses = null;
     private final int LOCAL_CLASSES_SIZE = 31;
 
     // The immediately surrounding context in which the class appears.
@@ -378,7 +378,7 @@
         return firstMember;
     }
     public final MemberDefinition getFirstMatch(Identifier name) {
-        return (MemberDefinition)fieldHash.get(name);
+        return fieldHash.get(name);
     }
 
     /**
@@ -519,9 +519,9 @@
 
         // We check for any abstract methods inherited or declared
         // by this class.
-        Iterator methods = getMethods();
+        Iterator<MemberDefinition> methods = getMethods();
         while (methods.hasNext()) {
-            MemberDefinition method = (MemberDefinition) methods.next();
+            MemberDefinition method = methods.next();
 
             if (method.isAbstract()) {
                 return true;
@@ -623,12 +623,11 @@
         // general can return methods which are not visible to the
         // current package.  We need to make sure that these do not
         // prevent this class from being implemented.
-        Iterator otherMethods = intDef.getMethods();
+        Iterator<MemberDefinition> otherMethods = intDef.getMethods();
 
         while (otherMethods.hasNext()) {
             // Get one of the methods from intDef...
-            MemberDefinition method =
-                (MemberDefinition) otherMethods.next();
+            MemberDefinition method = otherMethods.next();
 
             Identifier name = method.getName();
             Type type = method.getType();
@@ -996,14 +995,14 @@
         MemberDefinition tentative = null;
 
         // A list of other methods which may be maximally specific too.
-        List candidateList = null;
+        List<MemberDefinition> candidateList = null;
 
         // Get all the methods inherited by this class which
         // have the name `methodName'.
-        Iterator methods = allMethods.lookupName(methodName);
+        Iterator<MemberDefinition> methods = allMethods.lookupName(methodName);
 
         while (methods.hasNext()) {
-            MemberDefinition method = (MemberDefinition)methods.next();
+            MemberDefinition method = methods.next();
 
             // See if this method is applicable.
             if (!env.isApplicable(method, argumentTypes)) {
@@ -1046,7 +1045,7 @@
                     // list of other candidates.
                     if (!env.isMoreSpecific(tentative,method)) {
                         if (candidateList == null) {
-                            candidateList = new ArrayList();
+                            candidateList = new ArrayList<>();
                         }
                         candidateList.add(method);
                     }
@@ -1057,9 +1056,9 @@
         if (tentative != null && candidateList != null) {
             // Find out if our `tentative' match is a uniquely
             // maximally specific.
-            Iterator candidates = candidateList.iterator();
+            Iterator<MemberDefinition> candidates = candidateList.iterator();
             while (candidates.hasNext()) {
-                MemberDefinition method = (MemberDefinition)candidates.next();
+                MemberDefinition method = candidates.next();
                 if (!env.isMoreSpecific(tentative, method)) {
                     throw new AmbiguousMember(tentative, method);
                 }
@@ -1186,13 +1185,13 @@
     // methods so that we can correctly detect that this class is
     // indeed abstract and so that we can give somewhat comprehensible
     // error messages.
-    private List permanentlyAbstractMethods = new ArrayList();
+    private List<MemberDefinition> permanentlyAbstractMethods = new ArrayList<>();
 
     /**
      * This method returns an Iterator of all abstract methods
      * in our superclasses which we are unable to implement.
      */
-    protected Iterator getPermanentlyAbstractMethods() {
+    protected Iterator<MemberDefinition> getPermanentlyAbstractMethods() {
         // This method can only be called after collectInheritedMethods.
         if (allMethods == null) {
             throw new CompilerError("isPermanentlyAbstract() called early");
@@ -1239,10 +1238,10 @@
 
         try {
             ClassDefinition pClass = parent.getClassDefinition(env);
-            Iterator methods = pClass.getMethods(env);
+            Iterator<MemberDefinition> methods = pClass.getMethods(env);
             while (methods.hasNext()) {
                 MemberDefinition method =
-                    (MemberDefinition) methods.next();
+                    methods.next();
 
                 // Private methods are not inherited.
                 //
@@ -1522,7 +1521,7 @@
             // Make sure that we add all unimplementable methods from our
             // superclass to our list of unimplementable methods.
             ClassDefinition sc = scDecl.getClassDefinition();
-            Iterator supIter = sc.getPermanentlyAbstractMethods();
+            Iterator<MemberDefinition> supIter = sc.getPermanentlyAbstractMethods();
             while (supIter.hasNext()) {
                 permanentlyAbstractMethods.add(supIter.next());
             }
@@ -1587,7 +1586,7 @@
      * Get an Iterator of all methods which could be accessed in an
      * instance of this class.
      */
-    public Iterator getMethods(Environment env) {
+    public Iterator<MemberDefinition> getMethods(Environment env) {
         if (allMethods == null) {
             collectInheritedMethods(env);
         }
@@ -1599,7 +1598,7 @@
      * instance of this class.  Throw a compiler error if we haven't
      * generated this information yet.
      */
-    public Iterator getMethods() {
+    public Iterator<MemberDefinition> getMethods() {
         if (allMethods == null) {
             throw new CompilerError("getMethods: too early");
         }
@@ -1636,7 +1635,7 @@
      * affect our compilation.
      */
     protected void addMirandaMethods(Environment env,
-                                     Iterator mirandas) {
+                                     Iterator<MemberDefinition> mirandas) {
         // do nothing.
     }
 
@@ -1921,11 +1920,11 @@
             // insert this at the front, because of initialization order
             field.nextMember = firstMember;
             firstMember = field;
-            field.nextMatch = (MemberDefinition)fieldHash.get(field.name);
+            field.nextMatch = fieldHash.get(field.name);
         } else {
             lastMember.nextMember = field;
             lastMember = field;
-            field.nextMatch = (MemberDefinition)fieldHash.get(field.name);
+            field.nextMatch = fieldHash.get(field.name);
         }
         fieldHash.put(field.name, field);
     }
@@ -2013,13 +2012,13 @@
         if (localClasses == null) {
             return null;
         } else {
-            return (ClassDefinition)localClasses.get(name);
+            return localClasses.get(name);
         }
     }
 
     public void addLocalClass(ClassDefinition c, String name) {
         if (localClasses == null) {
-            localClasses = new Hashtable(LOCAL_CLASSES_SIZE);
+            localClasses = new Hashtable<>(LOCAL_CLASSES_SIZE);
         }
         localClasses.put(name, c);
     }
--- a/jdk/src/share/classes/sun/tools/java/ClassPath.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/ClassPath.java	Fri Aug 08 11:36:48 2014 -0700
@@ -233,11 +233,11 @@
     /**
      * Returns list of files given a package name and extension.
      */
-    public Enumeration getFiles(String pkg, String ext) {
-        Hashtable files = new Hashtable();
+    public Enumeration<ClassFile> getFiles(String pkg, String ext) {
+        Hashtable<String, ClassFile> files = new Hashtable<>();
         for (int i = path.length; --i >= 0; ) {
             if (path[i].zip != null) {
-                Enumeration e = path[i].zip.entries();
+                Enumeration<? extends ZipEntry> e = path[i].zip.entries();
                 while (e.hasMoreElements()) {
                     ZipEntry entry = (ZipEntry)e.nextElement();
                     String name = entry.getName();
@@ -287,9 +287,9 @@
     File dir;
     ZipFile zip;
 
-    Hashtable subdirs = new Hashtable(29); // cache of sub-directory listings
+    Hashtable<String, String[]> subdirs = new Hashtable<>(29); // cache of sub-directory listings:
     String[] getFiles(String subdir) {
-        String files[] = (String[]) subdirs.get(subdir);
+        String files[] = subdirs.get(subdir);
         if (files == null) {
             // search the directory, exactly once
             File sd = new File(dir.getPath(), subdir);
--- a/jdk/src/share/classes/sun/tools/java/Identifier.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/Identifier.java	Fri Aug 08 11:36:48 2014 -0700
@@ -58,7 +58,7 @@
     /**
      * The hashtable of identifiers
      */
-    static Hashtable hash = new Hashtable(3001, 0.5f);
+    static Hashtable<String, Identifier> hash = new Hashtable<>(3001, 0.5f);
 
     /**
      * The name of the identifier
@@ -115,7 +115,7 @@
      */
     public static synchronized Identifier lookup(String s) {
         //System.out.println("lookup(" + s + ")");
-        Identifier id = (Identifier)hash.get(s);
+        Identifier id = hash.get(s);
         if (id == null) {
             hash.put(s, id = new Identifier(s));
         }
--- a/jdk/src/share/classes/sun/tools/java/Imports.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/Imports.java	Fri Aug 08 11:36:48 2014 -0700
@@ -67,20 +67,20 @@
     /**
      * The imported classes, including memoized imports from packages.
      */
-    Hashtable classes = new Hashtable();
+    Hashtable<Identifier, Identifier> classes = new Hashtable<>();
 
     /**
      * The imported package identifiers.  This will not contain duplicate
      * imports for the same package.  It will also not contain the
      * current package.
      */
-    Vector packages = new Vector();
+    Vector<IdentifierToken> packages = new Vector<>();
 
     /**
      * The (originally) imported classes.
      * A vector of IdentifierToken.
      */
-    Vector singles = new Vector();
+    Vector<IdentifierToken> singles = new Vector<>();
 
     /**
      * Are the import names checked yet?
@@ -134,9 +134,9 @@
         //     }
         // }
 
-        Vector resolvedPackages = new Vector();
-        for (Enumeration e = packages.elements() ; e.hasMoreElements() ;) {
-            IdentifierToken t = (IdentifierToken)e.nextElement();
+        Vector<IdentifierToken> resolvedPackages = new Vector<>();
+        for (Enumeration<IdentifierToken> e = packages.elements() ; e.hasMoreElements() ;) {
+            IdentifierToken t = e.nextElement();
             Identifier nm = t.getName();
             long where = t.getWhere();
 
@@ -175,8 +175,8 @@
         }
         packages = resolvedPackages;
 
-        for (Enumeration e = singles.elements() ; e.hasMoreElements() ;) {
-            IdentifierToken t = (IdentifierToken)e.nextElement();
+        for (Enumeration<IdentifierToken> e = singles.elements() ; e.hasMoreElements() ;) {
+            IdentifierToken t = e.nextElement();
             Identifier nm = t.getName();
             long where = t.getWhere();
             Identifier pkg = nm.getQualifier();
@@ -191,7 +191,7 @@
             Identifier snm = nm.getFlatName().getName();
 
             // make sure it isn't already imported explicitly
-            Identifier className = (Identifier)classes.get(snm);
+            Identifier className = classes.get(snm);
             if (className != null) {
                 Identifier f1 = Identifier.lookup(className.getQualifier(),
                                                   className.getFlatName());
@@ -280,7 +280,7 @@
         }
 
         // Check if it was imported before
-        Identifier className = (Identifier)classes.get(nm);
+        Identifier className = classes.get(nm);
         if (className != null) {
             if (tracing) env.dtExit("Imports.resolve: PREVIOUSLY IMPORTED " + nm);
             return className;
@@ -303,9 +303,9 @@
         } else {
             // If it isn't in the current package, try to find it in
             // our import-on-demands.
-            Enumeration e = packages.elements();
+            Enumeration<IdentifierToken> e = packages.elements();
             while (e.hasMoreElements()) {
-                IdentifierToken t = (IdentifierToken)e.nextElement();
+                IdentifierToken t = e.nextElement();
                 id = Identifier.lookup(t.getName(), nm);
 
                 if (importable(id, env)) {
@@ -386,7 +386,7 @@
         if (nm.isQualified())
             return nm;
 
-        Identifier className = (Identifier)classes.get(nm);
+        Identifier className = classes.get(nm);
         if (className != null) {
             return className;
         }
@@ -425,7 +425,7 @@
         // added to the list, ignore it.
         final int size = packages.size();
         for (int i = 0; i < size; i++) {
-            if (name == ((IdentifierToken)packages.elementAt(i)).getName()) {
+            if (name == (packages.elementAt(i)).getName()) {
                 return;
             }
         }
@@ -464,7 +464,7 @@
      * Return an unmodifiable list of IdentifierToken representing
      * packages specified as imports.
      */
-    public List getImportedPackages() {
+    public List<IdentifierToken> getImportedPackages() {
         return Collections.unmodifiableList(packages);
     }
 
@@ -472,7 +472,7 @@
      * Return an unmodifiable list of IdentifierToken representing
      * classes specified as imports.
      */
-    public List getImportedClasses() {
+    public List<IdentifierToken> getImportedClasses() {
         return Collections.unmodifiableList(singles);
     }
 
--- a/jdk/src/share/classes/sun/tools/java/MemberDefinition.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/MemberDefinition.java	Fri Aug 08 11:36:48 2014 -0700
@@ -103,7 +103,7 @@
      * uniqueness of proxy objects.  See the makeProxyMember method
      * defined below.
      */
-    static private Map proxyCache;
+    static private Map<String,MemberDefinition> proxyCache;
 
     /**
      * Create a member which is externally the same as `field' but
@@ -126,12 +126,12 @@
                                                    Environment env) {
 
         if (proxyCache == null) {
-            proxyCache = new HashMap();
+            proxyCache = new HashMap<>();
         }
 
         String key = field.toString() + "@" + classDef.toString();
         // System.out.println("Key is : " + key);
-        MemberDefinition proxy = (MemberDefinition)proxyCache.get(key);
+        MemberDefinition proxy = proxyCache.get(key);
 
         if (proxy != null)
             return proxy;
@@ -217,8 +217,8 @@
     /**
      * Get arguments (a vector of LocalMember)
      */
-    public Vector getArguments() {
-        return isMethod() ? new Vector() : null;
+    public Vector<MemberDefinition> getArguments() {
+        return isMethod() ? new Vector<>() : null;
     }
 
     /**
--- a/jdk/src/share/classes/sun/tools/java/MethodSet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/MethodSet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
      * A Map containing Lists of MemberDefinitions.  The Lists
      * contain methods which share the same name.
      */
-    private final Map lookupMap;
+    private final Map<Identifier,List<MemberDefinition>> lookupMap;
 
     /**
      * The number of methods stored in the MethodSet.
@@ -63,7 +63,7 @@
      */
     public MethodSet() {
         frozen = false;
-        lookupMap = new HashMap();
+        lookupMap = new HashMap<>();
         count = 0;
     }
 
@@ -89,12 +89,12 @@
             Identifier name = method.getName();
 
             // Get a List containing all methods of this name.
-            List methodList = (List) lookupMap.get(name);
+            List<MemberDefinition> methodList = lookupMap.get(name);
 
             if (methodList == null) {
                 // There is no method with this name already.
                 // Create a List, and insert it into the hash.
-                methodList = new ArrayList();
+                methodList = new ArrayList<>();
                 lookupMap.put(name, methodList);
             }
 
@@ -102,7 +102,7 @@
             // been added to the MethodSet.
             int size = methodList.size();
             for (int i = 0; i < size; i++) {
-                if (((MemberDefinition) methodList.get(i))
+                if ((methodList.get(i))
                     .getType().equalArguments(method.getType())) {
                     throw new CompilerError("duplicate addition");
                 }
@@ -128,12 +128,12 @@
             Identifier name = method.getName();
 
             // Get a List containing all methods of this name.
-            List methodList = (List) lookupMap.get(name);
+            List<MemberDefinition> methodList = lookupMap.get(name);
 
             if (methodList == null) {
                 // There is no method with this name already.
                 // Create a List, and insert it into the hash.
-                methodList = new ArrayList();
+                methodList = new ArrayList<>();
                 lookupMap.put(name, methodList);
             }
 
@@ -141,7 +141,7 @@
             // `method'.
             int size = methodList.size();
             for (int i = 0; i < size; i++) {
-                if (((MemberDefinition) methodList.get(i))
+                if ((methodList.get(i))
                     .getType().equalArguments(method.getType())) {
                     methodList.set(i, method);
                     return;
@@ -160,11 +160,11 @@
     public MemberDefinition lookupSig(Identifier name, Type type) {
         // Go through all methods of the same name and see if any
         // have the right signature.
-        Iterator matches = lookupName(name);
+        Iterator<MemberDefinition> matches = lookupName(name);
         MemberDefinition candidate;
 
         while (matches.hasNext()) {
-            candidate = (MemberDefinition) matches.next();
+            candidate = matches.next();
             if (candidate.getType().equalArguments(type)) {
                 return candidate;
             }
@@ -178,10 +178,10 @@
      * Returns an Iterator of all methods contained in the
      * MethodSet which have a given name.
      */
-    public Iterator lookupName(Identifier name) {
+    public Iterator<MemberDefinition> lookupName(Identifier name) {
         // Find the List containing all methods of this name, and
         // return that List's Iterator.
-        List methodList = (List) lookupMap.get(name);
+        List<MemberDefinition> methodList = lookupMap.get(name);
         if (methodList == null) {
             // If there is no method of this name, return a bogus, empty
             // Iterator.
@@ -193,22 +193,21 @@
     /**
      * Returns an Iterator of all methods in the MethodSet
      */
-    public Iterator iterator() {
+    public Iterator<MemberDefinition> iterator() {
 
         //----------------------------------------------------------
         // The inner class MethodIterator is used to create our
         // Iterator of all methods in the MethodSet.
-        class MethodIterator implements Iterator {
-            Iterator hashIter = lookupMap.values().iterator();
-            Iterator listIter = Collections.emptyIterator();
+        class MethodIterator implements Iterator<MemberDefinition> {
+            Iterator<List<MemberDefinition>> hashIter = lookupMap.values().iterator();
+            Iterator<MemberDefinition> listIter = Collections.emptyIterator();
 
             public boolean hasNext() {
                 if (listIter.hasNext()) {
                     return true;
                 } else {
                     if (hashIter.hasNext()) {
-                        listIter = ((List) hashIter.next())
-                            .iterator();
+                        listIter = hashIter.next().iterator();
 
                         // The following should be always true.
                         if (listIter.hasNext()) {
@@ -224,7 +223,7 @@
                 return false;
             }
 
-            public Object next() {
+            public MemberDefinition next() {
                 return listIter.next();
             }
 
@@ -262,7 +261,7 @@
     public String toString() {
         int len = size();
         StringBuilder sb = new StringBuilder();
-        Iterator all = iterator();
+        Iterator<MemberDefinition> all = iterator();
         sb.append("{");
 
         while (all.hasNext()) {
--- a/jdk/src/share/classes/sun/tools/java/Package.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/Package.java	Fri Aug 08 11:36:48 2014 -0700
@@ -144,11 +144,11 @@
         return null;
     }
 
-    public Enumeration getSourceFiles() {
+    public Enumeration<ClassFile> getSourceFiles() {
         return sourcePath.getFiles(pkg, ".java");
     }
 
-    public Enumeration getBinaryFiles() {
+    public Enumeration<ClassFile> getBinaryFiles() {
         return binaryPath.getFiles(pkg, ".class");
     }
 
--- a/jdk/src/share/classes/sun/tools/java/Parser.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/Parser.java	Fri Aug 08 11:36:48 2014 -0700
@@ -392,8 +392,8 @@
             if (superName == null) {
                 env.error(type.getWhere(), "type.expected");
             }
-            Vector ext = new Vector(1);
-            Vector impl = new Vector(0);
+            Vector<IdentifierToken> ext = new Vector<>(1);
+            Vector<IdentifierToken> impl = new Vector<>(0);
             ext.addElement(new IdentifierToken(idNull));
             if (token == IMPLEMENTS || token == EXTENDS) {
                 env.error(pos, "anonymous.extends");
@@ -1682,7 +1682,7 @@
             // Parse and ignore throws clause
             IdentifierToken exp[] = null;
             if (token == THROWS) {
-                Vector v = new Vector();
+                Vector<IdentifierToken> v = new Vector<>();
                 scan();
                 v.addElement(parseName(false));
                 while (token == COMMA) {
@@ -1890,8 +1890,8 @@
         long p = pos;
         expect(IDENT);
 
-        Vector ext = new Vector();
-        Vector impl = new Vector();
+        Vector<IdentifierToken> ext = new Vector<>();
+        Vector<IdentifierToken> impl = new Vector<>();
         parseInheritance(ext, impl);
 
         ClassDefinition tmp = parseClassBody(nm, mod, ctx, doc, ext, impl, p);
@@ -1901,7 +1901,7 @@
         return tmp;
     }
 
-    protected void parseInheritance(Vector ext, Vector impl) throws SyntaxError, IOException {
+    protected void parseInheritance(Vector<IdentifierToken> ext, Vector<IdentifierToken> impl) throws SyntaxError, IOException {
         // Parse extends clause
         if (token == EXTENDS) {
             scan();
@@ -1929,23 +1929,23 @@
      */
     protected ClassDefinition parseClassBody(IdentifierToken nm, int mod,
                                              int ctx, String doc,
-                                             Vector ext, Vector impl, long p
+                                             Vector<IdentifierToken> ext, Vector<IdentifierToken> impl, long p
                                              ) throws SyntaxError, IOException {
         // Decide which is the super class
         IdentifierToken sup = null;
         if ((mod & M_INTERFACE) != 0) {
             if (impl.size() > 0) {
-                env.error(((IdentifierToken)impl.elementAt(0)).getWhere(),
+                env.error(impl.elementAt(0).getWhere(),
                           "intf.impl.intf");
             }
             impl = ext;
         } else {
             if (ext.size() > 0) {
                 if (ext.size() > 1) {
-                    env.error(((IdentifierToken)ext.elementAt(1)).getWhere(),
+                    env.error(ext.elementAt(1).getWhere(),
                               "multiple.inherit");
                 }
-                sup = (IdentifierToken)ext.elementAt(0);
+                sup = ext.elementAt(0);
             }
         }
 
--- a/jdk/src/share/classes/sun/tools/java/Type.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/java/Type.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * This hashtable is used to cache types
      */
-    private static final Hashtable typeHash = new Hashtable(231);
+    private static final Hashtable<String, Type> typeHash = new Hashtable<>(231);
 
     /**
      * The TypeCode of this type. The value of this field is one
@@ -169,7 +169,7 @@
      */
     public static synchronized Type tArray(Type elem) {
         String sig = new String(SIG_ARRAY + elem.getTypeSignature());
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new ArrayType(sig, elem);
         }
@@ -213,7 +213,7 @@
             new String(SIG_CLASS +
                        className.toString().replace('.', SIGC_PACKAGE) +
                        SIG_ENDCLASS);
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new ClassType(sig, className);
         }
@@ -283,7 +283,7 @@
         sb.append(returnType.getTypeSignature());
 
         String sig = sb.toString();
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new MethodType(sig, returnType, argTypes);
         }
@@ -309,7 +309,7 @@
      * @exception CompilerError invalid type signature.
      */
     public static synchronized Type tType(String sig) {
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t != null) {
             return t;
         }
--- a/jdk/src/share/classes/sun/tools/javac/BatchEnvironment.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/BatchEnvironment.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,17 +61,17 @@
     /**
      * A hashtable of resource contexts.
      */
-    Hashtable packages = new Hashtable(31);
+    Hashtable<Identifier, Package> packages = new Hashtable<>(31);
 
     /**
      * The classes, in order of appearance.
      */
-    Vector classesOrdered = new Vector();
+    Vector<ClassDeclaration> classesOrdered = new Vector<>();
 
     /**
      * The classes, keyed by ClassDeclaration.
      */
-    Hashtable classes = new Hashtable(351);
+    Hashtable<Type, ClassDeclaration> classes = new Hashtable<>(351);
 
     /**
      * flags
@@ -106,7 +106,7 @@
     /**
      * A list of files containing deprecation warnings.
      */
-    Vector deprecationFiles = new Vector();
+    Vector<Object> deprecationFiles = new Vector<>();
 
         /**
          * writes out error messages
@@ -271,7 +271,7 @@
      * Return an enumeration of all the currently defined classes
      * in order of appearance to getClassDeclaration().
      */
-    public Enumeration getClasses() {
+    public Enumeration<ClassDeclaration> getClasses() {
         return classesOrdered.elements();
     }
 
@@ -280,7 +280,7 @@
      * check in Imports#resolve().  These are the current packages for
      * all classes being compiled as of the first call to isExemptPackage.
      */
-    private Set exemptPackages;
+    private Set<Identifier> exemptPackages;
 
     /**
      * Tells whether an Identifier refers to a package which should be
@@ -317,11 +317,11 @@
         // will be exempt from the "exists" check in
         // sun.tools.java.Imports#resolve().
 
-        exemptPackages = new HashSet(101);
+        exemptPackages = new HashSet<>(101);
 
         // Add all of the current packages and their prefixes to our set.
-        for (Enumeration e = getClasses(); e.hasMoreElements(); ) {
-            ClassDeclaration c = (ClassDeclaration) e.nextElement();
+        for (Enumeration<ClassDeclaration> e = getClasses(); e.hasMoreElements(); ) {
+            ClassDeclaration c = e.nextElement();
             if (c.getStatus() == CS_PARSED) {
                 SourceClass def = (SourceClass) c.getClassDefinition();
                 if (def.isLocal())
@@ -389,7 +389,7 @@
     }
 
     public ClassDeclaration getClassDeclaration(Type t) {
-        ClassDeclaration c = (ClassDeclaration)classes.get(t);
+        ClassDeclaration c = classes.get(t);
         if (c == null) {
             classes.put(t, c = new ClassDeclaration(t.getClassName()));
             classesOrdered.addElement(c);
@@ -407,7 +407,7 @@
         }
         Type t = Type.tClass(nm);
         try {
-            ClassDeclaration c = (ClassDeclaration)classes.get(t);
+            ClassDeclaration c = classes.get(t);
             return (c != null) ? c.getName().equals(nm) :
                 getPackage(nm.getQualifier()).classExists(nm.getName());
         } catch (IOException e) {
@@ -448,7 +448,7 @@
      * Get the package path for a package
      */
     public Package getPackage(Identifier pkg) throws IOException {
-        Package p = (Package)packages.get(pkg);
+        Package p = packages.get(pkg);
         if (p == null) {
             packages.put(pkg, p = new Package(sourcePath, binaryPath, pkg));
         }
@@ -527,10 +527,10 @@
             // (Fix for 4107960).
             //
             // The dependency code was previously in BatchParser.java.
-            Enumeration e = p.classes.elements();
+            Enumeration<SourceClass> e = p.classes.elements();
 
             // first will not be an inner class.
-            ClassDefinition first = (ClassDefinition) e.nextElement();
+            ClassDefinition first = e.nextElement();
             if (first.isInnerClass()) {
                 throw new CompilerError("BatchEnvironment, first is inner");
             }
@@ -538,7 +538,7 @@
             ClassDefinition current = first;
             ClassDefinition next;
             while (e.hasMoreElements()) {
-                next = (ClassDefinition) e.nextElement();
+                next = e.nextElement();
                 // Don't chain in inner classes.
                 if (next.isInnerClass()) {
                     continue;
@@ -607,7 +607,7 @@
     /**
      * Load a binary class
      */
-    boolean needsCompilation(Hashtable check, ClassDeclaration c) {
+    boolean needsCompilation(Hashtable<ClassDeclaration, ClassDeclaration> check, ClassDeclaration c) {
         switch (c.getStatus()) {
 
           case CS_UNDEFINED:
@@ -621,8 +621,8 @@
                 check.put(c, c);
 
                 BinaryClass bin = (BinaryClass)c.getClassDefinition();
-                for (Enumeration e = bin.getDependencies() ; e.hasMoreElements() ;) {
-                    ClassDeclaration dep = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = bin.getDependencies() ; e.hasMoreElements() ;) {
+                    ClassDeclaration dep = e.nextElement();
                     if (needsCompilation(check, dep)) {
                         // It must be source, dependencies need compilation
                         c.setDefinition(bin, CS_SOURCE);
@@ -829,11 +829,11 @@
 
           case CS_UNDECIDED: {
             if (tracing) dtEvent("loadDefinition: STATUS IS UNDECIDED");
-            Hashtable tab = new Hashtable();
+            Hashtable<ClassDeclaration, ClassDeclaration> tab = new Hashtable<>();
             if (!needsCompilation(tab, c)) {
                 // All undecided classes that this class depends on must be binary
-                for (Enumeration e = tab.keys() ; e.hasMoreElements() ; ) {
-                    ClassDeclaration dep = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = tab.keys() ; e.hasMoreElements() ; ) {
+                    ClassDeclaration dep = e.nextElement();
                     if (dep.getStatus() == CS_UNDECIDED) {
                         // must be binary, dependencies need compilation
                         dep.setDefinition(dep.getClassDefinition(), CS_BINARY);
@@ -1015,9 +1015,17 @@
         return sourceClass;
     }
 
+    /*
+     * makeMemberDefinition method is left with rawtypes and with lint messages suppressed.
+     * The addition of Generics to com.sun.tools.* has uncovered an inconsistency
+     * in usage though tools still work correctly as long as this function is allowed to
+     * function as is.
+     */
+
     /**
      * Create a new field.
      */
+    @SuppressWarnings({"rawtypes","unchecked"})
     public MemberDefinition makeMemberDefinition(Environment origEnv, long where,
                                                ClassDefinition clazz,
                                                String doc, int modifiers,
--- a/jdk/src/share/classes/sun/tools/javac/BatchParser.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/BatchParser.java	Fri Aug 08 11:36:48 2014 -0700
@@ -56,7 +56,7 @@
     /**
      * The classes defined in this file
      */
-    protected Vector classes;
+    protected Vector<SourceClass> classes;
 
 
     /**
@@ -76,7 +76,7 @@
         super(env, in);
 
         imports = new Imports(env);
-        classes = new Vector();
+        classes = new Vector<>();
         toplevelEnv = imports.newEnvironment(env);
     }
 
--- a/jdk/src/share/classes/sun/tools/javac/CompilerMember.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/CompilerMember.java	Fri Aug 08 11:36:48 2014 -0700
@@ -38,7 +38,7 @@
  */
 @Deprecated
 final
-class CompilerMember implements Comparable {
+class CompilerMember implements Comparable<Object> {
     MemberDefinition field;
     Assembler asm;
     Object value;
--- a/jdk/src/share/classes/sun/tools/javac/Main.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/Main.java	Fri Aug 08 11:36:48 2014 -0700
@@ -212,7 +212,7 @@
 //end JCOV
         int flags = F_WARNINGS | F_DEBUG_LINES | F_DEBUG_SOURCE;
         long tm = System.currentTimeMillis();
-        Vector v = new Vector();
+        Vector<String> v = new Vector<>();
         boolean nowrite = false;
         String props = null;
         String encoding = null;
@@ -500,8 +500,8 @@
 
         try {
             // Parse all input files
-            for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
-                File file = new File((String)e.nextElement());
+            for (Enumeration<String> e = v.elements() ; e.hasMoreElements() ;) {
+                File file = new File(e.nextElement());
                 try {
                     env.parseFile(new ClassFile(file));
                 } catch (FileNotFoundException ee) {
@@ -512,8 +512,8 @@
 
             // Do a post-read check on all newly-parsed classes,
             // after they have all been read.
-            for (Enumeration e = env.getClasses() ; e.hasMoreElements() ; ) {
-                ClassDeclaration c = (ClassDeclaration)e.nextElement();
+            for (Enumeration<ClassDeclaration> e = env.getClasses() ; e.hasMoreElements() ; ) {
+                ClassDeclaration c = e.nextElement();
                 if (c.getStatus() == CS_PARSED) {
                     if (c.getClassDefinition().isLocal())
                         continue;
@@ -531,8 +531,8 @@
             do {
                 done = true;
                 env.flushErrors();
-                for (Enumeration e = env.getClasses() ; e.hasMoreElements() ; ) {
-                    ClassDeclaration c = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = env.getClasses() ; e.hasMoreElements() ; ) {
+                    ClassDeclaration c = e.nextElement();
                     SourceClass src;
 
                     switch (c.getStatus()) {
--- a/jdk/src/share/classes/sun/tools/javac/SourceClass.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/SourceClass.java	Fri Aug 08 11:36:48 2014 -0700
@@ -70,7 +70,7 @@
    /**
      * The list of class dependencies
      */
-    Hashtable deps = new Hashtable(11);
+    Hashtable<ClassDeclaration, ClassDeclaration> deps = new Hashtable<>(11);
 
     /**
      * The field used to represent "this" in all of my code.
@@ -357,7 +357,7 @@
                     f.addModifiers(M_ABSTRACT);
                 }
             }
-            Vector arguments = f.getArguments();
+            Vector<MemberDefinition> arguments = f.getArguments();
             if (arguments != null) {
                 // arguments can be null if this is an implicit abstract method
                 int argumentLength = arguments.size();
@@ -921,9 +921,9 @@
             // Tell the user which methods force this class to be abstract.
 
             // First list all of the "unimplementable" abstract methods.
-            Iterator iter = getPermanentlyAbstractMethods();
+            Iterator<MemberDefinition> iter = getPermanentlyAbstractMethods();
             while (iter.hasNext()) {
-                MemberDefinition method = (MemberDefinition) iter.next();
+                MemberDefinition method = iter.next();
                 // We couldn't override this method even if we
                 // wanted to.  Try to make the error message
                 // as non-confusing as possible.
@@ -937,7 +937,7 @@
             while (iter.hasNext()) {
                 // For each method, check if it is abstract.  If it is,
                 // output an appropriate error message.
-                MemberDefinition method = (MemberDefinition) iter.next();
+                MemberDefinition method = iter.next();
                 if (method.isAbstract()) {
                     env.error(where, "abstract.class",
                               getClassDeclaration(), method,
@@ -1163,11 +1163,10 @@
      * sun/tools/java/ClassDeclaration.java
      */
     protected void addMirandaMethods(Environment env,
-                                     Iterator mirandas) {
+                                     Iterator<MemberDefinition> mirandas) {
 
         while(mirandas.hasNext()) {
-            MemberDefinition method =
-                (MemberDefinition)mirandas.next();
+            MemberDefinition method = mirandas.next();
 
             addMember(method);
 
@@ -2040,7 +2039,7 @@
      * is used to stop two compilations from saving the
      * same class.
      */
-    private static Vector active = new Vector();
+    private static Vector<Object> active = new Vector<>();
 
     /**
      * Compile this class
@@ -2082,9 +2081,9 @@
 
     protected void compileClass(Environment env, OutputStream out)
                 throws IOException, ClassNotFound {
-        Vector variables = new Vector();
-        Vector methods = new Vector();
-        Vector innerClasses = new Vector();
+        Vector<CompilerMember> variables = new Vector<>();
+        Vector<CompilerMember> methods = new Vector<>();
+        Vector<ClassDefinition> innerClasses = new Vector<>();
         CompilerMember init = new CompilerMember(new MemberDefinition(getWhere(), this, M_STATIC, Type.tMethod(Type.tVoid), idClassInit, null, null), new Assembler());
         Context ctx = new Context((Context)null, init.field);
 
@@ -2243,8 +2242,8 @@
             methods.setElementAt(ordered_methods[i], i);
 
         // Optimize Code and Collect method constants
-        for (Enumeration e = methods.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = methods.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             try {
                 f.asm.optimize(env);
                 f.asm.collect(env, f.field, tab);
@@ -2262,8 +2261,8 @@
         }
 
         // Collect field constants
-        for (Enumeration e = variables.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = variables.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             tab.put(f.name);
             tab.put(f.sig);
 
@@ -2274,9 +2273,9 @@
         }
 
         // Collect inner class constants
-        for (Enumeration e = innerClasses.elements();
+        for (Enumeration<ClassDefinition> e = innerClasses.elements();
              e.hasMoreElements() ; ) {
-            ClassDefinition inner = (ClassDefinition)e.nextElement();
+            ClassDefinition inner = e.nextElement();
             tab.put(inner.getClassDeclaration());
 
             // If the inner class is local, we do not need to add its
@@ -2368,8 +2367,8 @@
         DataOutputStream databuf = new DataOutputStream(buf);
 
         data.writeShort(variables.size());
-        for (Enumeration e = variables.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = variables.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             Object val = f.field.getInitialValue();
 
             data.writeShort(f.field.getModifiers() & MM_FIELD);
@@ -2400,8 +2399,8 @@
         // write methods
 
         data.writeShort(methods.size());
-        for (Enumeration e = methods.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = methods.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
 
             int xmods = f.field.getModifiers() & MM_METHOD;
             // Transform floating point modifiers.  M_STRICTFP
@@ -2530,7 +2529,7 @@
             data.writeShort(tab.index("InnerClasses"));
             data.writeInt(2 + 2*4*innerClasses.size());
             data.writeShort(innerClasses.size());
-            for (Enumeration e = innerClasses.elements() ;
+            for (Enumeration<ClassDefinition> e = innerClasses.elements() ;
                  e.hasMoreElements() ; ) {
                 // For each inner class name transformation, we have a record
                 // with the following fields:
@@ -2549,7 +2548,7 @@
                 // See also the initInnerClasses() method in BinaryClass.java.
 
                 // Generate inner_class_info_index.
-                ClassDefinition inner = (ClassDefinition)e.nextElement();
+                ClassDefinition inner = e.nextElement();
                 data.writeShort(tab.index(inner.getClassDeclaration()));
 
                 // Generate outer_class_info_index.
@@ -2662,8 +2661,8 @@
             //  where className1 is the name of the class we are in, and
             //        classname2 is the name of the class className1
             //          is dependent on.
-            for(Enumeration e = deps.elements();  e.hasMoreElements(); ) {
-                ClassDeclaration data = (ClassDeclaration) e.nextElement();
+            for(Enumeration<ClassDeclaration> e = deps.elements();  e.hasMoreElements(); ) {
+                ClassDeclaration data = e.nextElement();
                 // Mangle name of class dependend on.
                 String depName =
                     Type.mangleInnerType(data.getName()).toString();
--- a/jdk/src/share/classes/sun/tools/javac/SourceMember.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/javac/SourceMember.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * The argument names (if it is a method)
      */
-    Vector args;
+    Vector<MemberDefinition> args;
 
     // set to the MemberDefinition in the interface if we have this field because
     // it has been forced on us
@@ -64,7 +64,7 @@
     static final int INLINED    = 4;
     static final int ERROR      = 5;
 
-    public Vector getArguments() {
+    public Vector<MemberDefinition> getArguments() {
         return args;
     }
 
@@ -74,7 +74,7 @@
      */
     public SourceMember(long where, ClassDefinition clazz,
                        String doc, int modifiers, Type type,
-                       Identifier name, Vector argNames,
+                       Identifier name, Vector<MemberDefinition> argNames,
                        IdentifierToken exp[], Node value) {
         super(where, clazz, modifiers, type, name, exp, value);
         this.documentation = doc;
@@ -86,17 +86,17 @@
         }
     }
 
-    void createArgumentFields(Vector argNames) {
+    void createArgumentFields(Vector<MemberDefinition> argNames) {
         // Create a list of arguments
         if (isMethod()) {
-            args = new Vector();
+            args = new Vector<>();
 
             if (isConstructor() || !(isStatic() || isInitializer())) {
                 args.addElement(((SourceClass)clazz).getThisArgument());
             }
 
             if (argNames != null) {
-                Enumeration e = argNames.elements();
+                Enumeration<MemberDefinition> e = argNames.elements();
                 Type argTypes[] = getType().getArgumentTypes();
                 for (int i = 0 ; i < argTypes.length ; i++) {
                     Object x = e.nextElement();
@@ -359,7 +359,7 @@
             getExceptions(env);
 
             if (isMethod()) {
-                Vector argNames = args; args = null;
+                Vector<MemberDefinition> argNames = args; args = null;
                 createArgumentFields(argNames);
                 // Add outer instance argument for constructors.
                 if (isConstructor()) {
@@ -523,7 +523,7 @@
                     // initialize vset, indication that each of the arguments
                     // to the function has a value
 
-                    for (Enumeration e = args.elements(); e.hasMoreElements();){
+                    for (Enumeration<MemberDefinition> e = args.elements(); e.hasMoreElements();){
                         LocalMember f = (LocalMember)e.nextElement();
                         vset.addVar(ctx.declare(env, f));
                     }
@@ -549,7 +549,7 @@
                     //System.out.println("VSET = " + vset);
                     ClassDeclaration exp[] = getExceptions(env);
                     int htsize = (exp.length > 3) ? 17 : 7;
-                    Hashtable thrown = new Hashtable(htsize);
+                    Hashtable<Object, Object> thrown = new Hashtable<>(htsize);
 
                     vset = s.checkMethod(env, ctx, vset, thrown);
 
@@ -558,7 +558,7 @@
                     ClassDeclaration ignore2 =
                         env.getClassDeclaration(idJavaLangRuntimeException);
 
-                    for (Enumeration e = thrown.keys(); e.hasMoreElements();) {
+                    for (Enumeration<Object> e = thrown.keys(); e.hasMoreElements();) {
                         ClassDeclaration c = (ClassDeclaration)e.nextElement();
                         ClassDefinition def = c.getClassDefinition(env);
                         if (def.subClassOf(env, ignore1)
@@ -606,7 +606,7 @@
                         }
                     }
                 } else {
-                    Hashtable thrown = new Hashtable(3);  // small & throw-away
+                    Hashtable<Object, Object> thrown = new Hashtable<>(3);  // small & throw-away
                     Expression val = (Expression)getValue();
 
                     vset = val.checkInitializer(env, ctx, vset,
@@ -636,7 +636,7 @@
                     ClassDeclaration ignore2 =
                         env.getClassDeclaration(idJavaLangRuntimeException);
 
-                    for (Enumeration e = thrown.keys(); e.hasMoreElements(); ) {
+                    for (Enumeration<Object> e = thrown.keys(); e.hasMoreElements(); ) {
                         ClassDeclaration c = (ClassDeclaration)e.nextElement();
                         ClassDefinition def = c.getClassDefinition(env);
 
@@ -707,7 +707,7 @@
                 if ((!isNative()) && (!isAbstract())) {
                     Statement s = (Statement)getValue();
                     Context ctx = new Context((Context)null, this);
-                    for (Enumeration e = args.elements() ; e.hasMoreElements() ;) {
+                    for (Enumeration<MemberDefinition> e = args.elements() ; e.hasMoreElements() ;) {
                         LocalMember local = (LocalMember)e.nextElement();
                         ctx.declare(env, local);
                     }
@@ -812,7 +812,7 @@
                 Context ctx = new Context((Context)null, this);
                 Statement s = (Statement)getValue();
 
-                for (Enumeration e = args.elements() ; e.hasMoreElements() ; ) {
+                for (Enumeration<MemberDefinition> e = args.elements() ; e.hasMoreElements() ; ) {
                     LocalMember f = (LocalMember)e.nextElement();
                     ctx.declare(env, f);
                     //ctx.declare(env, (LocalMember)e.nextElement());
--- a/jdk/src/share/classes/sun/tools/tree/AndExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/AndExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
      *        either the left or right hand side is false
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         // Find out when the left side is true/false
         left.checkCondition(env, ctx, vset, exp, cvars);
         left = convert(env, ctx, Type.tBoolean, left);
--- a/jdk/src/share/classes/sun/tools/tree/ArrayAccessExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ArrayAccessExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -62,7 +62,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
         if (index == null) {
             env.error(where, "array.index.required");
@@ -83,7 +83,7 @@
     }
 
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         if (index == null) {
             vset = right.checkAmbigName(env, ctx, vset, exp, this);
@@ -109,7 +109,7 @@
      * Check the array if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
@@ -117,7 +117,7 @@
      * Check the array if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/ArrayExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ArrayExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,11 +47,11 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.array.expr");
         return vset;
     }
-    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable exp) {
+    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable<Object, Object> exp) {
         if (!t.isType(TC_ARRAY)) {
             if (!t.isType(TC_ERROR)) {
                 env.error(where, "invalid.array.init", t);
--- a/jdk/src/share/classes/sun/tools/tree/AssignExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/AssignExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check an assignment expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (left instanceof IdentifierExpression) {
             // we don't want to mark an identifier as having a value
             // until having evaluated the right-hand side
--- a/jdk/src/share/classes/sun/tools/tree/AssignOpExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/AssignOpExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -149,7 +149,7 @@
     /**
      * Check an assignment expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkAssignOp(env, ctx, vset, exp, this);
         vset = right.checkValue(env, ctx, vset, exp);
         int tm = left.type.getTypeMask() | right.type.getTypeMask();
--- a/jdk/src/share/classes/sun/tools/tree/BinaryAssignExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryAssignExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -67,7 +67,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object,Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/BinaryExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -64,7 +64,7 @@
     /**
      * Check a binary expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkValue(env, ctx, vset, exp);
         vset = right.checkValue(env, ctx, vset, exp);
 
--- a/jdk/src/share/classes/sun/tools/tree/BinaryLogicalExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryLogicalExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
      * Check a binary expression
      */
     public Vset checkValue(Environment env, Context ctx,
-                           Vset vset, Hashtable exp) {
+                           Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = new ConditionVars();
         // evaluate the logical expression, determining which variables are
         // set if the resulting value is true or false
@@ -61,7 +61,7 @@
      */
     abstract
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars);
+                               Hashtable<Object, Object> exp, ConditionVars cvars);
 
 
     /**
--- a/jdk/src/share/classes/sun/tools/tree/BooleanExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/BooleanExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -86,7 +86,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx,
-                               Vset vset, Hashtable exp, ConditionVars cvars) {
+                               Vset vset, Hashtable<Object, Object> exp, ConditionVars cvars) {
         if (value) {
             cvars.vsFalse = Vset.DEAD_END;
             cvars.vsTrue = vset;
--- a/jdk/src/share/classes/sun/tools/tree/BreakStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/BreakStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -51,7 +51,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         reach(env, vset);
         checkLabel(env, ctx);
         CheckContext destctx = (CheckContext)new CheckContext(ctx, this).getBreakContext(lbl);
--- a/jdk/src/share/classes/sun/tools/tree/CaseStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/CaseStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (expr != null) {
             expr.checkValue(env, ctx, vset, exp);
             expr = convert(env, ctx, Type.tInt, expr);
--- a/jdk/src/share/classes/sun/tools/tree/CastExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/CastExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,7 +48,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         type = left.toType(env, ctx);
         vset = right.checkValue(env, ctx, vset, exp);
 
--- a/jdk/src/share/classes/sun/tools/tree/CatchStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/CatchStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -67,7 +67,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = reach(env, vset);
         ctx = new Context(ctx, this);
         Type type = texpr.toType(env, ctx);
--- a/jdk/src/share/classes/sun/tools/tree/CommaExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/CommaExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.check(env, ctx, vset, exp);
         vset = right.check(env, ctx, vset, exp);
         return vset;
--- a/jdk/src/share/classes/sun/tools/tree/CompoundStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/CompoundStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -70,7 +70,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         if (args.length > 0) {
             vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/ConditionalExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ConditionalExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -64,7 +64,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = cond.checkCondition(env, ctx, vset, exp);
         vset = left.checkValue(env, ctx, cvars.vsTrue, exp).join(
                right.checkValue(env, ctx, cvars.vsFalse, exp) );
@@ -107,7 +107,7 @@
         return vset;
     }
 
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = cond.checkValue(env, ctx, vset, exp);
         cond = convert(env, ctx, Type.tBoolean, cond);
         return left.check(env, ctx, vset.copy(), exp).join(right.check(env, ctx, vset, exp));
--- a/jdk/src/share/classes/sun/tools/tree/ContinueStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ContinueStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -52,7 +52,7 @@
      * Check statement
      */
 
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         reach(env, vset);
         // A new context is established here because the 'continue' statement
--- a/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -47,7 +47,7 @@
     /**
      * Check the value
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return right.checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/DeclarationStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/DeclarationStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,11 +55,11 @@
      * Check statement
      * Report an error unless the call is checkBlockStatement.
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.decl");
         return checkBlockStatement(env, ctx, vset, exp);
     }
-    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (labels != null) {
             env.error(where, "declaration.with.label", labels[0]);
         }
--- a/jdk/src/share/classes/sun/tools/tree/DoStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/DoStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -53,7 +53,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env,ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // remember what was unassigned on entry
--- a/jdk/src/share/classes/sun/tools/tree/ExprExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ExprExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,7 @@
      * Check a condition.  We must pass it on to our unparenthesised form.
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         right.checkCondition(env, ctx, vset, exp, cvars);
         type = right.type;
     }
@@ -60,7 +60,7 @@
      * (Part of fix for 4090372)
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         vset = right.checkAssignOp(env, ctx, vset, exp, outside);
         type = right.type;
         return vset;
@@ -80,7 +80,7 @@
     // going to clammer for this one.
     //
     // public Vset checkLHS(Environment env, Context ctx,
-    //     Vset vset, Hashtable exp) {
+    //     Vset vset, Hashtable<Object, Object> exp) {
     //     vset = right.check(env, ctx, vset, exp);
     //     type = right.type;
     //     return vset;
--- a/jdk/src/share/classes/sun/tools/tree/Expression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/Expression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -192,18 +192,18 @@
     /**
      * Check an expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return vset;
     }
-    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable exp) {
+    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         throw new CompilerError("check failed");
     }
 
     public Vset checkLHS(Environment env, Context ctx,
-                            Vset vset, Hashtable exp) {
+                            Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.lhs.assignment");
         type = Type.tError;
         return vset;
@@ -243,7 +243,7 @@
     }
 
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         if (outside instanceof IncDecExpression)
             env.error(where, "invalid.arg", opNames[outside.op]);
         else
@@ -266,7 +266,7 @@
      * and act appropriately to verify the full package name.
      * @arg loc the expression containing the ambiguous expression
      */
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return checkValue(env, ctx, vset, exp);
     }
@@ -277,7 +277,7 @@
      * the condition is false.
      */
     public ConditionVars checkCondition(Environment env, Context ctx,
-                                        Vset vset, Hashtable exp) {
+                                        Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = new ConditionVars();
         checkCondition(env, ctx, vset, exp, cvars);
         return cvars;
@@ -295,7 +295,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx,
-                               Vset vset, Hashtable exp, ConditionVars cvars) {
+                               Vset vset, Hashtable<Object, Object> exp, ConditionVars cvars) {
         cvars.vsTrue = cvars.vsFalse = checkValue(env, ctx, vset, exp);
         // unshare side effects:
         cvars.vsFalse = cvars.vsFalse.copy();
--- a/jdk/src/share/classes/sun/tools/tree/ExpressionStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ExpressionStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         return expr.check(env, ctx, reach(env, vset), exp);
     }
--- a/jdk/src/share/classes/sun/tools/tree/FieldExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/FieldExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -219,7 +219,7 @@
      */
 
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         if (id == idThis || id == idClass) {
             loc = null;         // this cannot be a type or package
@@ -232,7 +232,7 @@
      */
 
     public Vset checkValue(Environment env, Context ctx,
-                           Vset vset, Hashtable exp) {
+                           Vset vset, Hashtable<Object, Object> exp) {
         vset = checkCommon(env, ctx, vset, exp, null, false);
         if (id == idSuper && type != Type.tError) {
             // "super" is not allowed in this context.
@@ -416,7 +416,7 @@
      */
 
     private Vset checkCommon(Environment env, Context ctx,
-                             Vset vset, Hashtable exp,
+                             Vset vset, Hashtable<Object, Object> exp,
                              UnaryExpression loc, boolean isLHS) {
 
         // Handle class literal, e.g., 'x.class'.
@@ -850,7 +850,7 @@
      * Finish checking it.
      */
     private Vset checkInnerClass(Environment env, Context ctx,
-                                 Vset vset, Hashtable exp,
+                                 Vset vset, Hashtable<Object, Object> exp,
                                  UnaryExpression loc) {
         ClassDefinition inner = field.getInnerClass();
         type = inner.getType();
@@ -903,7 +903,7 @@
      * Check the expression if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         boolean hadField = (field != null);
 
         //checkValue(env, ctx, vset, exp);
@@ -945,7 +945,7 @@
      * Check the expression if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
 
         //checkValue(env, ctx, vset, exp);
         checkCommon(env, ctx, vset, exp, null, true);
--- a/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -68,9 +68,9 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = reach(env, vset);
-        Hashtable newexp = new Hashtable();
+        Hashtable<Object, Object> newexp = new Hashtable<>();
 
         // Handle the proposed 'try (init) { stmts } finally { stmts }' syntax.
         // This feature has not been adopted, and support is presently disabled.
@@ -182,7 +182,7 @@
         // generated by the body into exp.
         if (finallyCanFinish) {
             // Add newexp's back into exp; cf. ThrowStatement.check().
-            for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+            for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                 Object def = e.nextElement();
                 exp.put(def, newexp.get(def));
             }
--- a/jdk/src/share/classes/sun/tools/tree/ForStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ForStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         vset = reach(env, vset);
         Context initctx = new Context(ctx, this);
--- a/jdk/src/share/classes/sun/tools/tree/IdentifierExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/IdentifierExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -231,7 +231,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (field != null) {
             // An internally pre-set field, such as an argument copying
             // an uplevel value.  Do not re-check it.
@@ -250,7 +250,7 @@
      * Check the expression if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         if (!bind(env, ctx))
             return vset;
         vset = assign(env, ctx, vset);
@@ -263,7 +263,7 @@
      * Check the expression if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         if (!bind(env, ctx))
             return vset;
         vset = assign(env, ctx, get(env, ctx, vset));
@@ -293,7 +293,7 @@
     /**
      * Check if the present name is part of a scoping prefix.
      */
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         try {
             if (ctx.getField(env, id) != null) {
@@ -474,4 +474,4 @@
             implementation.print(out);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/src/share/classes/sun/tools/tree/IfStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/IfStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // Vset vsExtra = vset.copy();  // See comment below.
--- a/jdk/src/share/classes/sun/tools/tree/IncDecExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/IncDecExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,7 +49,7 @@
     /**
      * Check an increment or decrement expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkAssignOp(env, ctx, vset, exp, this);
         if (right.type.inMask(TM_NUMBER)) {
             type = right.type;
@@ -66,7 +66,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/InstanceOfExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/InstanceOfExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -48,7 +48,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkValue(env, ctx, vset, exp);
         right = new TypeExpression(right.where, right.toType(env, ctx));
 
--- a/jdk/src/share/classes/sun/tools/tree/LengthExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/LengthExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * Select the type of the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
         if (!right.type.isType(TC_ARRAY)) {
             env.error(where, "invalid.length", right.type);
--- a/jdk/src/share/classes/sun/tools/tree/LocalMember.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/LocalMember.java	Fri Aug 08 11:36:48 2014 -0700
@@ -163,7 +163,7 @@
      * May inline copies of all the arguments of the given method.
      */
     static public LocalMember[] copyArguments(Context ctx, MemberDefinition field) {
-        Vector v = field.getArguments();
+        Vector<MemberDefinition> v = field.getArguments();
         LocalMember res[] = new LocalMember[v.size()];
         v.copyInto(res);
         for (int i = 0; i < res.length; i++) {
--- a/jdk/src/share/classes/sun/tools/tree/MethodExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/MethodExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -78,7 +78,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ClassDeclaration c = null;
         boolean isArray = false;
         boolean staticRef = false;
@@ -587,7 +587,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/NewArrayExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/NewArrayExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,7 +55,7 @@
     /**
      * Check
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         type = right.toType(env, ctx);
 
         boolean flag = (init != null);  // flag says that dims are forbidden
--- a/jdk/src/share/classes/sun/tools/tree/NewInstanceExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/NewInstanceExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -83,7 +83,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         // What type?
         ClassDefinition def = null;
 
@@ -366,7 +366,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/NotExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/NotExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -65,7 +65,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         right.checkCondition(env, ctx, vset, exp, cvars);
         right = convert(env, ctx, Type.tBoolean, right);
         // swap true and false
--- a/jdk/src/share/classes/sun/tools/tree/OrExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/OrExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
      *        both the left or right hand side are false
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         // Find out when the left side is true/false
         left.checkCondition(env, ctx, vset, exp, cvars);
         left = convert(env, ctx, Type.tBoolean, left);
--- a/jdk/src/share/classes/sun/tools/tree/ReturnStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ReturnStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -51,7 +51,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         vset = reach(env, vset);
         if (expr != null) {
--- a/jdk/src/share/classes/sun/tools/tree/Statement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/Statement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -100,7 +100,7 @@
     /**
      * Check a statement
      */
-    public Vset checkMethod(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkMethod(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         // Set up ctx.getReturnContext() for the sake of ReturnStatement.check().
         CheckContext mctx = new CheckContext(ctx, new Statement(METHOD, 0));
         ctx = mctx;
@@ -130,7 +130,7 @@
 
         return vset;
     }
-    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable exp) {
+    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable<Object, Object> exp) {
         throw new CompilerError("checkDeclaration");
     }
 
@@ -164,12 +164,12 @@
         }
     }
 
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         throw new CompilerError("check");
     }
 
     /** This is called in contexts where declarations are valid. */
-    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return check(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/SuperExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/SuperExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = checkCommon(env, ctx, vset, exp);
         if (type != Type.tError) {
             // "super" is not allowed in this context:
@@ -74,13 +74,13 @@
      * Check if the present name is part of a scoping prefix.
      */
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return checkCommon(env, ctx, vset, exp);
     }
 
     /** Common code for checkValue and checkAmbigName */
-    private Vset checkCommon(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    private Vset checkCommon(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ClassDeclaration superClass = ctx.field.getClassDefinition().getSuperClass();
         if (superClass == null) {
             env.error(where, "undef.var", idSuper);
--- a/jdk/src/share/classes/sun/tools/tree/SwitchStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/SwitchStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         vset = expr.checkValue(env, newctx, reach(env, vset), exp);
@@ -62,7 +62,7 @@
 
         expr = convert(env, newctx, Type.tInt, expr);
 
-        Hashtable tab = new Hashtable();
+        Hashtable<Expression, Statement> tab = new Hashtable<>();
         boolean hasDefault = false;
         // Note that vs is reset to vset.copy() on every case label.
         // If the first substatement is not a case label, it is unreached.
--- a/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -56,7 +56,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/ThisExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ThisExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -87,7 +87,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (ctx.field.isStatic()) {
             env.error(where, "undef.var", opNames[op]);
             type = Type.tError;
--- a/jdk/src/share/classes/sun/tools/tree/ThrowStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/ThrowStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         try {
             vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/TryStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/TryStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,11 +57,11 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         try {
             vset = reach(env, vset);
-            Hashtable newexp = new Hashtable();
+            Hashtable<Object, Object> newexp = new Hashtable<>();
             CheckContext newctx =  new CheckContext(ctx, this);
 
             // Check 'try' block.  A variable is DA (DU) before the try
@@ -131,7 +131,7 @@
 
                 // Make sure the exception is actually throw in that part of the code
                 boolean ok = false;
-                for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+                for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                     ClassDeclaration c = (ClassDeclaration)e.nextElement();
                     if (def.superClassOf(env, c) || def.subClassOf(env, c)) {
                         ok = true;
@@ -149,7 +149,7 @@
             }
 
             // Only carry over exceptions that are not caught
-            for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+            for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                 ClassDeclaration c = (ClassDeclaration)e.nextElement();
                 ClassDefinition def = c.getClassDefinition(env);
                 boolean add = true;
--- a/jdk/src/share/classes/sun/tools/tree/TypeExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/TypeExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -53,13 +53,13 @@
     /**
      * Check an expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.term");
         type = Type.tError;
         return vset;
     }
 
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return vset;
     }
--- a/jdk/src/share/classes/sun/tools/tree/UnaryExpression.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/UnaryExpression.java	Fri Aug 08 11:36:48 2014 -0700
@@ -69,7 +69,7 @@
     /**
      * Check a unary expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
 
         int tm = right.type.getTypeMask();
--- a/jdk/src/share/classes/sun/tools/tree/VarDeclarationStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/VarDeclarationStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * Check statement
      */
-    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable exp) {
+    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable<Object, Object> exp) {
         if (labels != null) {
             env.error(where, "declaration.with.label", labels[0]);
         }
--- a/jdk/src/share/classes/sun/tools/tree/WhileStatement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/tree/WhileStatement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -53,7 +53,7 @@
     /**
      * Check a while statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // remember what was unassigned on entry
--- a/jdk/src/share/classes/sun/tools/util/CommandLine.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/util/CommandLine.java	Fri Aug 08 11:36:48 2014 -0700
@@ -54,7 +54,7 @@
     public static String[] parse(String[] args)
         throws IOException
     {
-        ArrayList newArgs = new ArrayList(args.length);
+        ArrayList<String> newArgs = new ArrayList<>(args.length);
         for (int i = 0; i < args.length; i++) {
             String arg = args[i];
             if (arg.length() > 1 && arg.charAt(0) == '@') {
@@ -68,10 +68,10 @@
                 newArgs.add(arg);
             }
         }
-        return (String[])newArgs.toArray(new String[newArgs.size()]);
+        return newArgs.toArray(new String[newArgs.size()]);
     }
 
-    private static void loadCmdFile(String name, List args)
+    private static void loadCmdFile(String name, List<String> args)
         throws IOException
     {
         Reader r = new BufferedReader(new FileReader(name));
--- a/jdk/src/share/native/sun/awt/image/awt_parseImage.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/native/sun/awt/image/awt_parseImage.c	Fri Aug 08 11:36:48 2014 -0700
@@ -508,6 +508,7 @@
     cmP->csType = (*env)->GetIntField(env, cmP->jcmodel, g_CMcsTypeID);
 
     cmP->cmType = getColorModelType(env, jcmodel);
+    JNU_CHECK_EXCEPTION_RETURN(env, -1);
 
     cmP->isDefaultCM = FALSE;
     cmP->isDefaultCompatCM = FALSE;
--- a/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c	Fri Aug 08 11:36:48 2014 -0700
@@ -636,6 +636,9 @@
                 "OGLBufImgOps_EnableLookupOp: short=%d num=%d len=%d off=%d",
                 shortData, numBands, bandLength, offset);
 
+    for (i = 0; i < 4; i++) {
+        bands[i] = NULL;
+    }
     RETURN_IF_NULL(oglc);
     RETURN_IF_NULL(srcOps);
     RESET_PREVIOUS_OP();
--- a/jdk/src/share/native/sun/tracing/dtrace/JVM.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/share/native/sun/tracing/dtrace/JVM.c	Fri Aug 08 11:36:48 2014 -0700
@@ -144,32 +144,34 @@
         env, provider, &(jvm_provider->argsAttributes));
 }
 
-static void readProviderData(
+static int readProviderData(
         JNIEnv* env, jobject provider, JVM_DTraceProvider* jvm_provider) {
     jmethodID mid;
     jobjectArray probes;
     jsize i;
-    jclass clazz = (*env)->GetObjectClass(env, provider); CHECK
+    jclass clazz = (*env)->GetObjectClass(env, provider); CHECK_(0)
     mid = (*env)->GetMethodID(
-        env, clazz, "getProbes", "()[Lsun/tracing/dtrace/DTraceProbe;"); CHECK
+        env, clazz, "getProbes", "()[Lsun/tracing/dtrace/DTraceProbe;"); CHECK_(0)
     probes = (jobjectArray)(*env)->CallObjectMethod(
-        env, provider, mid); CHECK
+        env, provider, mid); CHECK_(0)
 
     // Fill JVM structure, describing provider
-    jvm_provider->probe_count = (*env)->GetArrayLength(env, probes); CHECK
+    jvm_provider->probe_count = (*env)->GetArrayLength(env, probes); CHECK_(0)
     jvm_provider->probes = (JVM_DTraceProbe*)calloc(
         jvm_provider->probe_count, sizeof(*jvm_provider->probes));
     mid = (*env)->GetMethodID(
-        env, clazz, "getProviderName", "()Ljava/lang/String;"); CHECK
+        env, clazz, "getProviderName", "()Ljava/lang/String;"); CHECK_(0)
     jvm_provider->name = (jstring)(*env)->CallObjectMethod(
-        env, provider, mid); CHECK
+        env, provider, mid); CHECK_(0)
 
-    readInterfaceAttributes(env, provider, jvm_provider); CHECK
+    readInterfaceAttributes(env, provider, jvm_provider); CHECK_(0)
 
     for (i = 0; i < jvm_provider->probe_count; ++i) {
-        jobject probe = (*env)->GetObjectArrayElement(env, probes, i); CHECK
-        readProbeData(env, probe, &jvm_provider->probes[i]); CHECK
+        jobject probe = (*env)->GetObjectArrayElement(env, probes, i); CHECK_(0)
+        readProbeData(env, probe, &jvm_provider->probes[i]); CHECK_(0)
     }
+
+    return 1;
 }
 
 /*
@@ -182,6 +184,7 @@
     jlong handle = 0;
     jsize num_providers;
     jsize i;
+    jsize count = 0;
     JVM_DTraceProvider* jvm_providers;
 
     initialize();
@@ -195,16 +198,23 @@
     jvm_providers = (JVM_DTraceProvider*)calloc(
         num_providers, sizeof(*jvm_providers));
 
-    for (i = 0; i < num_providers; ++i) {
-        JVM_DTraceProvider* p = &(jvm_providers[i]);
+    for (; count < num_providers; ++count) {
+        JVM_DTraceProvider* p = &(jvm_providers[count]);
         jobject provider = (*env)->GetObjectArrayElement(
-            env, providers, i);
-        readProviderData(env, provider, p);
+            env, providers, count);
+        if ((*env)->ExceptionOccurred(env) ||
+            ! readProviderData(env, provider, p)) {
+            // got an error, bail out!
+            break;
+        }
     }
 
-    handle = jvm_symbols->Activate(
-        env, JVM_TRACING_DTRACE_VERSION, moduleName,
-        num_providers, jvm_providers);
+    if (count == num_providers) {
+        // all providers successfully loaded - get the handle
+        handle = jvm_symbols->Activate(
+            env, JVM_TRACING_DTRACE_VERSION, moduleName,
+            num_providers, jvm_providers);
+    }
 
     for (i = 0; i < num_providers; ++i) {
         JVM_DTraceProvider* p = &(jvm_providers[i]);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/awt/datatransfer/flavormap.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,71 @@
+#
+# This properties file is used to initialize the default
+# java.awt.datatransfer.SystemFlavorMap. It contains the X11 platform-specific,
+# default mappings between common X11 selection atoms and platform-independent
+# MIME type strings, which will be converted into
+# java.awt.datatransfer.DataFlavors.
+#
+# The standard format is:
+#
+# <native>=<MIME type>,<MIME type>, ...
+#
+# <native> should be a string identifier that the native platform will
+# recognize as a valid data format. <MIME type> should specify both a MIME
+# primary type and a MIME subtype separated by a '/'. The MIME type may include
+# parameters, where each parameter is a key/value pair separated by '=', and
+# where each parameter to the MIME type is separated by a ';'.
+#
+# Because SystemFlavorMap implements FlavorTable, developers are free to
+# duplicate DataFlavor values and set multiple values for a single native by
+# separating them with ",". If a mapping contains a duplicate key or value,
+# earlier mappings which included this key or value will be preferred.
+#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", and which support the charset parameter, should specify the exact
+# format in which the native platform expects the data. The "charset"
+# parameter specifies the char to byte encoding, the "eoln" parameter
+# specifies the end-of-line marker, and the "terminators" parameter specifies
+# the number of terminating NUL bytes. Note that "eoln" and "terminators"
+# are not standardized MIME type parameters. They are specific to this file
+# format ONLY. They will not appear in any of the DataFlavors returned by the
+# SystemFlavorMap at the Java level.
+#
+# If the "charset" parameter is omitted, or has zero length, the platform
+# default encoding is assumed. If the "eoln" parameter is omitted, or has
+# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
+# or has a value less than zero, zero is assumed.
+#
+# Upon initialization, the data transfer subsystem will record the specified
+# details of the native text format, but the default SystemFlavorMap will
+# present a large set of synthesized DataFlavors which map, in both
+# directions, to the native. After receiving data from the application in one
+# of the synthetic DataFlavors, the data transfer subsystem will transform
+# the data stream into the format specified in this file before passing the
+# transformed stream to the native system.
+#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", but which do not support the charset parameter, will be treated as
+# opaque, 8-bit data. They will not undergo any transformation process, and
+# any "charset", "eoln", or "terminators" parameters specified in this file
+# will be ignored.
+#
+# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
+# text flavors which support the charset parameter.
+
+UTF8_STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
+
+# The COMPOUND_TEXT support for inter-client text transfer is disabled by 
+# default. The reason is that many native applications prefer this format over 
+# other native text formats, but are unable to decode the textual data in this 
+# format properly. This results in java-to-native text transfer failures.
+# To enable the COMPOUND_TEXT support for this JRE installation uncomment 
+# the line below.
+
+# COMPOUND_TEXT=text/plain;charset=x-compound-text;eoln="\n";terminators=0
+
+TEXT=text/plain;eoln="\n";terminators=0
+STRING=text/plain;charset=iso8859-1;eoln="\n";terminators=0
+FILE_NAME=application/x-java-file-list;class=java.util.List
+text/uri-list=application/x-java-file-list;class=java.util.List
+PNG=image/x-java-image;class=java.awt.Image
+JFIF=image/x-java-image;class=java.awt.Image
--- a/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -165,7 +165,7 @@
         // Have to use reflection and also make assumption on how FD
         // is implemented.
 
-        Class paramTypes[] = { int.class };
+        Class<?> paramTypes[] = { int.class };
         Constructor<?> ctr = Reflect.lookupConstructor("java.io.FileDescriptor",
                                                        paramTypes);
         Object args[] = { new Integer(fdVal) };
--- a/jdk/src/solaris/classes/sun/print/CUPSPrinter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/classes/sun/print/CUPSPrinter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,7 @@
 import javax.print.attribute.standard.MediaSize;
 import javax.print.attribute.standard.MediaTray;
 import javax.print.attribute.standard.MediaPrintableArea;
+import javax.print.attribute.standard.PrinterResolution;
 import javax.print.attribute.Size2DSyntax;
 import javax.print.attribute.Attribute;
 import javax.print.attribute.EnumSyntax;
@@ -57,6 +58,8 @@
     // CUPS does not support multi-threading.
     private static synchronized native String[] getMedia(String printer);
     private static synchronized native float[] getPageSizes(String printer);
+    private static synchronized native void
+        getResolutions(String printer, ArrayList<Integer> resolutionList);
     //public static boolean useIPPMedia = false; will be used later
 
     private MediaPrintableArea[] cupsMediaPrintables;
@@ -68,6 +71,7 @@
     public  int nTrays = 0;
     private  String[] media;
     private  float[] pageSizes;
+    int[]   resolutionsArray;
     private String printer;
 
     private static boolean libFound;
@@ -119,6 +123,12 @@
                 nTrays = media.length/2-nPageSizes;
                 assert (nTrays >= 0);
             }
+            ArrayList<Integer> resolutionList = new ArrayList<>();
+            getResolutions(printer, resolutionList);
+            resolutionsArray = new int[resolutionList.size()];
+            for (int i=0; i < resolutionList.size(); i++) {
+                resolutionsArray[i] = resolutionList.get(i);
+            }
         }
     }
 
@@ -160,6 +170,12 @@
         return cupsMediaTrays;
     }
 
+    /**
+     * return the raw packed array of supported printer resolutions.
+     */
+    int[] getRawResolutions() {
+        return resolutionsArray;
+    }
 
     /**
      * Initialize media by translating PPD info to PrintService attributes.
--- a/jdk/src/solaris/classes/sun/print/IPPPrintService.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java	Fri Aug 08 11:36:48 2014 -0700
@@ -96,6 +96,8 @@
     private MediaSizeName[] mediaSizeNames;
     private CustomMediaSizeName[] customMediaSizeNames;
     private int defaultMediaIndex;
+    private int[] rawResolutions = null;
+    private PrinterResolution[] printerResolutions = null;
     private boolean isCupsPrinter;
     private boolean init;
     private Boolean isPS;
@@ -414,6 +416,7 @@
                     mediaTrays = cps.getMediaTrays();
                     customMediaSizeNames = cps.getCustomMediaSizeNames();
                     defaultMediaIndex = cps.getDefaultMediaIndex();
+                    rawResolutions = cps.getRawResolutions();
                     urlConnection.disconnect();
                     init = true;
                     return;
@@ -765,6 +768,15 @@
                     return sidesSup;
                 }
             }
+        } else if (category == PrinterResolution.class) {
+            PrinterResolution[] supportedRes = getPrintResolutions();
+            if (supportedRes == null) {
+                return null;
+            }
+            PrinterResolution []arr =
+                new PrinterResolution[supportedRes.length];
+            System.arraycopy(supportedRes, 0, arr, 0, supportedRes.length);
+            return arr;
         }
 
         return null;
@@ -1043,6 +1055,14 @@
         if (getAttMap != null && getAttMap.containsKey("color-supported")) {
             catList.add(Chromaticity.class);
         }
+
+        // CUPS does not report printer resolution via IPP but it
+        // may be gleaned from the PPD.
+        PrinterResolution[] supportedRes = getPrintResolutions();
+        if (supportedRes != null && (supportedRes.length > 0)) {
+            catList.add(PrinterResolution.class);
+        }
+
         supportedCats = new Class<?>[catList.size()];
         catList.toArray(supportedCats);
         return supportedCats;
@@ -1362,6 +1382,10 @@
                 }
             }
             return false;
+        } if (attr.getCategory() == PrinterResolution.class) {
+            if (attr instanceof PrinterResolution) {
+                return isSupportedResolution((PrinterResolution)attr);
+            }
         }
         return true;
     }
@@ -1523,11 +1547,48 @@
                 }
             }
             return Sides.ONE_SIDED;
+        } else if (category == PrinterResolution.class) {
+             PrinterResolution[] supportedRes = getPrintResolutions();
+             if ((supportedRes != null) && (supportedRes.length > 0)) {
+                return supportedRes[0];
+             } else {
+                 return new PrinterResolution(300, 300, PrinterResolution.DPI);
+             }
         }
 
         return null;
     }
 
+    private PrinterResolution[] getPrintResolutions() {
+        if (printerResolutions == null) {
+            if (rawResolutions == null) {
+              printerResolutions = new PrinterResolution[0];
+            } else {
+                int numRes = rawResolutions.length / 2;
+                PrinterResolution[] pres = new PrinterResolution[numRes];
+                for (int i=0; i < numRes; i++) {
+                    pres[i] =  new PrinterResolution(rawResolutions[i*2],
+                                                     rawResolutions[i*2+1],
+                                                     PrinterResolution.DPI);
+                }
+                printerResolutions = pres;
+            }
+        }
+        return printerResolutions;
+    }
+
+    private boolean isSupportedResolution(PrinterResolution res) {
+        PrinterResolution[] supportedRes = getPrintResolutions();
+        if (supportedRes != null) {
+            for (int i=0; i<supportedRes.length; i++) {
+                if (res.equals(supportedRes[i])) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
     public ServiceUIFactory getServiceUIFactory() {
         return null;
     }
--- a/jdk/src/solaris/lib/flavormap.properties	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-#
-# This properties file is used to initialize the default
-# java.awt.datatransfer.SystemFlavorMap. It contains the X11 platform-specific,
-# default mappings between common X11 selection atoms and platform-independent
-# MIME type strings, which will be converted into
-# java.awt.datatransfer.DataFlavors.
-#
-# These default mappings may be augmented by specifying the
-#
-#       AWT.DnD.flavorMapFileURL 
-#
-# property in the appropriate awt.properties file. The specified properties URL
-# will be loaded into the SystemFlavorMap.
-#
-# The standard format is:
-#
-# <native>=<MIME type>
-#
-# <native> should be a string identifier that the native platform will
-# recognize as a valid data format. <MIME type> should specify both a MIME
-# primary type and a MIME subtype separated by a '/'. The MIME type may include
-# parameters, where each parameter is a key/value pair separated by '=', and
-# where each parameter to the MIME type is separated by a ';'.
-#
-# Because SystemFlavorMap implements FlavorTable, developers are free to
-# duplicate both native keys and DataFlavor values. If a mapping contains a
-# duplicate key or value, earlier mappings which included this key or value
-# will be preferred.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", and which support the charset parameter, should specify the exact
-# format in which the native platform expects the data. The "charset"
-# parameter specifies the char to byte encoding, the "eoln" parameter
-# specifies the end-of-line marker, and the "terminators" parameter specifies
-# the number of terminating NUL bytes. Note that "eoln" and "terminators"
-# are not standardized MIME type parameters. They are specific to this file
-# format ONLY. They will not appear in any of the DataFlavors returned by the
-# SystemFlavorMap at the Java level.
-#
-# If the "charset" parameter is omitted, or has zero length, the platform
-# default encoding is assumed. If the "eoln" parameter is omitted, or has
-# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
-# or has a value less than zero, zero is assumed.
-#
-# Upon initialization, the data transfer subsystem will record the specified
-# details of the native text format, but the default SystemFlavorMap will
-# present a large set of synthesized DataFlavors which map, in both
-# directions, to the native. After receiving data from the application in one
-# of the synthetic DataFlavors, the data transfer subsystem will transform
-# the data stream into the format specified in this file before passing the
-# transformed stream to the native system.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", but which do not support the charset parameter, will be treated as
-# opaque, 8-bit data. They will not undergo any transformation process, and
-# any "charset", "eoln", or "terminators" parameters specified in this file
-# will be ignored.
-#
-# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
-# text flavors which support the charset parameter.
-
-UTF8_STRING=text/plain;charset=UTF-8;eoln="\n";terminators=0
-
-# The COMPOUND_TEXT support for inter-client text transfer is disabled by 
-# default. The reason is that many native applications prefer this format over 
-# other native text formats, but are unable to decode the textual data in this 
-# format properly. This results in java-to-native text transfer failures.
-# To enable the COMPOUND_TEXT support for this JRE installation uncomment 
-# the line below.
-
-# COMPOUND_TEXT=text/plain;charset=x-compound-text;eoln="\n";terminators=0
-
-TEXT=text/plain;eoln="\n";terminators=0
-STRING=text/plain;charset=iso8859-1;eoln="\n";terminators=0
-FILE_NAME=application/x-java-file-list;class=java.util.List
-text/uri-list=application/x-java-file-list;class=java.util.List
-PNG=image/x-java-image;class=java.awt.Image
-JFIF=image/x-java-image;class=java.awt.Image
--- a/jdk/src/solaris/native/sun/awt/CUPSfuncs.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/native/sun/awt/CUPSfuncs.c	Fri Aug 08 11:36:48 2014 -0700
@@ -394,3 +394,112 @@
     unlink(filename);
     return sizeArray;
 }
+
+/*
+ * Populates the supplied ArrayList<Integer> with resolutions.
+ * The first pair of elements will be the default resolution.
+ * If resolution isn't supported the list will be empty.
+ * If needed we can add a 2nd ArrayList<String> which would
+ * be populated with the corresponding UI name.
+ * PPD specifies the syntax for resolution as either "Ndpi" or "MxNdpi",
+ * eg 300dpi or 600x600dpi. The former is a shorthand where xres==yres.
+ * We will always expand to the latter as we use a single array list.
+ * Note: getMedia() and getPageSizes() both open the ppd file
+ * This is not going to scale forever so if we add anymore we
+ * should look to consolidate this.
+ */
+JNIEXPORT void JNICALL
+Java_sun_print_CUPSPrinter_getResolutions(JNIEnv *env,
+                                          jobject printObj,
+                                          jstring printer,
+                                          jobject arrayList)
+{
+    ppd_file_t *ppd = NULL;
+    ppd_option_t *resolution;
+    int defx = 0, defy = 0;
+    int resx = 0, resy = 0;
+    jclass intCls, cls;
+    jmethodID intCtr, arrListAddMID;
+    int i;
+
+    intCls = (*env)->FindClass(env, "java/lang/Integer");
+    CHECK_NULL(intCls);
+    intCtr = (*env)->GetMethodID(env, intCls, "<init>", "(I)V");
+    CHECK_NULL(intCtr);
+    cls = (*env)->FindClass(env, "java/util/ArrayList");
+    CHECK_NULL(cls);
+    arrListAddMID =
+        (*env)->GetMethodID(env, cls, "add", "(Ljava/lang/Object;)Z");
+    CHECK_NULL(arrListAddMID);
+
+    const char *name = (*env)->GetStringUTFChars(env, printer, NULL);
+    if (name == NULL) {
+        (*env)->ExceptionClear(env);
+        JNU_ThrowOutOfMemoryError(env, "Could not create printer name");
+    }
+    const char *filename;
+
+    // NOTE: cupsGetPPD returns a pointer to a filename of a temporary file.
+    // unlink() must be called to remove the file after using it.
+    filename = j2d_cupsGetPPD(name);
+    (*env)->ReleaseStringUTFChars(env, printer, name);
+    CHECK_NULL(filename);
+    if ((ppd = j2d_ppdOpenFile(filename)) == NULL) {
+        unlink(filename);
+        DPRINTF("unable to open PPD  %s\n", filename)
+    }
+    resolution = j2d_ppdFindOption(ppd, "Resolution");
+    if (resolution != NULL) {
+        int matches = sscanf(resolution->defchoice, "%dx%ddpi", &defx, &defy);
+        if (matches == 2) {
+           if (defx <= 0 || defy <= 0) {
+              defx = 0;
+              defy = 0;
+           }
+        } else {
+            matches = sscanf(resolution->defchoice, "%ddpi", &defx);
+            if (matches == 1) {
+                if (defx <= 0) {
+                   defx = 0;
+                } else {
+                   defy = defx;
+                }
+            }
+        }
+        if (defx > 0) {
+          jobject rxObj = (*env)->NewObject(env, intCls, intCtr, defx);
+          jobject ryObj = (*env)->NewObject(env, intCls, intCtr, defy);
+          (*env)->CallBooleanMethod(env, arrayList, arrListAddMID, rxObj);
+          (*env)->CallBooleanMethod(env, arrayList, arrListAddMID, ryObj);
+        }
+
+        for (i = 0; i < resolution->num_choices; i++) {
+            char *resStr = resolution->choices[i].choice;
+            int matches = sscanf(resStr, "%dx%ddpi", &resx, &resy);
+            if (matches == 2) {
+               if (resx <= 0 || resy <= 0) {
+                  resx = 0;
+                  resy = 0;
+               }
+            } else {
+                matches = sscanf(resStr, "%ddpi", &resx);
+                if (matches == 1) {
+                    if (resx <= 0) {
+                       resx = 0;
+                    } else {
+                       resy = resx;
+                    }
+                }
+            }
+            if (resx > 0 && (resx != defx || resy != defy )) {
+              jobject rxObj = (*env)->NewObject(env, intCls, intCtr, resx);
+              jobject ryObj = (*env)->NewObject(env, intCls, intCtr, resy);
+              (*env)->CallBooleanMethod(env, arrayList, arrListAddMID, rxObj);
+              (*env)->CallBooleanMethod(env, arrayList, arrListAddMID, ryObj);
+            }
+        }
+    }
+
+    j2d_ppdClose(ppd);
+    unlink(filename);
+}
--- a/jdk/src/solaris/native/sun/awt/gtk2_interface.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.c	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -433,7 +433,8 @@
             result = TRUE;
         }
 
-        dlclose(lib);
+        // 8048289: workaround for https://bugzilla.gnome.org/show_bug.cgi?id=733065
+        // dlclose(lib);
 
         return result;
     }
--- a/jdk/src/solaris/native/sun/java2d/x11/X11PMBlitLoops.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11PMBlitLoops.c	Fri Aug 08 11:36:48 2014 -0700
@@ -241,9 +241,12 @@
                                       width, height, 1);
         if (xsdo->bitmask == 0) {
             AWT_UNLOCK();
-            JNU_ThrowOutOfMemoryError(env,
-                                      "Cannot create bitmask for "
-                                      "offscreen surface");
+            if (!(*env)->ExceptionCheck(env))
+            {
+                JNU_ThrowOutOfMemoryError(env,
+                                          "Cannot create bitmask for "
+                                          "offscreen surface");
+            }
             return;
         }
     }
@@ -253,7 +256,10 @@
                          1, XYBitmap, 0, NULL, width, height, 32, 0);
     if (image == NULL) {
         AWT_UNLOCK();
-        JNU_ThrowOutOfMemoryError(env, "Cannot allocate bitmask for mask");
+        if (!(*env)->ExceptionCheck(env))
+        {
+             JNU_ThrowOutOfMemoryError(env, "Cannot allocate bitmask for mask");
+        }
         return;
     }
     dstScan = image->bytes_per_line;
@@ -261,7 +267,10 @@
     if (image->data == NULL) {
         XFree(image);
         AWT_UNLOCK();
-        JNU_ThrowOutOfMemoryError(env, "Cannot allocate bitmask for mask");
+        if (!(*env)->ExceptionCheck(env))
+        {
+            JNU_ThrowOutOfMemoryError(env, "Cannot allocate bitmask for mask");
+        }
         return;
     }
     pDst = (unsigned char *)image->data;
--- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Fri Aug 08 11:36:48 2014 -0700
@@ -454,6 +454,7 @@
             AWT_LOCK();
             xsdo->drawable = X11SD_CreateSharedPixmap(xsdo);
             AWT_UNLOCK();
+            JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
             if (xsdo->drawable) {
                 xsdo->shmPMData.usingShmPixmap = JNI_TRUE;
                 xsdo->shmPMData.shmPixmap = xsdo->drawable;
@@ -469,6 +470,7 @@
                                      xsdo->configData->awt_visInfo.screen),
                           width, height, depth);
         AWT_UNLOCK();
+        JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
 #ifdef MITSHM
         xsdo->shmPMData.usingShmPixmap = JNI_FALSE;
         xsdo->shmPMData.pixmap = xsdo->drawable;
@@ -504,6 +506,7 @@
 
     if (xsdo->configData->awt_cmap == (Colormap)NULL) {
         awtJNI_CreateColorData(env, xsdo->configData, 1);
+        JNU_CHECK_EXCEPTION(env);
     }
     /* color_data will be initialized in awtJNI_CreateColorData for
        8-bit visuals */
@@ -805,7 +808,10 @@
          xsdo->cData->awt_icmLUT == NULL))
     {
         AWT_UNLOCK();
-        JNU_ThrowNullPointerException(env, "colormap lookup table");
+        if (!(*env)->ExceptionCheck(env))
+        {
+             JNU_ThrowNullPointerException(env, "colormap lookup table");
+        }
         return SD_FAILURE;
     }
     if ((lockflags & SD_LOCK_INVCOLOR) != 0 &&
@@ -816,7 +822,10 @@
          xsdo->cData->img_oda_blue == NULL))
     {
         AWT_UNLOCK();
-        JNU_ThrowNullPointerException(env, "inverse colormap lookup table");
+        if (!(*env)->ExceptionCheck(env))
+        {
+             JNU_ThrowNullPointerException(env, "inverse colormap lookup table");
+        }
         return SD_FAILURE;
     }
     if ((lockflags & SD_LOCK_INVGRAY) != 0 &&
@@ -824,7 +833,10 @@
          xsdo->cData->pGrayInverseLutData == NULL))
     {
         AWT_UNLOCK();
-        JNU_ThrowNullPointerException(env, "inverse gray lookup table");
+        if (!(*env)->ExceptionCheck(env))
+        {
+            JNU_ThrowNullPointerException(env, "inverse gray lookup table");
+        }
         return SD_FAILURE;
     }
     if (xsdo->dgaAvailable && (lockflags & (SD_LOCK_RD_WR))) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/windows/classes/sun/awt/datatransfer/flavormap.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,69 @@
+#
+# This properties file is used to initialize the default
+# java.awt.datatransfer.SystemFlavorMap. It contains the Win32 platform-
+# specific, default mappings between common Win32 Clipboard atoms and platform-
+# independent MIME type strings, which will be converted into
+# java.awt.datatransfer.DataFlavors.
+#
+# The standard format is:
+#
+# <native>=<MIME type>,<MIME type>, ...
+#
+# <native> should be a string identifier that the native platform will
+# recognize as a valid data format. <MIME type> should specify both a MIME
+# primary type and a MIME subtype separated by a '/'. The MIME type may include
+# parameters, where each parameter is a key/value pair separated by '=', and
+# where each parameter to the MIME type is separated by a ';'.
+#
+# Because SystemFlavorMap implements FlavorTable, developers are free to
+# duplicate DataFlavor values and set multiple values for a single native by
+# separating them with ",". If a mapping contains a duplicate key or value,
+# earlier mappings which included this key or value will be preferred.#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", and which support the charset parameter, should specify the exact
+# format in which the native platform expects the data. The "charset"
+# parameter specifies the char to byte encoding, the "eoln" parameter
+# specifies the end-of-line marker, and the "terminators" parameter specifies
+# the number of terminating NUL bytes. Note that "eoln" and "terminators"
+# are not standardized MIME type parameters. They are specific to this file
+# format ONLY. They will not appear in any of the DataFlavors returned by the
+# SystemFlavorMap at the Java level.
+#
+# If the "charset" parameter is omitted, or has zero length, the platform
+# default encoding is assumed. If the "eoln" parameter is omitted, or has
+# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
+# or has a value less than zero, zero is assumed.
+#
+# Upon initialization, the data transfer subsystem will record the specified
+# details of the native text format, but the default SystemFlavorMap will
+# present a large set of synthesized DataFlavors which map, in both
+# directions, to the native. After receiving data from the application in one
+# of the synthetic DataFlavors, the data transfer subsystem will transform
+# the data stream into the format specified in this file before passing the
+# transformed stream to the native system.
+#
+# Mappings whose values specify DataFlavors with primary MIME types of
+# "text", but which do not support the charset parameter, will be treated as
+# opaque, 8-bit data. They will not undergo any transformation process, and
+# any "charset", "eoln", or "terminators" parameters specified in this file
+# will be ignored.
+#
+# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
+# text flavors which support the charset parameter.
+
+UNICODE\ TEXT=text/plain;charset=utf-16le;eoln="\r\n";terminators=2
+TEXT=text/plain;eoln="\r\n";terminators=1
+HTML\ Format=text/html;charset=utf-8;eoln="\r\n";terminators=1
+Rich\ Text\ Format=text/rtf
+HDROP=application/x-java-file-list;class=java.util.List
+PNG=image/x-java-image;class=java.awt.Image
+JFIF=image/x-java-image;class=java.awt.Image
+DIB=image/x-java-image;class=java.awt.Image
+ENHMETAFILE=image/x-java-image;class=java.awt.Image
+METAFILEPICT=image/x-java-image;class=java.awt.Image
+LOCALE=application/x-java-text-encoding;class="[B"
+UniformResourceLocator=application/x-java-url;class=java.net.URL,\
+                       text/uri-list;eoln="\r\n";terminators=1,\
+                       text/plain;eoln="\r\n";terminators=1
+FileGroupDescriptorW=application/x-java-file-list;class=java.util.List
+FileGroupDescriptor=application/x-java-file-list;class=java.util.List
--- a/jdk/src/windows/lib/flavormap.properties	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#
-# This properties file is used to initialize the default
-# java.awt.datatransfer.SystemFlavorMap. It contains the Win32 platform-
-# specific, default mappings between common Win32 Clipboard atoms and platform-
-# independent MIME type strings, which will be converted into
-# java.awt.datatransfer.DataFlavors.
-#
-# These default mappings may be augmented by specifying the
-#
-#       AWT.DnD.flavorMapFileURL 
-#
-# property in the appropriate awt.properties file. The specified properties URL
-# will be loaded into the SystemFlavorMap.
-#
-# The standard format is:
-#
-# <native>=<MIME type>
-#
-# <native> should be a string identifier that the native platform will
-# recognize as a valid data format. <MIME type> should specify both a MIME
-# primary type and a MIME subtype separated by a '/'. The MIME type may include
-# parameters, where each parameter is a key/value pair separated by '=', and
-# where each parameter to the MIME type is separated by a ';'.
-#
-# Because SystemFlavorMap implements FlavorTable, developers are free to
-# duplicate both native keys and DataFlavor values. If a mapping contains a
-# duplicate key or value, earlier mappings which included this key or value
-# will be preferred.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", and which support the charset parameter, should specify the exact
-# format in which the native platform expects the data. The "charset"
-# parameter specifies the char to byte encoding, the "eoln" parameter
-# specifies the end-of-line marker, and the "terminators" parameter specifies
-# the number of terminating NUL bytes. Note that "eoln" and "terminators"
-# are not standardized MIME type parameters. They are specific to this file
-# format ONLY. They will not appear in any of the DataFlavors returned by the
-# SystemFlavorMap at the Java level.
-#
-# If the "charset" parameter is omitted, or has zero length, the platform
-# default encoding is assumed. If the "eoln" parameter is omitted, or has
-# zero length, "\n" is assumed. If the "terminators" parameter is omitted,
-# or has a value less than zero, zero is assumed.
-#
-# Upon initialization, the data transfer subsystem will record the specified
-# details of the native text format, but the default SystemFlavorMap will
-# present a large set of synthesized DataFlavors which map, in both
-# directions, to the native. After receiving data from the application in one
-# of the synthetic DataFlavors, the data transfer subsystem will transform
-# the data stream into the format specified in this file before passing the
-# transformed stream to the native system.
-#
-# Mappings whose values specify DataFlavors with primary MIME types of
-# "text", but which do not support the charset parameter, will be treated as
-# opaque, 8-bit data. They will not undergo any transformation process, and
-# any "charset", "eoln", or "terminators" parameters specified in this file
-# will be ignored.
-#
-# See java.awt.datatransfer.DataFlavor.selectBestTextFlavor for a list of
-# text flavors which support the charset parameter.
-
-UNICODE\ TEXT=text/plain;charset=utf-16le;eoln="\r\n";terminators=2
-TEXT=text/plain;eoln="\r\n";terminators=1
-HTML\ Format=text/html;charset=utf-8;eoln="\r\n";terminators=1
-Rich\ Text\ Format=text/rtf
-HDROP=application/x-java-file-list;class=java.util.List
-PNG=image/x-java-image;class=java.awt.Image
-JFIF=image/x-java-image;class=java.awt.Image
-DIB=image/x-java-image;class=java.awt.Image
-ENHMETAFILE=image/x-java-image;class=java.awt.Image
-METAFILEPICT=image/x-java-image;class=java.awt.Image
-LOCALE=application/x-java-text-encoding;class="[B"
-UniformResourceLocator=application/x-java-url;class=java.net.URL
-UniformResourceLocator=text/uri-list;eoln="\r\n";terminators=1
-UniformResourceLocator=text/plain;eoln="\r\n";terminators=1
-FileGroupDescriptorW=application/x-java-file-list;class=java.util.List
-FileGroupDescriptor=application/x-java-file-list;class=java.util.List
--- a/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp	Fri Aug 08 11:36:48 2014 -0700
@@ -201,6 +201,9 @@
     int i;
     jint flags = 0;
 
+    for (i = 0; i < 4; i++) {
+        bands[i] = NULL;
+    }
     J2dTraceLn4(J2D_TRACE_INFO,
                 "D3DBufImgOps_EnableLookupOp: short=%d num=%d len=%d off=%d",
                 shortData, numBands, bandLength, offset);
--- a/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c	Fri Aug 08 11:36:48 2014 -0700
@@ -406,6 +406,14 @@
     result = LockFileEx(h, flags, 0, lowNumBytes, highNumBytes, &o);
     if (result == 0) {
         int error = GetLastError();
+        if (error == ERROR_IO_PENDING) {
+            LPDWORD dwBytes;
+            result = GetOverlappedResult(h, &o, &dwBytes, TRUE);
+            if (result != 0) {
+                return sun_nio_ch_FileDispatcherImpl_LOCKED;
+            }
+            error = GetLastError();
+        }
         if (error != ERROR_LOCK_VIOLATION) {
             JNU_ThrowIOExceptionWithLastError(env, "Lock failed");
             return sun_nio_ch_FileDispatcherImpl_NO_LOCK;
--- a/jdk/src/windows/native/sun/security/mscapi/security.cpp	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/security/mscapi/security.cpp	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -74,7 +74,10 @@
     const char* pszHashAlgorithm = NULL;
     ALG_ID algId = 0;
 
-    pszHashAlgorithm = env->GetStringUTFChars(jHashAlgorithm, NULL);
+    if ((pszHashAlgorithm = env->GetStringUTFChars(jHashAlgorithm, NULL))
+        == NULL) {
+        return algId;
+    }
 
     if ((strcmp("SHA", pszHashAlgorithm) == 0) ||
         (strcmp("SHA1", pszHashAlgorithm) == 0) ||
@@ -179,7 +182,9 @@
          */
         if (length < 0) {
             length = env->GetArrayLength(seed);
-            reseedBytes = env->GetByteArrayElements(seed, 0);
+            if ((reseedBytes = env->GetByteArrayElements(seed, 0)) == NULL) {
+                __leave;
+            }
 
             if (::CryptGenRandom(
                 hCryptProv,
@@ -211,7 +216,9 @@
         } else { // length == 0
 
             length = env->GetArrayLength(seed);
-            seedBytes = env->GetByteArrayElements(seed, 0);
+            if ((seedBytes = env->GetByteArrayElements(seed, 0)) == NULL) {
+                __leave;
+            }
 
             if (::CryptGenRandom(
                 hCryptProv,
@@ -275,7 +282,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName))
             == NULL) {
 
@@ -710,7 +720,10 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         // Prefer a PROV_RSA_AES CSP, when available, due to its support
@@ -847,7 +860,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
             ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
             __leave;
@@ -1086,7 +1102,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
             ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
             __leave;
@@ -1123,7 +1142,10 @@
                 cchNameString);
 
             // Compare the certificate's friendly name with supplied alias name
-            pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL);
+            if ((pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL))
+                == NULL) {
+                __leave;
+            }
             if (strcmp(pszCertAliasName, pszNameString) == 0) {
 
                 // Only delete the certificate if the alias names matches
@@ -1181,7 +1203,10 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
 
         // Destroying the default key container is not permitted
         // (because it may contain more one keypair).
@@ -1234,8 +1259,14 @@
 
     __try
     {
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
-        pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
+        if ((pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL))
+            == NULL) {
+            __leave;
+        }
 
         // Open a system certificate store.
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
@@ -1530,7 +1561,9 @@
     __try {
 
         jsize length = env->GetArrayLength(jKeyBlob);
-        keyBlob = env->GetByteArrayElements(jKeyBlob, 0);
+        if ((keyBlob = env->GetByteArrayElements(jKeyBlob, 0)) == NULL) {
+            __leave;
+        }
 
         PUBLICKEYSTRUC* pPublicKeyStruc = (PUBLICKEYSTRUC *) keyBlob;
 
@@ -1580,7 +1613,9 @@
     __try {
 
         jsize length = env->GetArrayLength(jKeyBlob);
-        keyBlob = env->GetByteArrayElements(jKeyBlob, 0);
+        if ((keyBlob = env->GetByteArrayElements(jKeyBlob, 0)) == NULL) {
+            __leave;
+        }
 
         PUBLICKEYSTRUC* pPublicKeyStruc = (PUBLICKEYSTRUC *) keyBlob;
 
@@ -1632,6 +1667,9 @@
     }
 
     jbyte* sourceBytes = env->GetByteArrayElements(source, 0);
+    if (sourceBytes == NULL) {
+        return -1;
+    }
 
     // Copy bytes from the end of the source array to the beginning of the
     // destination array (until the destination array is full).
@@ -1740,45 +1778,61 @@
         }
         // The length argument must be the smaller of jPublicExponentLength
         // and sizeof(pRsaPubKey->pubkey)
-        convertToLittleEndian(env, jPublicExponent,
-            (jbyte *) &(pRsaPubKey->pubexp), jPublicExponentLength);
+        if ((jElementLength = convertToLittleEndian(env, jPublicExponent,
+            (jbyte *) &(pRsaPubKey->pubexp), jPublicExponentLength)) < 0) {
+            __leave;
+        }
 
         // Modulus n
         jBlobElement =
             (jbyte *) (jBlobBytes + sizeof(PUBLICKEYSTRUC) + sizeof(RSAPUBKEY));
-        jElementLength = convertToLittleEndian(env, jModulus, jBlobElement,
-            jKeyByteLength);
+        if ((jElementLength = convertToLittleEndian(env, jModulus, jBlobElement,
+            jKeyByteLength)) < 0) {
+            __leave;
+        }
 
         if (bGeneratePrivateKeyBlob) {
             // Prime p
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jPrimeP, jBlobElement,
-                jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jPrimeP,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime q
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jPrimeQ, jBlobElement,
-                jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jPrimeQ,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime exponent p
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jExponentP,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jExponentP,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime exponent q
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jExponentQ,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jExponentQ,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // CRT coefficient
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jCrtCoefficient,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jCrtCoefficient,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Private exponent
             jBlobElement += jElementLength;
-            convertToLittleEndian(env, jPrivateExponent, jBlobElement,
-                jKeyByteLength);
+            if ((jElementLength = convertToLittleEndian(env, jPrivateExponent,
+                jBlobElement, jKeyByteLength)) < 0) {
+                __leave;
+            }
         }
 
         jBlob = env->NewByteArray(jBlobLength);
@@ -1849,9 +1903,15 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
         dwBlobLen = env->GetArrayLength(keyBlob);
-        pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0);
+        if ((pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0))
+            == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         if (::CryptAcquireContext(
@@ -1923,7 +1983,10 @@
     __try
     {
         dwBlobLen = env->GetArrayLength(keyBlob);
-        pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0);
+        if ((pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0))
+            == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         // Prefer a PROV_RSA_AES CSP, when available, due to its support
--- a/jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c	Fri Aug 08 11:36:48 2014 -0700
@@ -388,6 +388,7 @@
     if (argsLen > 0) {
         if (argsLen > MAX_ARGS) {
             JNU_ThrowInternalError(env, "Too many arguments");
+            return;
         }
         for (i=0; i<argsLen; i++) {
             jobject obj = (*env)->GetObjectArrayElement(env, args, i);
@@ -423,6 +424,8 @@
     stubLen = (DWORD)(*env)->GetArrayLength(env, stub);
     stubCode = (*env)->GetByteArrayElements(env, stub, &isCopy);
 
+    if ((*env)->ExceptionOccurred(env)) return;
+
     pCode = (PDWORD) VirtualAllocEx( hProcess, 0, stubLen, MEM_COMMIT, PAGE_EXECUTE_READWRITE );
     if (pCode == NULL) {
         JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed");
@@ -592,6 +595,8 @@
         cstr[0] = '\0';
     } else {
         str = JNU_GetStringPlatformChars(env, jstr, &isCopy);
+        if ((*env)->ExceptionOccurred(env)) return;
+
         strncpy(cstr, str, len);
         cstr[len-1] = '\0';
         if (isCopy) {
--- a/jdk/src/windows/native/sun/windows/awt_Component.cpp	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp	Fri Aug 08 11:36:48 2014 -0700
@@ -6935,9 +6935,9 @@
 {
     TRY;
 
-    return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
+    return (jboolean)AwtToolkit::GetInstance().SyncCall(
         (void *(*)(void *))AwtComponent::_NativeHandlesWheelScrolling,
-        env->NewGlobalRef(self)));
+        env->NewGlobalRef(self));
     // global ref is deleted in _NativeHandlesWheelScrolling
 
     CATCH_BAD_ALLOC_RET(NULL);
@@ -6956,9 +6956,9 @@
 
     jobject selfGlobalRef = env->NewGlobalRef(self);
 
-    return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
+    return (jboolean)AwtToolkit::GetInstance().SyncCall(
         (void*(*)(void*))AwtComponent::_IsObscured,
-        (void *)selfGlobalRef));
+        (void *)selfGlobalRef);
     // selfGlobalRef is deleted in _IsObscured
 
     CATCH_BAD_ALLOC_RET(NULL);
--- a/jdk/src/windows/native/sun/windows/awt_List.cpp	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_List.cpp	Fri Aug 08 11:36:48 2014 -0700
@@ -1018,8 +1018,8 @@
     ses->list = env->NewGlobalRef(self);
     ses->index = index;
 
-    return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
-                       (void *(*)(void *))AwtList::_IsSelected, ses));
+    return (jboolean)AwtToolkit::GetInstance().SyncCall(
+        (void *(*)(void *))AwtList::_IsSelected, ses);
     // global ref and ses are deleted in _IsSelected
 
     CATCH_BAD_ALLOC_RET(FALSE);
--- a/jdk/test/ProblemList.txt	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/ProblemList.txt	Fri Aug 08 11:36:48 2014 -0700
@@ -204,10 +204,8 @@
 sun/security/pkcs11/ec/TestKeyFactory.java                      generic-all
 
 # 7164518: no PortUnreachableException on Mac
-sun/security/krb5/auto/Unreachable.java                         macosx-all
-
-# 7147060
-com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	generic-all
+# 8051952: Unreachable.java test failing on Windows
+sun/security/krb5/auto/Unreachable.java                         windows-all,macosx-all
 
 # 6988842: 4 tests failing on Solaris 5.10
 sun/security/pkcs11/Secmod/AddPrivateKey.java                   solaris-all
@@ -215,7 +213,7 @@
 sun/security/pkcs11/ec/ReadPKCS12.java                          solaris-all
 sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java            solaris-all
 
-# 7041639, Solaris DSA keypair generation bug
+# 7041639: Solaris DSA keypair generation bug
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
@@ -240,8 +238,8 @@
 # jdk_tools
 
 # Tests take too long, on sparcs see 7143279
-tools/pack200/CommandLineTests.java                             solaris-all, macosx-all
-tools/pack200/Pack200Test.java                                  solaris-all, macosx-all
+tools/pack200/CommandLineTests.java                             solaris-all,macosx-all
+tools/pack200/Pack200Test.java                                  solaris-all,macosx-all
 
 # 8007410
 tools/launcher/FXLauncherTest.java                              linux-all
@@ -251,7 +249,7 @@
 # jdk_jdi
 
 # 6983531
-com/sun/jdi/BadHandshakeTest.java                               linux-all, windows-all
+com/sun/jdi/BadHandshakeTest.java                               linux-all,windows-all
 
 # 8004127
 com/sun/jdi/RedefineImplementor.sh                              generic-all
--- a/jdk/test/com/sun/jdi/ExclusiveBind.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/com/sun/jdi/ExclusiveBind.java	Fri Aug 08 11:36:48 2014 -0700
@@ -108,7 +108,7 @@
                 "process1",
                 process1,
                 line -> line.equals("Listening for transport dt_socket at address: " + address),
-                Math.round(5000 * Utils.TIMEOUT_FACTOR),
+                Utils.adjustTimeout(5000),
                 TimeUnit.MILLISECONDS
         );
 
--- a/jdk/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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,9 +24,9 @@
 /**
  * @test
  * @author Sean Mullan
- * @bug 6461674 8009217
+ * @bug 6461674 8009217 7147060
  * @compile -XDignore.symbol.file ClassLoaderTest.java MyTransform.java
- * @run main ClassLoaderTest
+ * @run main/othervm ClassLoaderTest
  * @summary Ensure Transform.register works with transform implementations
  *   loaded by class loader other than system/boot class loader
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Frame;
+import javax.swing.JFrame;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.awt.EventQueue;
+import java.awt.FlowLayout;
+import java.awt.Rectangle;
+import java.lang.reflect.InvocationTargetException;
+/*
+ * @test
+ * @bug 8022302
+ * @summary Set extendedState Frame.MAXIMIZED_BOTH for undecorated Frame and JFrame.
+ *          Check if resulted size is equal to GraphicsEnvironment.getMaximumWindowBounds().
+ *
+ * @library ../../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main MaximizedUndecorated
+ */
+
+
+public class MaximizedUndecorated {
+    private Frame frame;
+    private ExtendedRobot robot;
+    public static void main(String args[]) {
+        if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
+            return;
+        }
+        MaximizedUndecorated test = new MaximizedUndecorated();
+        boolean doPass = true;
+        try{
+            if( !test.doTest(true) ) {
+                System.out.println("Actual bounds differ from Maximum Window Bounds for JFrame");
+                doPass = false;
+            }
+            if( !test.doTest(false) ) {
+                System.out.println("Actual bounds differ from Maximum Window Bounds for Frame");
+                doPass = false;
+            }
+        }catch(Exception ie) {
+            ie.printStackTrace();
+            throw new RuntimeException("Interrupted or InvocationTargetException occured");
+        }
+        if(!doPass) {
+            throw new RuntimeException("Actual bounds of undecorated frame differ from Maximum Windows Bounds for this platform");
+        }
+    }
+    MaximizedUndecorated() {
+        try {
+            robot = new ExtendedRobot();
+        }catch(Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException("Cannot create robot");
+        }
+    }
+    boolean doTest(boolean swingFrame) throws InterruptedException, InvocationTargetException {
+        EventQueue.invokeAndWait( () -> {
+            frame = swingFrame? new JFrame("Test Frame") : new Frame("Test Frame");
+            frame.setLayout(new FlowLayout());
+            frame.setBounds(50,50,300,300);
+            frame.setUndecorated(true);
+            frame.setVisible(true);
+        });
+        robot.waitForIdle(2000);
+        EventQueue.invokeAndWait( () -> {
+            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+        });
+        robot.waitForIdle(2000);
+        Rectangle actualBounds = frame.getBounds();
+        Rectangle expectedBounds = GraphicsEnvironment.
+               getLocalGraphicsEnvironment().getMaximumWindowBounds();
+        EventQueue.invokeAndWait( () -> {
+            frame.dispose();
+        });
+
+        return actualBounds.equals(expectedBounds);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDAppModalTest
+ */
+
+public class BlockingDDAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest(Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDDocModalTest
+ */
+
+public class BlockingDDDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest(Dialog.ModalityType.DOCUMENT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDModelessTest
+ */
+
+public class BlockingDDModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest(Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDNonModalTest
+ */
+
+public class BlockingDDNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest(null)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDSetModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDSetModalTest
+ */
+
+public class BlockingDDSetModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+// DD: Dialog -> Dialog
+
+public class BlockingDDTest {
+
+    private TestDialog parent, dialog;
+
+    private static final int delay = 1000;
+    private final ExtendedRobot robot;
+
+    private final Dialog.ModalityType modalityType;
+    private final boolean setModal;
+
+    private BlockingDDTest(Dialog.ModalityType modType, boolean modal) throws Exception {
+
+        modalityType = modType;
+        setModal = modal;
+        robot = new ExtendedRobot();
+        createGUI();
+    }
+
+    public BlockingDDTest(Dialog.ModalityType modType) throws Exception {
+        this(modType, false);
+    }
+
+    public BlockingDDTest() throws Exception {
+        this(null, true);
+    }
+
+
+    private void showParent() {
+
+        parent = new TestDialog((Frame) null);
+        parent.setTitle("Parent");
+        parent.setLocation(50, 50);
+        parent.setVisible(true);
+    }
+
+    private void showChild() {
+
+        dialog = new TestDialog(parent);
+        if (setModal) {
+            dialog.setModal(true);
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setLocation(250, 50);
+        dialog.setVisible(true);
+    }
+
+
+    private void createGUI() throws Exception {
+
+        EventQueue.invokeAndWait(this::showParent);
+        robot.waitForIdle(delay);
+        EventQueue.invokeLater(this::showChild);
+        robot.waitForIdle(delay);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "the 1st Dialog button " +
+                "did not gain focus when it became visible");
+
+            assertTrue(dialog.closeButton.hasFocus(), "the 1st Dialog button " +
+                "gained the focus but lost it afterwards");
+
+            dialog.checkUnblockedDialog(robot, "Modal Dialog shouldn't be blocked.");
+
+            if ((modalityType == Dialog.ModalityType.APPLICATION_MODAL) ||
+                (modalityType == Dialog.ModalityType.DOCUMENT_MODAL) ||
+                (modalityType == Dialog.ModalityType.TOOLKIT_MODAL) ||
+                dialog.isModal())
+            {
+                parent.checkBlockedDialog(robot,
+                    "Dialog is the parent of a visible " + modalityType + " Dialog.");
+            } else {
+                parent.checkUnblockedDialog(robot,
+                    "Dialog is the parent of a visible " + modalityType + " Dialog.");
+            }
+
+            robot.waitForIdle(delay);
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (parent != null) { parent.dispose(); }
+        if (dialog != null) { dialog.dispose(); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDDToolkitModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDDToolkitModalTest
+ */
+
+public class BlockingDDToolkitModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDDTest(Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDFAppModalTest
+ */
+
+public class BlockingDFAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFTest(Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFSetModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDFSetModalTest
+ */
+
+public class BlockingDFSetModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+// DF: Dialog -> Frame
+
+public class BlockingDFTest {
+
+    private TestDialog dialog;
+    private TestFrame  frame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private BlockingDFTest(Dialog.ModalityType modalityType,
+                           boolean             setModal) throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(() -> { createGUI(modalityType, setModal); });
+    }
+
+    public BlockingDFTest(Dialog.ModalityType modalityType) throws Exception {
+        this(modalityType, false);
+    }
+
+    public BlockingDFTest() throws Exception { this(null, true); }
+
+
+    private void createGUI(Dialog.ModalityType modalityType,
+                           boolean             setModal) {
+
+        frame = new TestFrame();
+        frame.setLocation(50, 50);
+        frame.setVisible(true);
+
+        dialog = new TestDialog((Dialog) null);
+        dialog.setLocation(250, 50);
+        if (setModal) {
+            dialog.setModal(true);
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "The 1st button did not " +
+                "gain focus when the dialog became visible");
+
+            dialog.checkUnblockedDialog(robot, "");
+            frame.checkBlockedFrame(robot, "");
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (frame  != null) {  frame.dispose(); }
+        if (dialog != null) { dialog.dispose(); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFToolkitModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receives focus
+ *          and respond to key events. Check also the correctness
+ *          of blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main BlockingDFToolkitModalTest
+ */
+
+public class BlockingDFToolkitModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFTest(Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFWModeless1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also if the other windows
+ *          receive mouse and key events.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingDFWModeless1Test
+ */
+
+public class BlockingDFWModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFWTest(
+            BlockingDFWTest.Parent.FRAME,
+            Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFWModeless2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also if the other windows
+ *          receive mouse and key events.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingDFWModeless2Test
+ */
+
+public class BlockingDFWModeless2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFWTest(
+            BlockingDFWTest.Parent.DIALOG,
+            Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also if the other windows
+ *          receive mouse and key events.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingDFWNonModal1Test
+ */
+
+public class BlockingDFWNonModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFWTest(
+            BlockingDFWTest.Parent.FRAME, null)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a Dialog
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also if the other windows
+ *          receive mouse and key events.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingDFWNonModal2Test
+ */
+
+public class BlockingDFWNonModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDFWTest(
+            BlockingDFWTest.Parent.DIALOG, null)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDFWTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import java.awt.event.KeyEvent;
+import static jdk.testlibrary.Asserts.*;
+
+// DFW: Dialog -> Frame -> Window
+
+public class BlockingDFWTest {
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    public enum Parent {DIALOG, FRAME};
+
+    private ParentDialog parentDialog;
+    private ParentFrame  parentFrame;
+    private TestDialog dialog;
+    private TestFrame frame;
+    private TestWindow window;
+
+
+    public BlockingDFWTest(Parent parentWin, Dialog.ModalityType modalityType) throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(() -> { createGUI(parentWin, modalityType); });
+    }
+
+    private void createGUI(Parent parentWin, Dialog.ModalityType modalityType) {
+
+        Window p = null;
+        switch (parentWin) {
+            case DIALOG:
+                parentDialog = new ParentDialog((Dialog) null);
+                dialog = new CustomDialog(parentDialog);
+                p = parentDialog;
+                break;
+            case FRAME:
+                parentFrame = new ParentFrame();
+                dialog = new CustomDialog(parentFrame);
+                p = parentFrame;
+                break;
+        }
+
+        assertFalse(p == null, "invalid parent");
+        p.setLocation(50, 50);
+        dialog.setLocation(250, 50);
+        if (modalityType != null) { dialog.setModalityType(modalityType); }
+
+        frame = new TestFrame();
+        frame.setLocation(50, 250);
+        window = new TestWindow(frame);
+        window.setLocation(250, 250);
+
+        p.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            if (parentDialog != null) { parentDialog.clickOpenButton(robot); }
+            else if (parentFrame != null) { parentFrame.clickOpenButton(robot); }
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "the 1st button did not gain " +
+                "focus when the dialog became visible");
+
+            assertTrue(dialog.closeButton.hasFocus(), "the 1st dialog button " +
+                "gained focus, but lost it afterwards");
+
+            dialog.openGained.reset();
+            robot.type(KeyEvent.VK_TAB);
+
+            dialog.openGained.waitForFlagTriggered();
+            assertTrue(dialog.openGained.flag(), "Tab navigation did not happen " +
+                "properly; open button did not gain focus on tab press " +
+                "when parent frame is visible");
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            frame.activated.waitForFlagTriggered();
+            assertTrue(frame.activated.flag(), "Frame did not trigger " +
+                "Window Activated event when made visible.");
+
+            frame.checkUnblockedFrame(robot, "Frame should not be blocked.");
+            window.checkUnblockedWindow(robot, "Window should not be blocked.");
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+        if (parentDialog != null) { parentDialog.dispose(); }
+        if (parentFrame  != null) {  parentFrame.dispose(); }
+    }
+
+
+    class ParentDialog extends TestDialog {
+
+        public ParentDialog(Dialog d) { super(d); }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+
+    class ParentFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+        public CustomDialog(Frame  f) { super(f); }
+
+        @Override
+        public void doOpenAction() {
+            if (frame  != null) {  frame.setVisible(true); }
+            if (window != null) { window.setVisible(true); }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Test if a document modality works as expected:
+ *          whether all the windows lying down the document root
+ *          (Frame) get blocked.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingDocModalTest
+ */
+
+
+public class BlockingDocModalTest {
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private TestDialog dialog, childDialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+
+    public BlockingDocModalTest() throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+        frame.setVisible(true);
+
+        dialog = new TestDialog(frame);
+        dialog.setLocation(250, 250);
+        dialog.setVisible(true);
+
+        childDialog = new CustomDialog(dialog);
+        childDialog.setLocation(250, 50);
+        childDialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
+
+        window = new TestWindow(frame);
+        window.setLocation(50, 250);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            frame.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            childDialog.activated.waitForFlagTriggered();
+            assertTrue(childDialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            childDialog.closeGained.waitForFlagTriggered();
+            assertTrue(childDialog.closeGained.flag(), "the 1st button did not " +
+                "gain focus when the Dialog became visible");
+
+            assertTrue(childDialog.closeButton.hasFocus(), "the 1st dialog button " +
+                "gained focus but lost it afterwards");
+
+            frame.checkBlockedFrame(robot, "A document modal Dialog from " +
+                "this Frame's child hierarchy should block this frame");
+
+            childDialog.checkUnblockedDialog(robot,
+                "This is a document modal childDialog.");
+
+            childDialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkBlockedWindow(robot,
+                "A document modal dialog having a parent belonging " +
+                "to this Window's document hierarchy is displayed.");
+
+            dialog.checkBlockedDialog(robot,
+                "A document modal child dialog should block this Dialog.");
+
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+        if (childDialog != null) { childDialog.dispose(); }
+    }
+
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (childDialog != null) { childDialog.setVisible(true); }
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) { window.setVisible(true); }
+        }
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingDocModalTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDAppModalTest
+ */
+
+public class BlockingFDAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest(Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDDocModalTest
+ */
+
+public class BlockingFDDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest(Dialog.ModalityType.DOCUMENT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDModelessTest
+ */
+
+public class BlockingFDModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest(Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDNonModalTest
+ */
+
+public class BlockingFDNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest(null)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDSetModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDSetModalTest
+ */
+
+public class BlockingFDSetModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+// FD: Frame -> Dialog
+
+public class BlockingFDTest {
+
+    private TestFrame  frame;
+    private TestDialog dialog;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private final Dialog.ModalityType modalityType;
+    private final boolean setModal;
+
+    private BlockingFDTest(Dialog.ModalityType modType, boolean modal) throws Exception {
+
+        modalityType = modType;
+        setModal = modal;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    public BlockingFDTest(Dialog.ModalityType modType) throws Exception {
+        this(modType, false);
+    }
+
+    public BlockingFDTest() throws Exception {
+        this(null, true);
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+        dialog = new TestDialog(frame);
+        if (setModal) {
+            dialog.setModal(true);
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+        dialog.setLocation(250, 50);
+
+        frame.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            frame.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "the 1st Dialog button " +
+                "did not gain focus when it became visible");
+
+            assertTrue(dialog.closeButton.hasFocus(), "the 1st Dialog button " +
+                "gained the focus but lost it afterwards");
+
+            if ((modalityType == Dialog.ModalityType.APPLICATION_MODAL) ||
+                (modalityType == Dialog.ModalityType.DOCUMENT_MODAL) ||
+                (modalityType == Dialog.ModalityType.TOOLKIT_MODAL) ||
+                setModal)
+            {
+                frame.checkBlockedFrame(robot,
+                    "Frame is the parent of a visible " + modalityType + " Dialog.");
+            } else {
+                frame.checkUnblockedFrame(robot,
+                    "Frame is the parent of a visible " + modalityType + " Dialog.");
+            }
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (frame  != null) {  frame.dispose(); }
+        if (dialog != null) { dialog.dispose(); }
+    }
+
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDToolkitModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a Frame
+ *          constructor receives focus, whether its components receive focus
+ *          and respond to key events. Check also the correctness
+ *          of the blocking behavior for the parent Frame.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main BlockingFDToolkitModalTest
+ */
+
+public class BlockingFDToolkitModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDTest(Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWDocModal1Test
+ */
+
+public class BlockingFDWDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.DOCUMENT_MODAL,
+            BlockingFDWTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWDocModal2Test
+ */
+
+public class BlockingFDWDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.DOCUMENT_MODAL,
+            BlockingFDWTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWDocModal3Test
+ */
+
+public class BlockingFDWDocModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.DOCUMENT_MODAL,
+            BlockingFDWTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWDocModal4Test
+ */
+
+public class BlockingFDWDocModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.DOCUMENT_MODAL,
+            BlockingFDWTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWModeless1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWModeless1Test
+ */
+
+public class BlockingFDWModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.MODELESS,
+            BlockingFDWTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWModeless2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWModeless2Test
+ */
+
+public class BlockingFDWModeless2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.MODELESS,
+            BlockingFDWTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWModeless3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWModeless3Test
+ */
+
+public class BlockingFDWModeless3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.MODELESS,
+            BlockingFDWTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWModeless4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWModeless4Test
+ */
+
+public class BlockingFDWModeless4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(Dialog.ModalityType.MODELESS,
+            BlockingFDWTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWNonModal1Test
+ */
+
+public class BlockingFDWNonModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(null,
+            BlockingFDWTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWNonModal2Test
+ */
+
+public class BlockingFDWNonModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(null,
+            BlockingFDWTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWNonModal3Test
+ */
+
+public class BlockingFDWNonModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(null,
+            BlockingFDWTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Check also the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingFDWNonModal4Test
+ */
+
+public class BlockingFDWNonModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingFDWTest(null,
+            BlockingFDWTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingFDWTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+// FDW: Frame -> Dialog -> Window
+
+public class BlockingFDWTest {
+
+    private TestFrame  frame;
+    private TestDialog dialog;
+    private TestWindow window;
+
+    private Dialog hiddenDialog;
+    private Frame  hiddenFrame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    public enum DialogOwner {HIDDEN_DIALOG, NULL_DIALOG, HIDDEN_FRAME, NULL_FRAME};
+
+    public BlockingFDWTest(Dialog.ModalityType modalityType,
+                           DialogOwner         owner) throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(() -> { createGUI(modalityType, owner); });
+    }
+
+    private void createGUI(Dialog.ModalityType modalityType,
+                           DialogOwner         owner) {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+
+        switch (owner) {
+            case HIDDEN_DIALOG:
+                hiddenDialog = new Dialog((Frame) null);
+                dialog = new CustomDialog(hiddenDialog);
+                break;
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+            case HIDDEN_FRAME:
+                hiddenFrame = new Frame();
+                dialog = new CustomDialog(hiddenFrame);
+                break;
+            case NULL_FRAME:
+                dialog = new CustomDialog((Frame) null);
+                break;
+        }
+
+        assertFalse(dialog == null, "error: null dialog");
+
+        dialog.setLocation(250, 50);
+        if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        window = new TestWindow(frame);
+        window.setLocation(450, 50);
+
+        frame.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            frame.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "the 1st Dialog button " +
+                "did not gain focus when it became visible");
+
+            assertTrue(dialog.closeButton.hasFocus(), "the 1st Dialog button " +
+                "gained the focus but lost it afterwards");
+
+            frame.checkUnblockedFrame(robot, "A " + dialog.getModalityType() + " dialog is visible.");
+
+            dialog.checkUnblockedDialog(robot, "A Frame is visible.");
+
+            dialog.openClicked.reset();
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkUnblockedWindow(robot,
+                "A Frame and a " + dialog.getModalityType() + " Dialog are visible.");
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (frame  != null) {  frame.dispose(); }
+        if (dialog != null) { dialog.dispose(); }
+        if (window != null) { window.dispose(); }
+        if (hiddenDialog != null) { hiddenDialog.dispose(); }
+        if (hiddenFrame  != null) {  hiddenFrame.dispose(); }
+    }
+
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog dialog) {
+            super(dialog);
+        }
+
+        public CustomDialog(Frame frame) {
+            super(frame);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) { window.setVisible(true); }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal1Test
+ */
+
+public class BlockingWindowsAppModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal2Test
+ */
+
+public class BlockingWindowsAppModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal3Test
+ */
+
+public class BlockingWindowsAppModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal4Test
+ */
+
+public class BlockingWindowsAppModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal5Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal5Test
+ */
+
+public class BlockingWindowsAppModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal6Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog created with a Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsAppModal6Test
+ */
+
+public class BlockingWindowsAppModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.APPLICATION_MODAL,
+                BlockingWindowsTest.DialogOwner.DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsDocModal1Test
+ */
+
+public class BlockingWindowsDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsDocModalTest(
+                BlockingWindowsDocModalTest.Parent.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog created with a Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsDocModal2Test
+ */
+
+public class BlockingWindowsDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsDocModalTest(
+                BlockingWindowsDocModalTest.Parent.DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,211 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import java.awt.event.KeyEvent;
+import static jdk.testlibrary.Asserts.*;
+
+import java.util.List;
+import java.util.ArrayList;
+
+public class BlockingWindowsDocModalTest {
+
+    private ParentDialog parentDialog;
+    private ParentFrame  parentFrame;
+    private CustomDialog dialog;
+    private TestDialog secondDialog, childDialog;
+    private TestFrame  secondFrame;
+    private TestWindow window, childWindow, secondWindow;
+
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private List<Window> allWindows;
+
+    public enum Parent {DIALOG, FRAME};
+    private Parent root;
+
+    public BlockingWindowsDocModalTest(Parent p) throws Exception {
+
+        root = p;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        allWindows = new ArrayList<>();
+
+        switch (root) {
+            case DIALOG:
+                parentDialog = new ParentDialog((Dialog) null);
+                parentDialog.setLocation(50, 50);
+                parentDialog.setVisible(true);
+                allWindows.add(parentDialog);
+
+                dialog = new CustomDialog(parentDialog);
+                secondDialog = new TestDialog(parentDialog);
+                window = new TestWindow(parentDialog);
+                break;
+            case FRAME:
+                parentFrame = new ParentFrame();
+                parentFrame.setLocation(50, 50);
+                parentFrame.setVisible(true);
+                allWindows.add(parentFrame);
+
+                dialog = new CustomDialog(parentFrame);
+                secondDialog = new TestDialog(parentFrame);
+                window = new TestWindow(parentFrame);
+                break;
+        }
+
+        allWindows.add(dialog);
+        allWindows.add(secondDialog);
+        allWindows.add(window);
+
+        dialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
+        dialog.setLocation(250, 50);
+        window.setLocation(450, 50);
+        secondDialog.setLocation(450, 250);
+
+        secondFrame = new TestFrame();
+        allWindows.add(secondFrame);
+        secondFrame.setLocation(50, 250);
+
+        secondWindow = new TestWindow(secondFrame);
+        allWindows.add(secondWindow);
+        secondWindow.setLocation(250, 250);
+
+        childDialog = new TestDialog(dialog);
+        allWindows.add(childDialog);
+        childDialog.setLocation(250, 450);
+
+        childWindow = new TestWindow(dialog);
+        allWindows.add(childWindow);
+        childWindow.setLocation(50, 450);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+            robot.waitForIdle(delay);
+
+            if (root == Parent.DIALOG) {
+                parentDialog.clickOpenButton(robot);
+            } else { //Parent.FRAME
+                parentFrame.clickOpenButton(robot);
+            }
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Acivated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(),
+                "the 1st Dialog button didn't gain focus");
+
+            assertTrue(dialog.closeButton.hasFocus(), "the 1st Dialog button " +
+                "gained focus but lost it afterwards");
+
+            dialog.openGained.reset();
+            robot.type(KeyEvent.VK_TAB);
+
+            dialog.openGained.waitForFlagTriggered();
+            assertTrue(dialog.openGained.flag(), "Tab navigation did not happen properly on Dialog; " +
+                "Open button did not gain focus on tab press when parent frame is visible");
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            secondFrame.checkUnblockedFrame(robot,
+                "A document modal dialog and its parent are visible.");
+            secondWindow.checkUnblockedWindow(robot,
+                "A Frame and a document modal Dialog are visible.");
+
+            if (root == Parent.DIALOG) {
+                parentDialog.checkBlockedDialog(robot, "Dialog is a parent of a document modal dialog.");
+            } else { //Parent.FRAME
+                parentFrame.checkBlockedFrame(robot, "Frame is a parent of a document modal dialog.");
+            }
+
+            secondDialog.checkBlockedDialog(robot,
+                "The parent of the Dialog is also the parent of a document modal dialog");
+            window.checkBlockedWindow(robot,
+                "The parent of the Window is also the parent of a document modal dialog");
+
+            childWindow.checkUnblockedWindow(robot,
+                "The parent of the Window is a document modal dialog");
+            childDialog.checkUnblockedDialog(robot,
+                "The parent of the Dialog is a document modal dialog");
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        for (Window w: allWindows) {
+            if (w != null) { w.dispose(); }
+        }
+    }
+
+    class ParentDialog extends TestDialog {
+
+        public ParentDialog(Dialog d) { super(d); }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+
+    class ParentFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+        public CustomDialog(Frame f)  { super(f); }
+
+        @Override
+        public void doOpenAction() {
+            if (secondFrame  != null) {  secondFrame.setVisible(true); }
+            if (secondWindow != null) { secondWindow.setVisible(true); }
+            if (secondDialog != null) { secondDialog.setVisible(true); }
+            if (window != null) { window.setVisible(true); }
+            if (childWindow != null) { childWindow.setVisible(true); }
+            if (childDialog != null) { childDialog.setVisible(true); }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal1Test
+ */
+
+public class BlockingWindowsSetModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal2Test
+ */
+
+public class BlockingWindowsSetModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal3Test
+ */
+
+public class BlockingWindowsSetModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal4Test
+ */
+
+public class BlockingWindowsSetModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal5Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal5Test
+ */
+
+public class BlockingWindowsSetModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal6Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog created with a Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsSetModal6Test
+ */
+
+public class BlockingWindowsSetModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(
+                BlockingWindowsTest.DialogOwner.DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2007, 2014, 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 static jdk.testlibrary.Asserts.*;
+
+import java.awt.*;
+import java.util.List;
+import java.util.ArrayList;
+
+public class BlockingWindowsTest {
+
+    private TestDialog dialog, childDialog, secondDialog, dummyDialog, parentDialog;
+    private TestFrame frame, secondFrame;
+    private TestWindow window, childWindow;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private List<Window> allWindows;
+
+    private Dialog hiddenDialog;
+    private Frame  hiddenFrame;
+
+    private Dialog.ModalityType modalityType;
+
+    public enum DialogOwner {HIDDEN_DIALOG, NULL_DIALOG, HIDDEN_FRAME, NULL_FRAME, DIALOG, FRAME};
+
+    private BlockingWindowsTest(Dialog.ModalityType modType,
+                                boolean             setModal,
+                                DialogOwner         owner) throws Exception {
+
+        modalityType = modType;
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(() -> {
+            createGUI(setModal, owner);
+        });
+    }
+
+    public BlockingWindowsTest(
+            Dialog.ModalityType modalityType, DialogOwner owner) throws Exception {
+        this(modalityType, false, owner);
+    }
+
+    public BlockingWindowsTest(DialogOwner owner) throws Exception {
+        this(null, true, owner);
+    }
+
+    private void createGUI(boolean     setModal,
+                           DialogOwner owner) {
+
+        allWindows = new ArrayList<>();
+
+        if (owner != DialogOwner.DIALOG) {
+            frame = new CustomFrame();
+            frame.setLocation(50, 50);
+            frame.setVisible(true);
+            allWindows.add(frame);
+        }
+
+        switch (owner) {
+            case DIALOG:
+                parentDialog = new ParentDialog((Dialog) null);
+                parentDialog.setLocation(50, 50);
+                parentDialog.setVisible(true);
+                allWindows.add(parentDialog);
+                dialog = new CustomDialog(parentDialog);
+                break;
+            case FRAME:
+                dialog = new CustomDialog(frame);
+                break;
+            case HIDDEN_DIALOG:
+                hiddenDialog = new Dialog((Frame) null);
+                dialog = new CustomDialog(hiddenDialog);
+                allWindows.add(hiddenDialog);
+                break;
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+            case HIDDEN_FRAME:
+                hiddenFrame = new Frame();
+                dialog = new CustomDialog(hiddenFrame);
+                allWindows.add(hiddenFrame);
+                break;
+            case NULL_FRAME:
+                dialog = new CustomDialog((Frame) null);
+                break;
+        }
+
+        assertFalse(dialog == null, "error: null dialog");
+
+        if (setModal) {
+            dialog.setModal(true);
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setLocation(250, 50);
+        allWindows.add(dialog);
+
+        if (owner == DialogOwner.DIALOG) {
+            window = new TestWindow(parentDialog);
+        } else {
+            window = new TestWindow(frame);
+        }
+
+        window.setLocation(50, 250);
+        allWindows.add(window);
+
+        if (owner == DialogOwner.DIALOG) {
+            dummyDialog = new TestDialog(parentDialog);
+        } else {
+            dummyDialog = new TestDialog(frame);
+        }
+        dummyDialog.setLocation(450, 450);
+        allWindows.add(dummyDialog);
+
+        childWindow = new CustomWindow(dialog);
+        childWindow.setLocation(450, 50);
+        allWindows.add(childWindow);
+
+        childDialog = new TestDialog(dialog);
+        childDialog.setLocation(450, 250);
+        allWindows.add(childDialog);
+
+        if (owner == DialogOwner.DIALOG) {
+            secondDialog = new CustomDialog(parentDialog);
+        } else {
+            secondDialog = new CustomDialog(frame);
+        }
+        if (setModal) {
+            secondDialog.setModal(true);
+        } else if (modalityType != null) {
+            secondDialog.setModalityType(modalityType);
+        }
+
+        secondDialog.setLocation(50, 450);
+        allWindows.add(secondDialog);
+
+        secondFrame = new TestFrame();
+        secondFrame.setLocation(250, 450);
+        allWindows.add(secondFrame);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            if (parentDialog == null) { frame.clickOpenButton(robot); }
+            else { parentDialog.clickOpenButton(robot); }
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+            dialog.closeGained.waitForFlagTriggered();
+            assertTrue(dialog.closeGained.flag(), "The first button did not gain focus " +
+                "when the dialog became visible");
+
+            assertTrue(dialog.closeButton.hasFocus(), "The first dialog button " +
+                "gained focus, but lost it afterwards");
+
+            if (parentDialog == null) {
+                frame.checkBlockedFrame(robot, modalityType + " Dialog is visible.");
+            } else {
+                parentDialog.checkBlockedDialog(robot, modalityType + " Dialog is visible.");
+            }
+
+            dialog.checkUnblockedDialog(robot, "A Frame is visible.");
+
+            dialog.openClicked.reset();
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            assertFalse(window.focusGained.flag(), "Window gained focus on becoming " +
+                "visible when Frame and Dialog are visible");
+
+            window.checkBlockedWindow(robot,
+                "The parent of the Window is blocked by " + modalityType + " Dialog.");
+
+            dummyDialog.checkBlockedDialog(robot,
+                "The parent of the Dialog is blocked by " + modalityType + " Dialog.");
+
+            childDialog.checkUnblockedDialog(robot,
+                "The parent of the Dialog is " + modalityType + " Dialog");
+
+            childWindow.checkUnblockedWindow(robot,
+                "The parent of the Window is " + modalityType + " Dialog");
+
+            childWindow.openClicked.reset();
+            childWindow.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            secondDialog.checkUnblockedDialog(robot,
+                "The dialog is " + modalityType + ", the parent of the dialog " +
+                "is blocked by another " + modalityType + " dialog.");
+
+            secondFrame.checkBlockedFrame(robot,
+                modalityType + " dialog is displayed immediately after showing " +
+                "this frame. Another modal dialog is alreay visible");
+
+            secondDialog.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+            childWindow.checkUnblockedWindow(robot, "A blocking dialog was closed.");
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        for (Window w: allWindows) {
+            if (w != null) { w.dispose(); }
+        }
+    }
+
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) { dialog.setVisible(true); }
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog dialog) {
+            super(dialog);
+        }
+
+        public CustomDialog(Frame frame) {
+            super(frame);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) { window.setVisible(true); }
+            if (dummyDialog != null) { dummyDialog.setVisible(true); }
+            if (childWindow != null) { childWindow.setVisible(true); }
+            if (childDialog != null) { childDialog.setVisible(true); }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomWindow extends TestWindow {
+
+        public CustomWindow(Window parent) {
+            super(parent);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (secondFrame  != null) {  secondFrame.setVisible(true); }
+            if (secondDialog != null) { secondDialog.setVisible(true); }
+        }
+    }
+
+    class ParentDialog extends TestDialog {
+
+        public ParentDialog(Dialog d) { super(d); }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) {
+                dialog.setVisible(true);
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a null Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal1Test
+ */
+
+public class BlockingWindowsToolkitModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a null Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal2Test
+ */
+
+public class BlockingWindowsToolkitModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a hidden Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal3Test
+ */
+
+public class BlockingWindowsToolkitModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a hidden Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal4Test
+ */
+
+public class BlockingWindowsToolkitModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal5Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a Frame
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal5Test
+ */
+
+public class BlockingWindowsToolkitModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal6Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog created with a Dialog
+ *          constructor receives focus; whether its components receive focus
+ *          and respond to key events, when there are other windows shown.
+ *          Also check the correctness of blocking behavior for other windows shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main BlockingWindowsToolkitModal6Test
+ */
+
+public class BlockingWindowsToolkitModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new BlockingWindowsTest(Dialog.ModalityType.TOOLKIT_MODAL,
+                BlockingWindowsTest.DialogOwner.DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether an application modal Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogAppModalTest
+ */
+
+public class UnblockedDialogAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest(Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a document modal Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogDocModalTest
+ */
+
+public class UnblockedDialogDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest(Dialog.ModalityType.DOCUMENT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a modeless Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogModelessTest
+ */
+
+public class UnblockedDialogModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest(Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a non-modal Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogNonModalTest
+ */
+
+public class UnblockedDialogNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest(null)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogSetModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007, 2014, 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 8049617
+ * @summary Check whether a modal Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogSetModalTest
+ */
+
+public class UnblockedDialogSetModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+public class UnblockedDialogTest {
+
+    private TestDialog dialog;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private Dialog parentDialog;
+    private Frame  parentFrame;
+
+    private enum DialogOwner {HIDDEN_DIALOG, HIDDEN_FRAME, NULL_DIALOG, NULL_FRAME};
+
+    Dialog.ModalityType modalityType;
+    boolean setModal;
+
+    private UnblockedDialogTest(Dialog.ModalityType modType,
+                                boolean             set) throws Exception {
+
+        robot = new ExtendedRobot();
+        modalityType = modType;
+        setModal = set;
+    }
+
+    public UnblockedDialogTest(Dialog.ModalityType modType) throws Exception {
+        this(modType, false);
+    }
+
+    public UnblockedDialogTest() throws Exception { this(null, true); }
+
+
+    private void createGUI(DialogOwner owner) {
+
+        switch (owner) {
+            case HIDDEN_DIALOG:
+                parentDialog = new Dialog((Frame) null);
+                dialog = new TestDialog(parentDialog);
+                break;
+            case NULL_DIALOG:
+                dialog = new TestDialog((Dialog) null);
+                break;
+            case HIDDEN_FRAME:
+                parentFrame = new Frame();
+                dialog = new TestDialog(parentFrame);
+                break;
+            case NULL_FRAME:
+                dialog = new TestDialog((Frame) null);
+                break;
+        }
+
+        assertFalse(dialog == null, "error: null dialog");
+
+        dialog.setLocation(50, 50);
+        if (setModal) {
+            dialog.setModal(true);
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            for (DialogOwner owner: DialogOwner.values()) {
+
+                EventQueue.invokeLater(() -> { createGUI(owner); });
+
+                robot.waitForIdle(delay);
+
+                dialog.activated.waitForFlagTriggered();
+                assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                    "Window Activated event when it became visible");
+
+                dialog.closeGained.waitForFlagTriggered();
+                assertTrue(dialog.closeGained.flag(), "The 1st button did not " +
+                    "gain focus when the dialog became visible");
+
+                dialog.checkUnblockedDialog(robot, "");
+                robot.waitForIdle(delay);
+            }
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (parentDialog != null) { parentDialog.dispose(); }
+        if (parentFrame  != null) {  parentFrame.dispose(); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalBlockingTests/UnblockedDialogToolkitModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8049617
+ * @summary Check whether a toolkit modal Dialog receives focus; check
+ *          if its components receive focus and respond to key events
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @run main UnblockedDialogToolkitModalTest
+ */
+
+public class UnblockedDialogToolkitModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new UnblockedDialogTest(Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when the following
+ *          happens: an application modal dialog (D) having null frame owner is shown;
+ *          a window having D as owner is shown; a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDWFAppModalTest
+ */
+
+public class FocusTransferDWFAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDWFTest test = new FocusTransferDWFTest(
+                Dialog.ModalityType.APPLICATION_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the
+ *          following happens: a document modal dialog (D) having null frame owner is shown;
+ *          a window having D as owner is shown; a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDWFDocModalTest
+ */
+
+public class FocusTransferDWFDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDWFTest test = new FocusTransferDWFTest(
+                Dialog.ModalityType.DOCUMENT_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the
+ *          following happens: a modeless dialog (D) having null frame owner is shown;
+ *          a window having D as owner is shown; a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDWFModelessTest
+ */
+
+public class FocusTransferDWFModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDWFTest test = new FocusTransferDWFTest(
+                Dialog.ModalityType.MODELESS);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following
+ *          happens: a non-modal dialog (D) having null frame owner is shown; a window having D
+ *          as owner is shown; a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDWFNonModalTest
+ */
+
+public class FocusTransferDWFNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDWFTest test = new FocusTransferDWFTest(null);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+
+import static jdk.testlibrary.Asserts.*;
+
+// DWF: Dialog -> Window -> Frame
+public class FocusTransferDWFTest {
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Frame f) {
+            super(f);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) {
+                window.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomWindow extends TestWindow {
+
+        public CustomWindow(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (frame != null) {
+                frame.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    private TestDialog dialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+    private static final int delay = 1000;
+
+    private final ExtendedRobot robot;
+
+    private Dialog.ModalityType modalityType;
+
+    FocusTransferDWFTest(Dialog.ModalityType modType) throws Exception {
+
+        modalityType = modType;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+
+        dialog = new CustomDialog((Frame) null);
+        if (modalityType == null) {
+            modalityType = Dialog.ModalityType.MODELESS;
+        } else {
+            dialog.setModalityType(modalityType);
+        }
+        dialog.setLocation(250, 50);
+
+        window = new CustomWindow(dialog);
+        window.setLocation(450, 50);
+        dialog.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+    }
+
+    public void doTest() throws Exception {
+
+        robot.waitForIdle(delay);
+
+        try {
+
+            dialog.checkCloseButtonFocusGained(true);
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkCloseButtonFocusGained(true);
+            dialog.checkOpenButtonFocusLost(true);
+
+            window.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            switch (modalityType) {
+                case APPLICATION_MODAL:
+                    frame.checkCloseButtonFocusGained(false, 10);
+                    window.checkOpenButtonFocusLost(false, 10);
+
+                    frame.closeGained.reset();
+
+                    dialog.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    frame.checkCloseButtonFocusGained(true);
+                    assertFalse(window.isVisible(), "window shouldn't be visible");
+
+                    break;
+
+                case DOCUMENT_MODAL:
+                case MODELESS:
+                    frame.checkCloseButtonFocusGained(true);
+                    window.checkOpenButtonFocusLost(true);
+
+                    window.openGained.reset();
+
+                    frame.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    window.checkOpenButtonFocusGained(true);
+
+                    dialog.openGained.reset();
+                    window.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    dialog.checkOpenButtonFocusGained(true);
+
+                    break;
+            }
+
+        } catch (Exception e) {
+
+            // make screenshot before exit
+            Rectangle rect = new Rectangle(0, 0, 650, 250);
+            java.awt.image.BufferedImage img = robot.createScreenCapture(rect);
+            javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg"));
+
+            throw e;
+        }
+
+        robot.waitForIdle(delay);
+
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: an application modal dialog (D1) having a null
+ *          frame owner is shown; a dialog (D2) having D1 owner is shown; a dialog
+ *          with a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDialogsAppModalTest
+ */
+
+public class FocusTransferDialogsAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDialogsTest test = new FocusTransferDialogsTest(
+                Dialog.ModalityType.APPLICATION_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a document modal dialog (D1) having a null
+ *          frame owner is shown; a dialog (D2) having D1 owner is shown; a dialog
+ *          with a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDialogsDocModalTest
+ */
+
+public class FocusTransferDialogsDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDialogsTest test = new FocusTransferDialogsTest(
+                Dialog.ModalityType.DOCUMENT_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a modeless dialog (D1) having a null
+ *          frame owner is shown; a dialog (D2) having D1 owner is shown; a dialog
+ *          with a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDialogsModelessTest
+ */
+
+public class FocusTransferDialogsModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDialogsTest test = new FocusTransferDialogsTest(
+                Dialog.ModalityType.MODELESS);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a non-modal dialog (D1) having a null
+ *          frame owner is shown; a dialog (D2) having D1 owner is shown; a dialog
+ *          with a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferDialogsNonModalTest
+ */
+
+public class FocusTransferDialogsNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferDialogsTest test = new FocusTransferDialogsTest(null);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+
+
+public class FocusTransferDialogsTest {
+
+    class CustomDialog1 extends TestDialog {
+
+        public CustomDialog1(Frame f) {
+            super(f);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog2 != null) {
+                dialog2.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomDialog2 extends TestDialog {
+
+        public CustomDialog2(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog3 != null) {
+                dialog3.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomDialog3 extends TestDialog {
+
+        public CustomDialog3(Frame f) {
+            super(f);
+        }
+
+        public CustomDialog3(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+
+    private TestDialog dialog1, dialog2, dialog3;
+    private Frame parentFrame;
+
+    private static final int delay = 1000;
+    private final ExtendedRobot robot;
+    private Dialog.ModalityType modalityType;
+
+    FocusTransferDialogsTest(Dialog.ModalityType modType) throws Exception {
+
+        modalityType = modType;
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        dialog1 = new CustomDialog1((Frame) null);
+        dialog1.setTitle("Dialog1");
+        dialog1.setLocation(50, 50);
+
+        if (modalityType != null) {
+            dialog1.setModalityType(modalityType);
+        } else {
+            modalityType = Dialog.ModalityType.MODELESS;
+        }
+
+        dialog2 = new CustomDialog2(dialog1);
+        dialog2.setTitle("Dialog2");
+        dialog2.setLocation(250, 50);
+
+        parentFrame = new Frame();
+        dialog3 = new CustomDialog3(parentFrame);
+        dialog3.setTitle("Dialog3");
+        dialog3.setLocation(450, 50);
+
+        dialog1.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (dialog1 != null) { dialog1.dispose(); }
+        if (dialog2 != null) { dialog2.dispose(); }
+        if (dialog3 != null) { dialog3.dispose(); }
+        if (parentFrame != null) { parentFrame.dispose(); }
+    }
+
+    public void doTest() throws Exception {
+
+        robot.waitForIdle(delay);
+
+        try {
+
+            dialog1.checkCloseButtonFocusGained(true);
+
+            dialog1.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog2.checkCloseButtonFocusGained(true);
+            dialog1.checkOpenButtonFocusLost(true);
+
+            dialog1.openGained.reset();
+            dialog2.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            switch (modalityType) {
+                case APPLICATION_MODAL:
+
+                    dialog3.checkCloseButtonFocusGained(false, 10);
+                    dialog2.checkOpenButtonFocusLost(true);
+
+                    dialog1.checkCloseButtonFocusGained(true);
+                    dialog3.closeGained.reset();
+
+                    dialog1.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    dialog3.checkCloseButtonFocusGained(true);
+
+                    break;
+
+                case DOCUMENT_MODAL:
+                case MODELESS:
+
+                    dialog3.checkCloseButtonFocusGained(true);
+                    dialog2.checkOpenButtonFocusLost(true);
+
+                    dialog1.openGained.reset();
+
+                    dialog2.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    dialog1.checkOpenButtonFocusGained(true);
+
+                    break;
+            }
+
+        } catch (Exception e) {
+
+            // make screenshot before exit
+            Rectangle rect = new Rectangle(0, 0, 650, 250);
+            java.awt.image.BufferedImage img = robot.createScreenCapture(rect);
+            javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg"));
+
+            throw e;
+        }
+
+        robot.waitForIdle(delay);
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWAppModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a frame is shown; an application modal dialog (D)
+ *          having a null frame owner is shown; a window having D as owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFDWAppModalTest
+ */
+
+public class FocusTransferFDWAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFDWTest test = new FocusTransferFDWTest(
+                Dialog.ModalityType.APPLICATION_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWDocModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a frame is shown; a document modal dialog (D)
+ *          having a null frame owner is shown; a window having D as owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFDWDocModalTest
+ */
+
+public class FocusTransferFDWDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFDWTest test = new FocusTransferFDWTest(
+                Dialog.ModalityType.DOCUMENT_MODAL);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWModelessTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a frame is shown; a modeless dialog (D)
+ *          having a null frame owner is shown; a window having D as owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFDWModelessTest
+ */
+
+public class FocusTransferFDWModelessTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFDWTest test = new FocusTransferFDWTest(
+                Dialog.ModalityType.MODELESS);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWNonModalTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a frame is shown; a non-modal dialog (D)
+ *          having a null frame owner is shown; a window having D as owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFDWNonModalTest
+ */
+
+public class FocusTransferFDWNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFDWTest test = new FocusTransferFDWTest(null);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+
+// FDW: Frame -> Dialog -> Window
+public class FocusTransferFDWTest {
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) {
+                dialog.setVisible(true);
+            }
+        }
+    }
+
+    class CustomWindow extends TestWindow {
+
+        public CustomWindow(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Frame f) {
+            super(f);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) {
+                window.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    private TestDialog dialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+    private static final int delay = 1000;
+
+    private final ExtendedRobot robot;
+
+    private final Dialog.ModalityType modalityType;
+
+    FocusTransferFDWTest(Dialog.ModalityType modType) throws Exception {
+
+        modalityType = modType;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+        dialog = new CustomDialog((Frame) null);
+        if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+        dialog.setLocation(250, 50);
+        window = new CustomWindow(dialog);
+        window.setLocation(450, 50);
+        frame.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+    }
+
+    public void doTest() throws Exception {
+
+        robot.waitForIdle(delay);
+
+        try {
+
+            frame.checkCloseButtonFocusGained(true);
+
+            frame.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog.checkCloseButtonFocusGained(true);
+
+            frame.checkOpenButtonFocusLost(true);
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkCloseButtonFocusGained(true);
+            dialog.checkOpenButtonFocusLost(true);
+
+            dialog.openGained.reset();
+            window.clickCloseButton(robot);
+
+            dialog.checkOpenButtonFocusGained(true);
+
+            frame.openGained.reset();
+            dialog.clickCloseButton(robot);
+
+            frame.checkOpenButtonFocusGained(true);
+
+        } catch (Exception e) {
+
+            // make screenshot before exit
+            Rectangle rect = new Rectangle(0, 0, 650, 250);
+            java.awt.image.BufferedImage img = robot.createScreenCapture(rect);
+            javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg"));
+
+            throw e;
+        }
+
+        robot.waitForIdle(delay);
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; an application modal dialog having
+ *          a hidden dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDAppModal1Test
+ */
+
+public class FocusTransferFWDAppModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferFWDTest.DialogParent.HIDDEN_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; an application modal dialog having
+ *          a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDAppModal2Test
+ */
+
+public class FocusTransferFWDAppModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferFWDTest.DialogParent.HIDDEN_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; an application modal dialog having
+ *          a null dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDAppModal3Test
+ */
+
+public class FocusTransferFWDAppModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferFWDTest.DialogParent.NULL_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; an application modal dialog having
+ *          a null frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDAppModal4Test
+ */
+
+public class FocusTransferFWDAppModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferFWDTest.DialogParent.NULL_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a document modal dialog having
+ *          a hidden dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDDocModal1Test
+ */
+
+public class FocusTransferFWDDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferFWDTest.DialogParent.HIDDEN_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a document modal dialog having
+ *          a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDDocModal2Test
+ */
+
+public class FocusTransferFWDDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferFWDTest.DialogParent.HIDDEN_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a document modal dialog having
+ *          a null dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDDocModal3Test
+ */
+
+public class FocusTransferFWDDocModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferFWDTest.DialogParent.NULL_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a document modal dialog having
+ *          a null frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDDocModal4Test
+ */
+
+public class FocusTransferFWDDocModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferFWDTest.DialogParent.NULL_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a modeless dialog having
+ *          a hidden dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDModeless1Test
+ */
+
+public class FocusTransferFWDModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            Dialog.ModalityType.MODELESS,
+            FocusTransferFWDTest.DialogParent.HIDDEN_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a modeless dialog having
+ *          a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDModeless2Test
+ */
+
+public class FocusTransferFWDModeless2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            Dialog.ModalityType.MODELESS,
+            FocusTransferFWDTest.DialogParent.HIDDEN_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a modeless dialog having
+ *          a null dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDModeless3Test
+ */
+
+public class FocusTransferFWDModeless3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            Dialog.ModalityType.MODELESS,
+            FocusTransferFWDTest.DialogParent.NULL_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a modeless dialog having
+ *          a null frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDModeless4Test
+ */
+
+public class FocusTransferFWDModeless4Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            Dialog.ModalityType.MODELESS,
+            FocusTransferFWDTest.DialogParent.NULL_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a non-modal dialog having
+ *          a hidden dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDNonModal1Test
+ */
+
+public class FocusTransferFWDNonModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            null, FocusTransferFWDTest.DialogParent.HIDDEN_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a non-modal dialog having
+ *          a hidden frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDNonModal2Test
+ */
+
+public class FocusTransferFWDNonModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            null, FocusTransferFWDTest.DialogParent.HIDDEN_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a non-modal dialog having
+ *          a null dialog owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDNonModal3Test
+ */
+
+public class FocusTransferFWDNonModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            null, FocusTransferFWDTest.DialogParent.NULL_DIALOG);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8049339
+ * @summary Check whether the focus transfer between windows occurs correctly when the following happens:
+ *          a frame (F) is shown; a window having F as owner is shown; a non-modal dialog having
+ *          a null frame owner is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferFWDNonModal4Test
+ */
+
+public class FocusTransferFWDNonModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferFWDTest test = new FocusTransferFWDTest(
+            null, FocusTransferFWDTest.DialogParent.NULL_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+
+// FWD: Frame -> Window -> Dialog
+public class FocusTransferFWDTest {
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doOpenAction() {
+            if (window != null) {
+                window.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomWindow extends TestWindow {
+
+        public CustomWindow(Frame f) {
+            super(f);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) {
+                dialog.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Frame f) {
+            super(f);
+        }
+
+        public CustomDialog(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    private TestDialog dialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+    private Frame  parentFrame;
+    private Dialog parentDialog;
+
+    private static final int delay = 1000;
+
+    private final ExtendedRobot robot;
+
+    private final Dialog.ModalityType modalityType;
+
+    public enum DialogParent {NULL_DIALOG, NULL_FRAME, HIDDEN_DIALOG, HIDDEN_FRAME};
+    private DialogParent dialogParent;
+
+    FocusTransferFWDTest(Dialog.ModalityType modType,
+                         DialogParent        dlgParent) throws Exception {
+
+        modalityType = modType;
+        dialogParent = dlgParent;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+
+        switch (dialogParent) {
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+            case NULL_FRAME:
+                dialog = new CustomDialog((Frame) null);
+                break;
+            case HIDDEN_DIALOG:
+                parentDialog = new Dialog((Frame) null);
+                dialog = new CustomDialog(parentDialog);
+                break;
+            case HIDDEN_FRAME:
+                parentFrame = new Frame();
+                dialog = new CustomDialog(parentFrame);
+                break;
+        }
+
+        assertTrue(dialog != null, "error: null dialog");
+
+        if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setLocation(250, 50);
+        window = new CustomWindow(frame);
+        window.setLocation(450, 50);
+        frame.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+
+        if (parentDialog != null) { parentDialog.dispose(); }
+        if (parentFrame  != null) {  parentFrame.dispose(); }
+    }
+
+    public void doTest() throws Exception {
+
+        robot.waitForIdle(delay);
+
+        try {
+
+            frame.checkCloseButtonFocusGained(true);
+
+            frame.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkCloseButtonFocusGained(true);
+            frame.checkOpenButtonFocusLost(true);
+
+            window.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog.checkCloseButtonFocusGained(true);
+            window.checkOpenButtonFocusLost(true);
+
+            window.openGained.reset();
+
+            dialog.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+            window.checkOpenButtonFocusGained(true);
+
+            frame.openGained.reset();
+
+            window.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+            frame.checkOpenButtonFocusGained(true);
+
+            frame.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+        } catch (Exception e) {
+
+            // make screenshot before exit
+            Rectangle rect = new Rectangle(0, 0, 650, 250);
+            java.awt.image.BufferedImage img = robot.createScreenCapture(rect);
+            javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg"));
+
+            throw e;
+        }
+
+        robot.waitForIdle(delay);
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          an application modal dialog having a frame (F) owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFAppModal1Test
+ */
+
+public class FocusTransferWDFAppModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367 8048263
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          an application modal dialog having a null dialog owner is shown;
+ *          a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFAppModal2Test
+ */
+
+public class FocusTransferWDFAppModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferWDFTest.DialogParent.NULL_DIALOG,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a frame (F) owner is shown;
+ *          an application modal dialog having F owner is shown; F is shown.
+ *
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFAppModal3Test
+ */
+
+public class FocusTransferWDFAppModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.APPLICATION_MODAL,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a document modal dialog with a frame (F) owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFDocModal1Test
+ */
+
+public class FocusTransferWDFDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a document modal dialog having a null dialog owner is shown;
+ *          a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFDocModal2Test
+ */
+
+public class FocusTransferWDFDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferWDFTest.DialogParent.NULL_DIALOG,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a frame (F) owner is shown;
+ *          a document modal dialog having F owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFDocModal3Test
+ */
+
+public class FocusTransferWDFDocModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.DOCUMENT_MODAL,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a modeless dialog having a frame (F) owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFModeless1Test
+ */
+
+public class FocusTransferWDFModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.MODELESS,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a modeless dialog having a null dialog owner is shown;
+ *          a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFModeless2Test
+ */
+
+public class FocusTransferWDFModeless2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.MODELESS,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a frame (F) owner is shown;
+ *          a modeless dialog having F owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFModeless3Test
+ */
+
+public class FocusTransferWDFModeless3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                Dialog.ModalityType.MODELESS,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal1Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a non-modal dialog having a frame (F) owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFNonModal1Test
+ */
+
+public class FocusTransferWDFNonModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                null,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a hidden frame owner is shown;
+ *          a non-modal dialog having a null dialog owner is shown;
+ *          a frame is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFNonModal2Test
+ */
+
+public class FocusTransferWDFNonModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                null,
+                FocusTransferWDFTest.DialogParent.NULL_DIALOG,
+                FocusTransferWDFTest.WindowParent.NEW_FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal3Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether the focus transfer between windows occurs correctly when
+ *          the following happens: a window having a frame (F) owner is shown;
+ *          a non-modal dialog having F owner is shown; F is shown.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main FocusTransferWDFNonModal3Test
+ */
+
+public class FocusTransferWDFNonModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        FocusTransferWDFTest test = new FocusTransferWDFTest(
+                null,
+                FocusTransferWDFTest.DialogParent.FRAME,
+                FocusTransferWDFTest.WindowParent.FRAME);
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+// WDF: Window -> Dialog -> Frame
+public class FocusTransferWDFTest {
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Frame f) {
+            super(f);
+        }
+
+        public CustomDialog(Dialog d) {
+            super(d);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (frame != null) {
+                frame.setVisible(true);
+            }
+        }
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomFrame extends TestFrame {
+
+        @Override
+        public void doCloseAction() {
+            this.dispose();
+        }
+    }
+
+    class CustomWindow extends TestWindow {
+
+        public CustomWindow(Frame f) {
+            super(f);
+        }
+
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) {
+                dialog.setVisible(true);
+            }
+        }
+    }
+
+
+    private TestDialog dialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+    private Frame  parentFrame;
+
+    private static final int delay = 1000;
+
+    private final ExtendedRobot robot;
+
+    private Dialog.ModalityType modalityType;
+
+    public enum DialogParent {FRAME, NULL_DIALOG};
+    private DialogParent dialogParent;
+
+    public enum WindowParent {FRAME, NEW_FRAME};
+    private WindowParent windowParent;
+
+
+    FocusTransferWDFTest(Dialog.ModalityType modType,
+                         DialogParent        dlgParent,
+                         WindowParent        winParent) throws Exception {
+
+        modalityType = modType;
+        dialogParent = dlgParent;
+        windowParent = winParent;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater( this::createGUI );
+    }
+
+    private void createGUI() {
+
+        frame = new CustomFrame();
+        frame.setLocation(50, 50);
+
+        switch (dialogParent) {
+            case FRAME:
+                dialog = new CustomDialog(frame);
+                break;
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+        }
+        assertTrue(dialog != null, "error: null dialog");
+
+        if (modalityType == null) {
+            modalityType = Dialog.ModalityType.MODELESS;
+        } else {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setLocation(250, 50);
+
+        switch (windowParent) {
+            case FRAME:
+                window = new CustomWindow(frame);
+                break;
+            case NEW_FRAME:
+                parentFrame = new Frame();
+                window = new CustomWindow(parentFrame);
+                break;
+        }
+        assertTrue(window != null, "error: null window");
+
+        window.setLocation(450, 50);
+        window.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if ( frame != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+
+        if (parentFrame  != null) {  parentFrame.dispose(); }
+    }
+
+    private void ModalTest() throws Exception {
+        frame.checkCloseButtonFocusGained(false, 10);
+        dialog.checkOpenButtonFocusLost(false, 10);
+
+        dialog.clickCloseButton(robot);
+        robot.waitForIdle(delay);
+
+        frame.checkCloseButtonFocusGained(true);
+
+        window.openGained.reset();
+
+        frame.clickCloseButton(robot);
+        robot.waitForIdle(delay);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            window.checkCloseButtonFocusGained(false, 10);
+
+            window.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            dialog.checkCloseButtonFocusGained(true);
+            window.checkOpenButtonFocusLost(false, 10);
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            switch (modalityType) {
+                case APPLICATION_MODAL:
+                    ModalTest();
+                    if (windowParent == WindowParent.FRAME) {
+                        assertFalse(window.isVisible(),
+                            "window shouldn't be visible");
+                    } else { // WindowParent.NEW_FRAME
+                        window.checkOpenButtonFocusGained(false, 10);
+                    }
+
+                    break;
+
+                case DOCUMENT_MODAL:
+                    if (dialogParent == DialogParent.FRAME) {
+                        ModalTest();
+                        if (windowParent == WindowParent.FRAME) { // 10
+                            assertFalse(window.isVisible(),
+                                "window shouldn't be visible");
+                        } else { // WindowParent.NEW_FRAME
+                            window.checkOpenButtonFocusGained(false, 10);
+                        }
+                    } else { // DialogParent.NULL_DIALOG
+                        frame.checkCloseButtonFocusGained(true);
+                        dialog.checkOpenButtonFocusLost(true);
+
+                        dialog.openGained.reset();
+
+                        frame.clickCloseButton(robot);
+                        robot.waitForIdle(delay);
+
+                        dialog.checkOpenButtonFocusGained(true);
+
+                        window.openGained.reset();
+
+                        dialog.clickCloseButton(robot);
+                        robot.waitForIdle(delay);
+
+                        window.checkOpenButtonFocusGained(false, 10);
+                    }
+                    break;
+
+                case MODELESS:
+
+                    frame.checkCloseButtonFocusGained(true);
+                    dialog.checkOpenButtonFocusLost(true);
+
+                    dialog.openGained.reset();
+
+                    frame.clickCloseButton(robot);
+                    robot.waitForIdle(delay);
+
+                    if (dialogParent == DialogParent.NULL_DIALOG) {
+                        dialog.checkOpenButtonFocusGained(true);
+
+                        window.openGained.reset();
+
+                        dialog.clickCloseButton(robot);
+                        robot.waitForIdle(delay);
+
+                        window.checkOpenButtonFocusGained(false, 10);
+                    } else {
+                        assertFalse(dialog.isVisible(),
+                            "dialog shouldn't be visible");
+
+                        if (windowParent == WindowParent.FRAME) {
+                            assertFalse(window.isVisible(),
+                                "window shouldn't be visible");
+                        }
+                    }
+
+                    break;
+            }
+
+        } catch (Exception e) {
+
+            // make screenshot before exit
+            Rectangle rect = new Rectangle(0, 0, 650, 250);
+            java.awt.image.BufferedImage img = robot.createScreenCapture(rect);
+            javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg"));
+
+            throw e;
+        }
+
+        robot.waitForIdle(delay);
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalitySettingsTest/ModalitySettingsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check modality settings for Window and Dialog.
+ *
+ * @library ../../../../lib/testlibrary/
+ * @run main ModalitySettingsTest
+ */
+
+
+
+public class ModalitySettingsTest {
+
+    private void doTest() throws Exception {
+
+        Window w = new Window(new Frame());
+
+        boolean unexpectedExc = false;
+
+        try {
+            Dialog d = new Dialog(w);
+        } catch (IllegalArgumentException iae) {
+        } catch (Exception e) {
+            unexpectedExc = true;
+        }
+
+        assertFalse(unexpectedExc, "unexpected exception occured when a " +
+            "Window instance was passed to Dialog constructor");
+
+        Dialog d = new Dialog((Frame) null);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS,
+            "the default modality type returned by Dialog " +
+            "differs from Dialog.ModalityType.MODELESS");
+
+        Frame f = new Frame();
+        assertTrue(f.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE,
+            "the default modality exclusion type returned by Frame" +
+            "differs from Dialog.ModalExclusionType.NO_EXCLUDE");
+
+        w = new Window((Frame) null);
+        assertTrue(w.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE,
+            "the default modality exclusion type returned by Window " +
+            "differs from Dialog.ModalExclusionType.NO_EXCLUDE");
+
+        d = new Dialog((Frame) null);
+        assertTrue(d.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE,
+            "the default modality exclusion type returned by Dialog " +
+            "differs from Dialog.ModalExclusionType.NO_EXCLUDE");
+
+        d.setModalityType(Dialog.ModalityType.TOOLKIT_MODAL);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.TOOLKIT_MODAL,
+            "the modality type returned by Dialog " +
+            "differs from Dialog.ModalityType.TOOLKIT_MODAL " +
+            "after setting the modality type to that value");
+
+        d.setModal(false);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS,
+            "the modality type returned by Dialog differs from " +
+            "Dialog.ModalityType.MODELESS after calling setModal(false)");
+
+        d.setModal(true);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.APPLICATION_MODAL,
+            "the modality type returned by Dialog differs from "
+            + "Dialog.ModalityType.APPLICATION_MODAL after calling setModal(true)");
+
+        w.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
+        assertTrue(w.getModalExclusionType() ==
+                Dialog.ModalExclusionType.APPLICATION_EXCLUDE,
+            "getModalExclusionType method for Window did not return " +
+            "Dialog.ModalExclusionType.APPLICATION_EXCLUDE after " +
+            "setting it to that value");
+
+        d = new Dialog((Frame) null);
+        d.setModalityType(Dialog.ModalityType.TOOLKIT_MODAL);
+        assertTrue(d.isModal(), "method isModal for Dialog " +
+            "returned false when the Dialog is toolkit modal");
+
+        d.setModalityType(Dialog.ModalityType.MODELESS);
+        assertFalse(d.isModal(), "method isModal for Dialog " +
+            "returned true when the Dialog is MODELESS");
+
+        d = new Dialog((Frame) null, (Dialog.ModalityType) null);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS,
+            "The modality type returned for a Dialog constructed " +
+            "with null modality type differs from MODELESS");
+
+        d = new Dialog((Frame) null);
+        d.setModalityType(null);
+        assertTrue(d.getModalityType() == Dialog.ModalityType.MODELESS,
+            "the modality type returned for a Dialog set with null " +
+            "modality type differs from MODELESS");
+
+        d.setModalExclusionType(null);
+        assertTrue(d.getModalExclusionType() == Dialog.ModalExclusionType.NO_EXCLUDE,
+            "The exlcusion type returned for a Dialog set with null " +
+            "exclusion type differs from NO_EXCLUDE");
+
+        try {
+            Dialog.ModalityType.valueOf("invalid");
+        } catch (IllegalArgumentException iae) {
+        } catch (Exception e) {
+            unexpectedExc = true;
+        }
+
+        assertFalse(unexpectedExc, "unexpected exception occured when an " +
+            "invalid value was passed to ModalityType.valueOf method");
+    }
+
+    public static void main(String[] args) throws Exception {
+        ModalitySettingsTest test = new ModalitySettingsTest();
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2007, 2014, 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.awt.*;
+import java.awt.event.KeyEvent;
+
+import static jdk.testlibrary.Asserts.*;
+
+
+/*
+ * @test
+ * @bug 8047367
+ * @summary Check whether a Dialog set with null modality type
+ *          behaves like a modeless dialog
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @build TestWindow
+ * @run main NullModalityDialogTest
+ */
+
+
+public class NullModalityDialogTest {
+
+    class CustomDialog extends TestDialog {
+        public CustomDialog(Frame f) {
+            super(f);
+        }
+        @Override
+        public void doOpenAction() {
+            if (frame != null) {
+                frame.setVisible(true);
+            }
+            if (window != null) {
+                window.setVisible(true);
+            }
+        }
+    }
+
+    class CustomFrame extends TestFrame {
+        @Override
+        public void doOpenAction() {
+            if (dialog != null) {
+                dialog.setVisible(true);
+            }
+        }
+    }
+
+    private TestFrame  parent;
+    private TestDialog dialog;
+    private TestFrame  frame;
+    private TestWindow window;
+
+    private static final int delay = 1000;
+
+    private final ExtendedRobot robot;
+
+    NullModalityDialogTest() throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        parent = new CustomFrame();
+        parent.setTitle("Parent");
+        parent.setLocation(50, 50);
+
+        dialog = new CustomDialog(parent);
+        dialog.setTitle("Dialog");
+        dialog.setModalityType((Dialog.ModalityType) null);
+        dialog.setLocation(250, 50);
+
+        frame = new TestFrame();
+        frame.setTitle("Frame");
+        frame.setLocation(50, 250);
+
+        window = new TestWindow(frame);
+        window.setLocation(250, 250);
+
+        parent.setVisible(true);
+    }
+
+    private void closeAll() {
+        if (parent != null) { parent.dispose(); }
+        if (dialog != null) { dialog.dispose(); }
+        if (frame  != null) {  frame.dispose(); }
+        if (window != null) { window.dispose(); }
+    }
+
+    public void doTest() throws Exception {
+
+        robot.waitForIdle(delay);
+
+        parent.clickOpenButton(robot);
+        robot.waitForIdle(delay);
+
+        dialog.activated.waitForFlagTriggered();
+        assertTrue(dialog.activated.flag(), "Dialog did not trigger " +
+                "Window Activated event when it became visible");
+
+        dialog.closeGained.waitForFlagTriggered();
+        assertTrue(dialog.closeGained.flag(), "the 1st button did not gain focus " +
+            "when the Dialog became visible");
+
+        assertTrue(dialog.closeButton.hasFocus(), "the 1st button in the Dialog " +
+            "gained focus but lost it afterwards");
+
+        dialog.openGained.reset();
+
+        robot.type(KeyEvent.VK_TAB);
+
+        dialog.openGained.waitForFlagTriggered();
+        assertTrue(dialog.openGained.flag(),
+            "Tab navigation did not happen properly on Dialog. Open button " +
+            "did not gain focus on tab press when parent frame is visible");
+
+        dialog.clickOpenButton(robot);
+        robot.waitForIdle(delay);
+
+        frame.activated.waitForFlagTriggered();
+        assertTrue(frame.activated.flag(), "Frame did not trigger activated when " +
+            "made visible. Dialog and its parent frame are visible");
+
+        frame.checkUnblockedFrame(robot, "Frame is the parent of a visible Dialog.");
+        window.checkUnblockedWindow(robot, "Frame and its child Dialog are visible.");
+
+        robot.waitForIdle(delay);
+
+        EventQueue.invokeAndWait(this::closeAll);
+    }
+
+    public static void main(String[] args) throws Exception {
+        NullModalityDialogTest test = new NullModalityDialogTest();
+        test.doTest();
+    }
+}
--- a/jdk/test/java/awt/Modal/helpers/TestDialog.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/awt/Modal/helpers/TestDialog.java	Fri Aug 08 11:36:48 2014 -0700
@@ -332,35 +332,47 @@
             "button did not gain focus. " + message);
     }
 
-    public void checkCloseButtonFocusGained() {
-        checkCloseButtonFocusGained(Flag.ATTEMPTS);
+    public void checkCloseButtonFocusGained(boolean refState) {
+        checkCloseButtonFocusGained(refState, Flag.ATTEMPTS);
     }
 
-    public void checkCloseButtonFocusGained(int attempts) {
+    public void checkCloseButtonFocusGained(boolean refState, int attempts) {
         try {
             closeGained.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
-        assertTrue(closeGained.flag(),
-            "dialog Close button did not gain focus");
+
+        String msg = "dialog Close button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(closeGained.flag() == refState, msg);
     }
 
-    public void checkOpenButtonFocusGained() {
+    public void checkOpenButtonFocusGained(boolean refState) {
         try {
             openGained.waitForFlagTriggered();
         } catch (InterruptedException e) {}
-        assertTrue(openGained.flag(),
-            "dialog Open button did not gain focus");
+
+        String msg = "dialog Open button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(openGained.flag() == refState, msg);
     }
 
-    public void checkOpenButtonFocusLost() {
-        checkOpenButtonFocusLost(Flag.ATTEMPTS);
+    public void checkOpenButtonFocusLost(boolean refState) {
+        checkOpenButtonFocusLost(refState, Flag.ATTEMPTS);
     }
 
-    public void checkOpenButtonFocusLost(int attempts) {
+    public void checkOpenButtonFocusLost(boolean refState, int attempts) {
         try {
             openLost.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
-        assertTrue(openLost.flag(),
-            "dialog Open button did not lose focus");
+
+        String msg = "dialog Open button ";
+        msg += (refState ? "did not lose focus" :
+                "lost focus when it should not");
+
+        assertTrue(openLost.flag() == refState, msg);
     }
 }
--- a/jdk/test/java/awt/Modal/helpers/TestFrame.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/awt/Modal/helpers/TestFrame.java	Fri Aug 08 11:36:48 2014 -0700
@@ -292,13 +292,13 @@
         robot.waitForIdle(delay);
 
         assertFalse(dummyClicked.flag(),
-            "DummyButton on blocked Window triggered action when clicked. " + message);
+            "DummyButton on blocked Frame triggered action when clicked. " + message);
 
         assertFalse(dummyGained.flag(),
-            "DummyButton on blocked Window gained focus when clicked. " + message);
+            "DummyButton on blocked Frame gained focus when clicked. " + message);
 
         assertFalse(focusGained.flag(),
-            "A blocked Dialog gained focus when component clicked. " + message);
+            "A blocked Frame gained focus when component clicked. " + message);
     }
 
     public void checkUnblockedFrame(ExtendedRobot robot,
@@ -324,46 +324,50 @@
             "button did not gain focus on tab press. " + message);
     }
 
-    public void checkCloseButtonFocusGained() {
-        checkCloseButtonFocusGained(Flag.ATTEMPTS);
+    public void checkCloseButtonFocusGained(boolean refState) {
+        checkCloseButtonFocusGained(refState, Flag.ATTEMPTS);
     }
 
-    public void checkCloseButtonFocusGained(int attempts) {
-
+    public void checkCloseButtonFocusGained(boolean refState, int attempts) {
         try {
             closeGained.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
 
-        if (closeGained.flag()) {
-            Component focusOwner =
-                KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
-            assertTrue(closeButton.equals(focusOwner),
-                "close button gained focus, but it is not the current focus owner");
-        } else {
-            assertTrue(false, "frame Close button did not gain focus");
-        }
+        String msg = "frame Close button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(closeGained.flag() == refState, msg);
     }
 
-    public void checkOpenButtonFocusGained() {
+    public void checkOpenButtonFocusGained(boolean refState) {
+        checkOpenButtonFocusGained(refState, Flag.ATTEMPTS);
+    }
+
+    public void checkOpenButtonFocusGained(boolean refState, int attempts) {
         try {
-            openGained.waitForFlagTriggered();
+            openGained.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
 
-        if (openGained.flag()) {
-            Component focusOwner =
-                KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
-            assertTrue(openButton.equals(focusOwner),
-                "open button gained focus, but it is not the current focus owner");
-        } else {
-            assertTrue(false, "frame Open button did not gain focus");
-        }
+        String msg = "frame Open button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(openGained.flag() == refState, msg);
+    }
+
+    public void checkOpenButtonFocusLost(boolean refState) {
+        checkOpenButtonFocusLost(refState, Flag.ATTEMPTS);
     }
 
-    public void checkOpenButtonFocusLost() {
+    public void checkOpenButtonFocusLost(boolean refState, int attempts) {
         try {
-            openLost.waitForFlagTriggered();
+            openLost.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
 
-        assertTrue(openLost.flag(), "frame Open button did not lose focus");
+        String msg = "frame Open button ";
+        msg += (refState ? "did not lose focus" :
+                "lost focus when it should not");
+        assertTrue(openLost.flag()== refState, msg);
     }
 }
--- a/jdk/test/java/awt/Modal/helpers/TestWindow.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/awt/Modal/helpers/TestWindow.java	Fri Aug 08 11:36:48 2014 -0700
@@ -295,39 +295,51 @@
             "button did not gain focus on tab press. " + message);
     }
 
-    public void checkCloseButtonFocusGained() {
-        checkCloseButtonFocusGained(Flag.ATTEMPTS);
+    public void checkCloseButtonFocusGained(boolean refState) {
+        checkCloseButtonFocusGained(refState, Flag.ATTEMPTS);
     }
 
-    public void checkCloseButtonFocusGained(int attempts) {
+    public void checkCloseButtonFocusGained(boolean refState, int attempts) {
         try {
             closeGained.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
-        assertTrue(closeGained.flag(),
-            "window Close button did not gain focus");
+
+        String msg = "window Close button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(closeGained.flag() == refState, msg);
     }
 
-    public void checkOpenButtonFocusGained() {
-        checkOpenButtonFocusGained(Flag.ATTEMPTS);
+
+    public void checkOpenButtonFocusGained(boolean refState) {
+        checkOpenButtonFocusGained(refState, Flag.ATTEMPTS);
     }
 
-    public void checkOpenButtonFocusGained(int attempts) {
+    public void checkOpenButtonFocusGained(boolean refState, int attempts) {
         try {
             openGained.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
-        assertTrue(openGained.flag(),
-            "window Open button did not gain focus");
+
+        String msg = "window Open button ";
+        msg += (refState ? "did not gain focus" :
+                "gained focus when it should not");
+
+        assertTrue(openGained.flag() == refState, msg);
     }
 
-    public void checkOpenButtonFocusLost() {
-        checkOpenButtonFocusLost(Flag.ATTEMPTS);
+    public void checkOpenButtonFocusLost(boolean refState) {
+        checkOpenButtonFocusLost(refState, Flag.ATTEMPTS);
     }
 
-    public void checkOpenButtonFocusLost(int attempts) {
+    public void checkOpenButtonFocusLost(boolean refState, int attempts) {
         try {
             openLost.waitForFlagTriggered(attempts);
         } catch (InterruptedException e) {}
-        assertTrue(openLost.flag(),
-            "window Open button did not lose focus");
+
+        String msg = "window Open button ";
+        msg += (refState ? "did not lose focus" :
+                "lost focus when it should not");
+        assertTrue(openLost.flag()== refState, msg);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Toolkit/DesktopProperties/rfe4758438.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2004, 2014, 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.awt.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.InputStream;
+
+/*
+ * @test
+ * @bug 4758438
+ * @summary Testcase to check the implementation of RFE 4758438
+ *          The RFE suggests that the GNOME desktop properties
+ *          should be made accessible through the
+ *          Toolkit.getDesktopProperty() API.
+ * @author Girish R (girish.ramachandran@sun.com)
+ * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
+ * @run shell rfe4758438.sh
+ */
+
+public class rfe4758438 implements PropertyChangeListener {
+
+    enum PROPS {
+        drag_threshold(
+                "org.gnome.settings-daemon.peripherals.mouse drag-threshold",
+                "/desktop/gnome/peripherals/mouse/drag_threshold",
+                "gnome.Net/DndDragThreshold",
+                "int",
+                new String[]{"5", "6"}),
+        double_click(
+                "org.gnome.settings-daemon.peripherals.mouse double-click",
+                "/desktop/gnome/peripherals/mouse/double_click",
+                "gnome.Net/DoubleClickTime",
+                "int",
+                new String[]{"200","300"}),
+        cursor_blink(
+                "org.gnome.desktop.interface cursor-blink",
+                "/desktop/gnome/interface/cursor_blink",
+                "gnome.Net/CursorBlink",
+                "bool",
+                new String[]{"true","false"}),
+        cursor_blink_time(
+                "org.gnome.desktop.interface cursor-blink-time",
+                "/desktop/gnome/interface/cursor_blink_time",
+                "gnome.Net/CursorBlinkTime",
+                "int",
+                new String[]{"1000","1500"}),
+        gtk_theme(
+                "org.gnome.desktop.interface gtk-theme",
+                "/desktop/gnome/interface/gtk_theme",
+                "gnome.Net/ThemeName",
+                "string",
+                new String[]{"Crux","Simple"});
+
+        public final String gsettings;
+        public final String gconftool;
+        public final String java;
+        public final String type;
+        public final String[] values;
+
+        PROPS(String gsettings, String gconftool, String java, String type, String[] values){
+            this.gsettings = gsettings;
+            this.gconftool = gconftool;
+            this.java = java;
+            this.type = type;
+            this.values = values;
+        }
+    }
+
+    static boolean useGsettings;
+    static String tool;
+    Toolkit toolkit = Toolkit.getDefaultToolkit();
+    String changedProperty;
+    Object changedValue;
+    Object lock = new Object();
+
+    /**
+     * Implementation of PropertyChangeListener method
+     */
+    public void propertyChange(PropertyChangeEvent event) {
+        changedProperty = event.getPropertyName();
+        changedValue = toolkit.getDesktopProperty(changedProperty);
+        System.out.println("Property "+changedProperty+" changed. Changed value: "+changedValue);
+        synchronized(lock) {
+            try {
+                lock.notifyAll();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        useGsettings = System.getProperty("useGsettings").equals("true");
+        tool = System.getProperty("tool");
+
+        String osName = System.getProperty("os.name");
+        if (!"Linux".equals(osName) && !"SunOS".equals(osName))
+            System.out.println("This test need not be run on this platform");
+        else
+            new rfe4758438().doTest();
+    }
+
+    void doTest() throws Exception {
+        for (PROPS p : PROPS.values())
+            toolkit.addPropertyChangeListener(p.java, this);
+
+        for (PROPS p : PROPS.values()) {
+            Thread.sleep(1000);
+            doTest(p);
+        }
+        System.out.println("Test passed");
+    }
+
+    /**
+     * Do the test for each property. Find the current value
+     * of the property, set the property to a value not equal
+     * to the current value, check if the propertyChange event
+     * is triggered. Reset the property to the actual value.
+     */
+    void doTest(PROPS property) throws Exception {
+        //Choose the test value which is not same as the current value
+        Object obj = toolkit.getDesktopProperty(property.java);
+        if (obj == null)
+            throw new RuntimeException("No such property available: " + property.java);
+
+        //For boolean type values, getDesktopProperty method returns Integer objects
+        if (property.type.equals("bool")) {
+            if (obj.equals(new Integer(1))) {
+                obj = new String("true");
+            } else {
+                obj = new String("false");
+            }
+        }
+        Object value = property.values[0];
+        if (obj.toString().equals(value)) {
+            value = property.values[1];
+        }
+
+        //Create the command to execute
+        StringBuffer sb = new StringBuffer(tool);
+        if (useGsettings) {
+            sb.append(" set ");
+            sb.append(property.gsettings);
+            sb.append(" ");
+        } else {
+            sb.append(" --set --type=");
+            sb.append(property.type);
+            sb.append(" ");
+            sb.append(property.gconftool);
+            sb.append(" ");
+        }
+        String tempCommand = sb.toString();
+        sb.append(value.toString());
+
+        //Initialize the variables and execute the command
+        changedProperty = "";
+        changedValue = null;
+        if (executeCommand(sb.toString()) != 0)
+            throw new RuntimeException("Could not execute the command");
+
+        synchronized(lock) {
+            try {
+                lock.wait(5000);
+            } catch (Exception e) {
+            }
+        }
+        if (property.type.equals("bool")) {
+            if (changedValue.equals(new Integer(1))) {
+                changedValue = new String("true");
+            } else {
+                changedValue = new String("false");
+            }
+        }
+
+        //Check if the event got triggered
+        if (!changedProperty.equals(property.java)) {
+            //Reset the property
+            executeCommand(tempCommand + obj.toString());
+            throw new RuntimeException("PropertyChangedEvent did not occur for " + property.java);
+        } else if (!changedValue.toString().equals(value.toString())) {
+            //Reset the property
+            executeCommand(tempCommand + obj.toString());
+            throw new RuntimeException("New value of the property is different from " +
+                                       "the value supplied");
+        }
+
+        //Reset the property
+        executeCommand(tempCommand + obj.toString());
+    }
+
+    /**
+     * Uses the gconftool-2 command to change the value of the property.
+     * Gets the output of the command and prints the output
+     */
+    int executeCommand(String command) throws Exception {
+        System.out.println("Executing " + command);
+        Process process = Runtime.getRuntime().exec(command);
+
+        InputStream is = process.getInputStream();
+        InputStream es = process.getErrorStream();
+        StringBuilder stdout = new StringBuilder();
+        StringBuilder stderr = new StringBuilder();
+
+        process.waitFor();
+
+        while (is.available() > 0)
+            stdout.append((char) is.read());
+
+        while (es.available() > 0)
+            stderr.append((char) es.read());
+
+        if (stdout.length() > 0)
+            System.out.println(stdout.toString());
+        if (stderr.length() > 0)
+            System.err.println(stderr.toString());
+        return process.exitValue();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Toolkit/DesktopProperties/rfe4758438.sh	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,83 @@
+# Copyright (c) 2014, 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.
+
+if [ -z "${TESTJAVA}" ]; then
+  echo "TESTJAVA undefined: can't continue."
+  exit 1
+fi
+
+OS=`uname`
+
+case "$OS" in
+    Linux* )
+        GNOMESID=`pgrep gnome-session`
+        DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS /proc/$GNOMESID/environ | cut -d= -f2-`
+        export DBUS_SESSION_BUS_ADDRESS
+        DISPLAY=`grep -z DISPLAY /proc/$GNOMESID/environ | cut -d= -f2-`
+        export DISPLAY
+        ;;
+    Sun* )
+        GNOMESID=`pgrep gnome-session`
+        DBUS_SESSION_BUS_ADDRESS=`pargs -e $GNOMESID | grep DBUS_SESSION_BUS_ADDRESS | cut -d= -f2-`
+        export DBUS_SESSION_BUS_ADDRESS
+        DISPLAY=`pargs -e $GNOMESID | grep DISPLAY | cut -d= -f2-`
+        export DISPLAY
+        ;;
+    * )
+        echo "This Feature is not to be tested on $OS"
+        exit 0
+        ;;
+esac
+
+if [ ${GNOME_DESKTOP_SESSION_ID:-nonset} = "nonset" ];
+then
+    if [ ${GNOME_SESSION_NAME:-nonset} = "nonset" ];
+    then
+        echo "This test should run under Gnome"
+        exit 0
+    fi
+fi
+
+SCHEMAS=`gsettings list-schemas | wc -l`
+
+if [ $SCHEMAS -eq 0 ];
+then
+    TOOL=`which gconftool-2`
+    USE_GSETTINGS="false"
+else
+    TOOL=`which gsettings`
+    USE_GSETTINGS="true"
+fi
+
+cd ${TESTSRC}
+echo $PWD
+echo "${TESTJAVA}/bin/javac -d ${TESTCLASSES} rfe4758438.java"
+${TESTJAVA}/bin/javac -d ${TESTCLASSES} rfe4758438.java
+
+cd ${TESTCLASSES}
+${TESTJAVA}/bin/java -DuseGsettings=${USE_GSETTINGS} -Dtool=${TOOL} ${TESTVMOPTS} rfe4758438
+
+if [ $? -ne 0 ]
+then
+    echo "Test failed. See the error stream output"
+    exit 1
+fi
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2001, 2014, 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 8043126
+ * @summary Check whether
+ *          1. correct extended modifiers are returned
+ *             by KeyEvent.getModifiersEx()
+ *          2. InputEvent.getModifiersExText() returns
+ *             correct extended modifier keys description
+ *
+ * @library ../../../../../lib/testlibrary/  ../../helpers/lwcomponents/
+ * @build LWComponent
+ * @build LWButton
+ * @build LWList
+ * @build ExtendedRobot
+ * @run main/timeout=600 ExtendedModifiersTest
+ */
+
+
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.util.ArrayList;
+
+import static jdk.testlibrary.Asserts.*;
+import test.java.awt.event.helpers.lwcomponents.LWButton;
+import test.java.awt.event.helpers.lwcomponents.LWList;
+
+
+public class ExtendedModifiersTest implements KeyListener {
+
+    Frame frame;
+
+    Button    button;
+    LWButton  buttonLW;
+    TextField textField;
+    TextArea  textArea;
+    List      list;
+    LWList    listLW;
+
+    private final ExtendedRobot robot;
+    private final static int robotDelay = 1000;
+    private final static int  waitDelay = 5000;
+    private final static int   keyDelay =  500;
+
+    private final Object lock;
+
+    private boolean keyPressedFlag = false;
+
+    private int modifiersEx = 0;
+    private String exText = "";
+
+
+    @Override
+    public void keyTyped(KeyEvent e) {}
+
+    @Override
+    public void keyPressed(KeyEvent e) {
+
+        if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+            return;
+        }
+
+        modifiersEx = e.getModifiersEx();
+        exText = InputEvent.getModifiersExText(modifiersEx);
+        keyPressedFlag = true;
+
+        synchronized (lock) { lock.notifyAll(); }
+    }
+
+    @Override
+    public void keyReleased(KeyEvent e) {}
+
+
+    public void createGUI() {
+
+        frame = new Frame();
+        frame.setTitle("ExtendedModifiersTest");
+        frame.setLayout(new GridLayout(1, 6));
+
+        button = new Button();
+        button.addKeyListener(this);
+        frame.add(button);
+
+        buttonLW = new LWButton();
+        buttonLW.addKeyListener(this);
+        frame.add(buttonLW);
+
+        textField = new TextField(5);
+        textField.addKeyListener(this);
+        frame.add(textField);
+
+        textArea = new TextArea(5, 5);
+        textArea.addKeyListener(this);
+        frame.add(textArea);
+
+        list = new List();
+        for (int i = 1; i <= 5; ++i) { list.add("item " + i); }
+        list.addKeyListener(this);
+        frame.add(list);
+
+        listLW = new LWList();
+        for (int i = 1; i <= 5; ++i) { listLW.add("item " + i); }
+        listLW.addKeyListener(this);
+        frame.add(listLW);
+
+        frame.setBackground(Color.gray);
+        frame.setSize(500, 100);
+        frame.setVisible(true);
+        frame.toFront();
+    }
+
+    public ExtendedModifiersTest() throws Exception {
+        lock = new Object();
+        robot = new ExtendedRobot();
+        EventQueue.invokeAndWait( this::createGUI );
+    }
+
+
+    private void runScenario(int keys[], int refMask) {
+
+        if (keys.length < 1) { return; }
+
+        for (int k = 0; k < keys.length; ++k) {
+
+            keyPressedFlag = false;
+            robot.keyPress(keys[k]);
+            robot.delay(keyDelay);
+
+            if (!keyPressedFlag) {
+                synchronized (lock) {
+                    try {
+                        lock.wait(waitDelay);
+                    } catch (InterruptedException ex) {}
+                }
+            }
+
+            if (!keyPressedFlag) {
+                robot.keyRelease(keys[k]);
+                robot.delay(keyDelay);
+                assertTrue(false, "key press event was not received");
+            }
+        }
+
+        int modEx = modifiersEx & refMask;
+
+        for (int k = keys.length - 1; k >=0; --k) {
+            robot.keyRelease(keys[k]);
+            robot.delay(keyDelay);
+        }
+
+
+        assertEQ(modifiersEx, modEx, "invalid extended modifiers");
+
+        for (int k = 0; k < keys.length; ++k) {
+            String keyText = KeyEvent.getKeyText(keys[k]).toLowerCase();
+            assertTrue(exText.toLowerCase().contains(keyText), "invalid extended modifier keys description");
+        }
+
+        System.out.println(exText + " : passed");
+
+        robot.type(KeyEvent.VK_ESCAPE);
+
+        robot.delay(robotDelay);
+    }
+
+    private void doTest() throws Exception {
+
+        ArrayList<Component> components = new ArrayList();
+        components.add(button);
+        components.add(buttonLW);
+        components.add(textField);
+        components.add(textArea);
+        components.add(list);
+        components.add(listLW);
+
+        String OS = System.getProperty("os.name").toLowerCase();
+        System.out.println(OS);
+
+        for (Component c: components) {
+
+            String className = c.getClass().getName();
+            System.out.println("component class : " + className);
+
+            Point origin = c.getLocationOnScreen();
+            int xc = origin.x + c.getWidth() / 2;
+            int yc = origin.y + c.getHeight() / 2;
+            Point center = new Point(xc, yc);
+
+            robot.delay(robotDelay);
+            robot.glide(origin, center);
+            robot.click();
+            robot.delay(robotDelay);
+
+            // 1. shift + control
+            runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL},
+                    InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
+
+            // 2. alt + shift + control
+            runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL},
+                    InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
+
+            // 3. shift
+            runScenario(new int[]{KeyEvent.VK_SHIFT},
+                    InputEvent.SHIFT_DOWN_MASK);
+
+            // 4. alt + control
+            runScenario(new int[]{KeyEvent.VK_ALT, KeyEvent.VK_CONTROL},
+                    InputEvent.ALT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
+
+            // 5. shift + alt
+            runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_ALT},
+                    InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
+
+
+            if (OS.contains("os x") || OS.contains("sunos")) {
+                // 6. meta
+                runScenario(new int[]{KeyEvent.VK_META}, InputEvent.META_DOWN_MASK);
+
+                // 7. shift + ctrl + alt + meta
+                runScenario(new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_META},
+                    InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.META_DOWN_MASK);
+
+                // 8. meta + shift + ctrl
+                runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL},
+                    InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK);
+
+                // 9. meta + shift + alt
+                runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_SHIFT, KeyEvent.VK_ALT},
+                    InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
+
+                // 10. meta + ctrl + alt
+                runScenario(new int[]{KeyEvent.VK_META, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT},
+                    InputEvent.META_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK);
+            }
+        }
+
+        robot.waitForIdle();
+        frame.dispose();
+    }
+
+    public static void main(String[] args) throws Exception {
+        ExtendedModifiersTest test = new ExtendedModifiersTest();
+        test.doTest();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2001, 2014, 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 8043126
+ * @summary Check whether KeyEvent.getModifiers() returns correct modifiers
+ *          when Ctrl, Alt or Shift keys are pressed.
+ *
+ * @library ../../../../../lib/testlibrary/  ../../helpers/lwcomponents/
+ * @build LWComponent
+ * @build LWButton
+ * @build LWList
+ * @build ExtendedRobot
+ * @run main/timeout=600 KeyMaskTest
+ */
+
+
+import java.awt.*;
+import java.awt.event.InputEvent;
+
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+import java.util.ArrayList;
+
+import static jdk.testlibrary.Asserts.*;
+
+import test.java.awt.event.helpers.lwcomponents.LWButton;
+import test.java.awt.event.helpers.lwcomponents.LWList;
+
+
+
+public class KeyMaskTest extends KeyAdapter {
+
+    Frame frame;
+
+    Button    button;
+    LWButton  buttonLW;
+    TextField textField;
+    TextArea  textArea;
+    List      list;
+    LWList    listLW;
+
+    int buttonPressedNumber;
+    int buttonReleasedNumber;
+
+    ExtendedRobot robot;
+
+    private final static int robotDelay = 1500;
+    private final static int waitDelay  = 3500;
+
+    final Object lock;
+
+    private boolean keyPressReceived = false;
+    private int keyCode = -1;
+
+    KeyMaskTest() throws Exception {
+        lock = new Object();
+        robot = new ExtendedRobot();
+        EventQueue.invokeAndWait( this::createGUI );
+    }
+
+    public void createGUI() {
+
+        frame = new Frame();
+        frame.setTitle("KeyMaskTest");
+        frame.setLayout(new GridLayout(1, 6));
+
+        button = new Button();
+        button.addKeyListener(this);
+        frame.add(button);
+
+        buttonLW = new LWButton();
+        buttonLW.addKeyListener(this);
+        frame.add(buttonLW);
+
+        textField = new TextField(5);
+        textField.addKeyListener(this);
+        frame.add(textField);
+
+        textArea = new TextArea(5, 5);
+        textArea.addKeyListener(this);
+        frame.add(textArea);
+
+        list = new List();
+        for (int i = 1; i <= 5; ++i) { list.add("item " + i); }
+        list.addKeyListener(this);
+        frame.add(list);
+
+        listLW = new LWList();
+        for (int i = 1; i <= 5; ++i) { listLW.add("item " + i); }
+        listLW.addKeyListener(this);
+        frame.add(listLW);
+
+
+        frame.setBackground(Color.gray);
+        frame.setSize(500, 100);
+        frame.setVisible(true);
+        frame.toFront();
+    }
+
+    @Override
+    public void keyPressed(KeyEvent e) {
+
+        keyPressReceived = true;
+
+        int code = e.getKeyCode();
+
+        assertEQ(code, keyCode, "wrong key code");
+
+        int mask = 0;
+
+        if (code == KeyEvent.VK_SHIFT) {
+            mask = InputEvent.SHIFT_MASK;
+        } else if (code == KeyEvent.VK_CONTROL) {
+            mask = InputEvent.CTRL_MASK;
+        } else if (code == KeyEvent.VK_ALT) {
+            mask = InputEvent.ALT_MASK;
+        } else if (code == KeyEvent.VK_META) {
+            mask = InputEvent.META_MASK;
+        }
+
+        int mod = e.getModifiers() & mask;
+        assertEQ(mod, mask, "invalid key mask");
+
+        synchronized (lock) { lock.notifyAll(); }
+    }
+
+
+    void doTest() throws Exception {
+
+        ArrayList<Component> components = new ArrayList();
+        components.add(button);
+        components.add(buttonLW);
+        components.add(textField);
+        components.add(textArea);
+        components.add(list);
+        components.add(listLW);
+
+        int keys[];
+        String OS = System.getProperty("os.name").toLowerCase();
+        System.out.println(OS);
+        if (OS.contains("os x") || OS.contains("sunos")) {
+            keys = new int[] {KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_META};
+        } else {
+            keys = new int[] {KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT};
+        }
+
+        for (Component c: components) {
+
+            System.out.print(c.getClass().getName() + ": ");
+
+            Point origin = c.getLocationOnScreen();
+            int xc = origin.x + c.getWidth() / 2;
+            int yc = origin.y + c.getHeight() / 2;
+            Point center = new Point(xc, yc);
+
+            robot.delay(robotDelay);
+            robot.glide(origin, center);
+            robot.click();
+            robot.delay(robotDelay);
+
+            for (int k = 0; k < keys.length; ++k) {
+
+                keyPressReceived = false;
+
+                keyCode = keys[k];
+
+                robot.type(keyCode);
+
+                robot.delay(robotDelay);
+
+                if (!keyPressReceived) {
+                    synchronized (lock) {
+                        try {
+                            lock.wait(waitDelay);
+                        } catch (InterruptedException e) {}
+                    }
+                }
+
+                assertTrue(keyPressReceived, "key press event was not received");
+            }
+
+            System.out.println("passed");
+        }
+
+        robot.waitForIdle();
+        frame.dispose();
+    }
+
+
+    public static void main(String[] args) throws Exception {
+
+        KeyMaskTest test = new KeyMaskTest();
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2001, 2014, 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.awt.*;
+
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+
+import static jdk.testlibrary.Asserts.*;
+
+
+import test.java.awt.event.helpers.lwcomponents.LWButton;
+import test.java.awt.event.helpers.lwcomponents.LWList;
+
+
+/*
+ * @test
+ * @bug 8043126
+ * @summary Check whether MouseEvent.getModifiers(), MouseEvent.getModifiersEx()
+ *          and KeyEvent.getModifiers() return correct modifiers when pressing
+ *          keys Ctrl, Alt, Shift, Meta and mouse buttons sequentially
+ *
+ * @library ../../../../../lib/testlibrary/  ../../helpers/lwcomponents/
+ * @build LWComponent
+ * @build LWButton
+ * @build LWList
+ * @build ExtendedRobot
+ * @run main/timeout=600 MouseButtonsAndKeyMasksTest
+ */
+
+public class MouseButtonsAndKeyMasksTest implements MouseListener, KeyListener {
+
+    Frame frame;
+
+    Button    button;
+    LWButton  buttonLW;
+    TextField textField;
+    TextArea  textArea;
+    List      list;
+    LWList    listLW;
+
+    ExtendedRobot robot;
+
+    private final static int robotDelay = 1500;
+    private final static int   keyDelay =  500;
+    private final static int  waitDelay = 5000;
+
+    int modMouse = 0, modMouseEx = 0, modKey = 0, modAction = 0;
+
+    boolean mousePressFired = false;
+    boolean keyPressFired = false;
+
+    final Object lock;
+
+    MouseButtonsAndKeyMasksTest() throws Exception {
+        lock = new Object();
+        robot = new ExtendedRobot();
+        EventQueue.invokeAndWait( this::createGUI );
+    }
+
+    public void createGUI() {
+
+        frame = new Frame();
+        frame.setTitle("MouseButtonsAndKeysTest");
+        frame.setLayout(new GridLayout(1, 6));
+
+        button = new Button();
+        button.addKeyListener(this);
+        button.addMouseListener(this);
+        frame.add(button);
+
+        buttonLW = new LWButton();
+        buttonLW.addKeyListener(this);
+        buttonLW.addMouseListener(this);
+        frame.add(buttonLW);
+
+        textField = new TextField(5);
+        textField.addKeyListener(this);
+        textField.addMouseListener(this);
+        frame.add(textField);
+
+        textArea = new TextArea(5, 5);
+        textArea.addKeyListener(this);
+        textArea.addMouseListener(this);
+        frame.add(textArea);
+
+        list = new List();
+        for (int i = 1; i <= 5; ++i) { list.add("item " + i); }
+        list.addKeyListener(this);
+        list.addMouseListener(this);
+        frame.add(list);
+
+        listLW = new LWList();
+        for (int i = 1; i <= 5; ++i) { listLW.add("item " + i); }
+        listLW.addKeyListener(this);
+        listLW.addMouseListener(this);
+        frame.add(listLW);
+
+
+        frame.setBackground(Color.gray);
+        frame.setSize(500, 80);
+        frame.setVisible(true);
+        frame.toFront();
+    }
+
+
+    @Override
+    public void mouseClicked(MouseEvent e) {}
+
+    @Override
+    public void mousePressed(MouseEvent e) {
+
+        modMouse = e.getModifiers();
+        modMouseEx = e.getModifiersEx();
+        mousePressFired = true;
+        synchronized (lock) { lock.notifyAll(); }
+    }
+
+    @Override
+    public void mouseReleased(MouseEvent e) {}
+    @Override
+    public void mouseEntered(MouseEvent e) {}
+    @Override
+    public void mouseExited(MouseEvent e) {}
+
+
+    @Override
+    public void keyTyped(KeyEvent e) {}
+
+    @Override
+    public void keyPressed(KeyEvent e) {
+
+        if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { return; }
+
+        keyPressFired = true;
+        modKey = e.getModifiers();
+
+        synchronized (lock) { lock.notifyAll(); }
+    }
+
+    @Override
+    public void keyReleased(KeyEvent e) {}
+
+    void doTest() throws Exception {
+
+        int buttons[] = new int[]{
+            InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK};
+
+        int buttonsEx[] = new int[]{
+            InputEvent.BUTTON1_DOWN_MASK, InputEvent.BUTTON2_DOWN_MASK, InputEvent.BUTTON3_DOWN_MASK};
+
+        String OS = System.getProperty("os.name").toLowerCase();
+        System.out.println(OS);
+
+        int keyMods[], keyModsEx[], keys[];
+
+
+        if (OS.contains("linux")) {
+            keyMods = new int[]{InputEvent.SHIFT_MASK, InputEvent.CTRL_MASK};
+            keyModsEx = new int[]{InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK};
+            keys = new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL};
+        } else if (OS.contains("os x")) {
+            keyMods = new int[]{
+                InputEvent.SHIFT_MASK, InputEvent.CTRL_MASK, InputEvent.ALT_MASK, InputEvent.META_MASK};
+            keyModsEx = new int[]{
+                InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK, InputEvent.ALT_DOWN_MASK, InputEvent.META_DOWN_MASK};
+            keys = new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_META};
+        } else if (OS.contains("sunos")) {
+            keyMods   = new int[]{InputEvent.SHIFT_MASK, InputEvent.META_MASK};
+            keyModsEx = new int[]{InputEvent.SHIFT_DOWN_MASK, InputEvent.META_DOWN_MASK};
+            keys = new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_META};
+        } else {
+            keyMods = new int[]{
+                InputEvent.SHIFT_MASK, InputEvent.CTRL_MASK, InputEvent.ALT_MASK};
+            keyModsEx = new int[]{
+                InputEvent.SHIFT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK, InputEvent.ALT_DOWN_MASK};
+            keys = new int[]{KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT};
+        }
+
+
+        ArrayList<Component> components = new ArrayList();
+        components.add(button);
+        components.add(buttonLW);
+        components.add(textField);
+        components.add(textArea);
+        components.add(list);
+        components.add(listLW);
+
+        for (Component c: components) {
+
+            System.out.println(c.getClass().getName() + ":");
+
+            Point origin = c.getLocationOnScreen();
+            int xc = origin.x + c.getWidth() / 2;
+            int yc = origin.y + c.getHeight() / 2;
+            Point center = new Point(xc, yc);
+
+            robot.delay(robotDelay);
+            robot.glide(origin, center);
+            robot.click();
+            robot.delay(robotDelay);
+
+            for (int b = 0; b < buttons.length; ++b) {
+
+                int btn = buttons[b];
+
+                for (int k = 0; k < keys.length; ++k) {
+
+                    int key = keys[k];
+
+                    System.out.print(KeyEvent.getKeyText(key) + " + button " + (b + 1));
+
+                    robot.delay(robotDelay);
+
+                    robot.keyPress(key);
+                    robot.delay(keyDelay);
+
+                    if (!keyPressFired) {
+                        synchronized (lock) {
+                            try {
+                                lock.wait(waitDelay);
+                            } catch (InterruptedException ex) {}
+                        }
+                    }
+
+                    if (!keyPressFired) {
+                        robot.keyRelease(key);
+                        assertTrue(false, "key press event was not received");
+                    }
+
+                    robot.mousePress(btn);
+                    robot.delay(robotDelay);
+
+                    if (!mousePressFired) {
+                        synchronized (lock) {
+                            try {
+                                lock.wait(waitDelay);
+                            } catch (InterruptedException ex) {}
+                        }
+                    }
+
+                    assertTrue(mousePressFired, "mouse press event was not received");
+
+                    robot.mouseRelease(btn);
+                    robot.delay(robotDelay);
+
+                    // do checks
+                    assertEQ(modMouse & btn, btn, "invalid mouse button mask");
+                    assertEQ(modKey & keyMods[k], keyMods[k], "invalid key mask");
+                    assertEQ(buttonsEx[b] | keyModsEx[k], modMouseEx, "invalid extended modifiers");
+
+                    mousePressFired  = false;
+                    keyPressFired    = false;
+
+                    robot.keyRelease(key);
+                    robot.delay(keyDelay);
+
+                    robot.type(KeyEvent.VK_ESCAPE);
+
+                    robot.delay(robotDelay);
+
+                    System.out.println(" - passed");
+                }
+            }
+        }
+
+        robot.waitForIdle();
+        frame.dispose();
+    }
+
+
+    public static void main(String[] args) throws Exception {
+
+        MouseButtonsAndKeyMasksTest test = new MouseButtonsAndKeyMasksTest();
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/MouseEvent/MouseButtonsTest/MouseButtonsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2001, 2014, 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.awt.*;
+
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import test.java.awt.event.helpers.lwcomponents.LWButton;
+import test.java.awt.event.helpers.lwcomponents.LWList;
+
+import java.util.ArrayList;
+
+import static jdk.testlibrary.Asserts.*;
+
+/*
+ * @test
+ * @bug 8043126
+ * @summary Check whether getButton() returns correct mouse button
+ *          number when the mouse buttons are pressed and getModifiers()
+ *          returns correct modifiers
+ *
+ * @library ../../../../../lib/testlibrary/  ../../helpers/lwcomponents/
+ * @build LWComponent
+ * @build LWButton
+ * @build LWList
+ * @build ExtendedRobot
+ * @run main/timeout=600 MouseButtonsTest
+ */
+
+public class MouseButtonsTest implements MouseListener {
+
+    private Frame frame;
+
+    private Button    button;
+    private LWButton  buttonLW;
+    private TextField textField;
+    private TextArea  textArea;
+    private List      list;
+    private LWList    listLW;
+
+    private int buttonPressedNumber = 0;
+    private int buttonReleasedNumber = 0;
+    private int modifiers = 0;
+
+
+    private final ExtendedRobot robot;
+
+    private final static int robotDelay = 1000;
+    private final static int waitDelay  = 3500;
+
+    private boolean released = false;
+    private boolean pressed = false;
+    private final Object lock;
+
+
+    MouseButtonsTest() throws Exception {
+        lock = new Object();
+        robot = new ExtendedRobot();
+        EventQueue.invokeAndWait( this::createGUI );
+    }
+
+    public void createGUI() {
+
+        frame = new Frame();
+        frame.setTitle("MouseButtonsTest");
+        frame.setLayout(new GridLayout(1, 6));
+
+        button = new Button();
+        button.addMouseListener(this);
+        frame.add(button);
+
+        buttonLW = new LWButton();
+        buttonLW.addMouseListener(this);
+        frame.add(buttonLW);
+
+        textField = new TextField(5);
+        textField.addMouseListener(this);
+        frame.add(textField);
+
+        textArea = new TextArea(5, 5);
+        textArea.addMouseListener(this);
+        frame.add(textArea);
+
+        list = new List();
+        for (int i = 1; i <= 5; ++i) { list.add("item " + i); }
+        list.addMouseListener(this);
+        frame.add(list);
+
+        listLW = new LWList();
+        for (int i = 1; i <= 5; ++i) { listLW.add("item " + i); }
+        listLW.addMouseListener(this);
+        frame.add(listLW);
+
+
+        frame.setBackground(Color.gray);
+        frame.setSize(500, 100);
+        frame.setVisible(true);
+        frame.toFront();
+    }
+
+
+    @Override
+    public void mouseClicked(MouseEvent e) {}
+
+    @Override
+    public void mousePressed(MouseEvent e) {
+
+        assertFalse(e.getButton() == MouseEvent.NOBUTTON, "invalid button");
+
+        buttonPressedNumber = e.getButton();
+        modifiers = e.getModifiers();
+
+        pressed = true;
+
+        synchronized (lock) {
+            try {
+                lock.notifyAll();
+            } catch (Exception ex) {}
+        }
+    }
+
+    @Override
+    public void mouseReleased(MouseEvent e) {
+
+        assertFalse(e.getButton() == MouseEvent.NOBUTTON, "invalid button");
+
+        buttonReleasedNumber = e.getButton();
+        modifiers = e.getModifiers();
+
+        released = true;
+
+        synchronized (lock) {
+            try {
+                lock.notifyAll();
+            } catch (Exception ex) {}
+        }
+    }
+
+    @Override
+    public void mouseEntered(MouseEvent e) {}
+
+    @Override
+    public void mouseExited(MouseEvent e) {}
+
+
+    void doTest() throws Exception {
+
+        int masks[] = new int[]{
+            InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK};
+
+        int buttons[] = new int[]{
+            MouseEvent.BUTTON1, MouseEvent.BUTTON2, MouseEvent.BUTTON3};
+
+        ArrayList<Component> components = new ArrayList();
+        components.add(button);
+        components.add(buttonLW);
+        components.add(textField);
+        components.add(textArea);
+        components.add(list);
+        components.add(listLW);
+
+        for (Component c: components) {
+
+            System.out.println(c.getClass().getName() + ":");
+
+            Point origin = c.getLocationOnScreen();
+            int xc = origin.x + c.getWidth() / 2;
+            int yc = origin.y + c.getHeight() / 2;
+            Point center = new Point(xc, yc);
+
+            robot.delay(robotDelay);
+            robot.glide(origin, center);
+            robot.click();
+            robot.delay(robotDelay);
+
+            for (int i = 0; i < masks.length; ++i) {
+
+                pressed  = false;
+                released = false;
+
+                int mask = masks[i];
+                robot.mousePress(mask);
+                robot.delay(robotDelay);
+
+                if (!pressed) {
+                    synchronized (lock) {
+                        try {
+                            lock.wait(waitDelay);
+                        } catch (InterruptedException ex) {}
+                    }
+                }
+
+                assertTrue(pressed, "mouse press event was not received");
+                assertEQ((modifiers & mask), mask, "invalid mask modifiers");
+
+                robot.mouseRelease(mask);
+                robot.delay(robotDelay);
+
+                if (!released) {
+                    synchronized (lock) {
+                        try {
+                            lock.wait(waitDelay);
+                        } catch (InterruptedException ex) {}
+                    }
+                }
+
+                assertTrue(released, "mouse release event was not received");
+                assertEQ((modifiers & mask), mask, "invalid mask modifiers");
+
+                assertEquals(buttonPressedNumber,  buttons[i]);
+                assertEquals(buttonReleasedNumber, buttons[i]);
+
+                robot.type(KeyEvent.VK_ESCAPE);
+                robot.delay(robotDelay);
+
+                System.out.println("button " + buttons[i] + " - passed");
+            }
+        }
+
+        robot.waitForIdle();
+        frame.dispose();
+    }
+
+
+    public static void main(String[] args) throws Exception {
+
+        MouseButtonsTest test = new MouseButtonsTest();
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/MouseEvent/MultipleMouseButtonsTest/MultipleMouseButtonsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2001, 2014, 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.awt.*;
+import java.awt.event.*;
+import java.util.ArrayList;
+
+import test.java.awt.event.helpers.lwcomponents.LWButton;
+import test.java.awt.event.helpers.lwcomponents.LWList;
+
+import static jdk.testlibrary.Asserts.*;
+
+/*
+ * @test
+ * @bug 8043126
+ * @summary Check whether correct modifiers set when multiple mouse buttons were pressed;
+ *          check number of received events.
+ *
+ * @library ../../../../../lib/testlibrary/  ../../helpers/lwcomponents/
+ * @build LWComponent
+ * @build LWButton
+ * @build LWList
+ * @build ExtendedRobot
+ * @run main/timeout=600 MultipleMouseButtonsTest
+ */
+
+
+public class MultipleMouseButtonsTest implements MouseListener {
+
+    private final static int robotDelay = 1000;
+
+    private final ExtendedRobot robot;
+    private final Object lock = new Object();
+
+    private Frame frame;
+
+    private Button    button;
+    private LWButton  buttonLW;
+    private TextField textField;
+    private TextArea  textArea;
+    private List      list;
+    private LWList    listLW;
+
+    private int eventCount;
+    private int testCount;
+    private boolean pressed = false;
+    private int modifiers = 0;
+    private int modifiersEx = 0;
+
+    private boolean countEvents = false;
+
+
+    public void createGUI() {
+
+        frame = new Frame("MultipleMouseButtonTest");
+        frame.setLayout(new GridLayout(1, 6));
+
+        button = new Button();
+        button.addMouseListener(this);
+        frame.add(button);
+
+        buttonLW = new LWButton();
+        buttonLW.addMouseListener(this);
+        frame.add(buttonLW);
+
+        textField = new TextField(5);
+        textField.addMouseListener(this);
+        frame.add(textField);
+
+        textArea = new TextArea(5, 5);
+        textArea.addMouseListener(this);
+        frame.add(textArea);
+
+        list = new List();
+        for (int i = 1; i <= 5; ++i) { list.add("item " + i); }
+        list.addMouseListener(this);
+        frame.add(list);
+
+        listLW = new LWList();
+        for (int i = 1; i <= 5; ++i) { listLW.add("item " + i); }
+        listLW.addMouseListener(this);
+        frame.add(listLW);
+
+        frame.setBackground(Color.gray);
+        frame.setSize(500, 100);
+        frame.setVisible(true);
+        frame.toFront();
+    }
+
+    @Override
+    public void mouseClicked(MouseEvent e) {}
+    @Override
+    public void mouseEntered(MouseEvent e) {}
+    @Override
+    public void mouseExited (MouseEvent e) {}
+
+    @Override
+    public void mousePressed(MouseEvent e) {
+
+        if (!countEvents) { return; }
+
+        ++eventCount;
+
+        pressed = true;
+        modifiers = e.getModifiers();
+        modifiersEx = e.getModifiersEx();
+
+        synchronized (lock) { lock.notifyAll(); }
+    }
+
+    @Override
+    public void mouseReleased(MouseEvent e) {
+
+        if (countEvents) {
+            ++eventCount;
+        }
+    }
+
+    MultipleMouseButtonsTest() throws Exception {
+        this.robot = new ExtendedRobot();
+        EventQueue.invokeAndWait( this::createGUI );
+    }
+
+    void doTest() throws Exception {
+
+        int masks[] = new int[]{InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK};
+        int masksEx[] = new int[]{InputEvent.BUTTON1_DOWN_MASK, InputEvent.BUTTON2_DOWN_MASK, InputEvent.BUTTON3_DOWN_MASK};
+
+        robot.waitForIdle();
+
+        ArrayList<Component> components = new ArrayList();
+        components.add(button);
+        components.add(buttonLW);
+        components.add(textField);
+        components.add(textArea);
+        components.add(list);
+        components.add(listLW);
+
+        for (Component c: components) {
+
+            System.out.println(c.getClass().getName() + ": ");
+
+            Point origin = c.getLocationOnScreen();
+
+            int xc = origin.x + c.getWidth() / 2;
+            int yc = origin.y + c.getHeight() / 2;
+            Point center = new Point(xc, yc);
+
+            robot.delay(robotDelay);
+            robot.mouseMove(origin);
+            robot.delay(robotDelay);
+            robot.glide(origin, center);
+            robot.delay(robotDelay);
+            robot.click();
+            robot.delay(robotDelay);
+
+            testCount = 0;
+            eventCount = 0;
+
+            for (int i = 0; i < masks.length; ++i) {
+
+                for (int k = 0; k < masks.length; ++k) {
+                    if (k == i) { continue; }
+
+                    countEvents = false;
+                    robot.mousePress(masks[i]);
+                    robot.delay(robotDelay);
+
+                    countEvents = true;
+
+                    pressed = false;
+
+                    robot.mousePress(masks[k]);
+                    robot.delay(robotDelay);
+                    ++testCount;
+
+                    if (!pressed) {
+                        synchronized (lock) {
+                            try {
+                                lock.wait(3 * robotDelay);
+                            } catch (InterruptedException ex) {}
+                        }
+                    }
+
+                    assertTrue(pressed, "mouse press event was not received");
+
+                    assertEQ(modifiers & masks[k], masks[k], "invalid modifiers");
+                    assertEQ(modifiersEx & masksEx[i], masksEx[i], "invalid extended modifiers");
+
+                    robot.mouseRelease(masks[k]);
+                    robot.delay(robotDelay);
+                    ++testCount;
+
+                    countEvents = false;
+
+                    robot.mouseRelease(masks[i]);
+                    robot.delay(robotDelay);
+
+                    robot.type(KeyEvent.VK_ESCAPE);
+                    robot.delay(robotDelay);
+                } //k
+            } //i
+
+            assertEquals(testCount, eventCount, "different amount of sent and received events");
+            System.out.println("passed");
+        } //component
+
+        robot.waitForIdle();
+        frame.dispose();
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        MultipleMouseButtonsTest test = new MultipleMouseButtonsTest();
+        test.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/helpers/lwcomponents/LWButton.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,418 @@
+/*
+ * Copyright (c) 2001, 2014, 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.java.awt.event.helpers.lwcomponents;
+
+import java.awt.*;
+import java.awt.event.*;
+
+/**
+ * Lightweight <i>Button</i> component with some nice features. This
+ * component provides the capabilities of Buttons, namely that you it
+ * displays a label string and, when clicked, causes the
+ * ActionListener method to be called.<p>
+ *
+ * The look of the button is a little unusual. There are three
+ * rectangles drawn at the border that indicate various states
+ * of the button.  These are (listed from outside in)<p>
+ * <ol>
+ * <li><b>Focus</b>: Indicates that the LWButton has the focus.
+ * <li><b>Mouse Over</b>: Indicates that the mouse is over the component.
+ * <li><b>Mouse Pressed</b>: Indicates that the mouse has been pressed.
+ * </ol>
+ *
+ * In addition, when the button has been activated (mouse clicked or
+ * via keyboard activation) the button flashes briefly.
+ */
+
+public class LWButton extends LWComponent {
+
+  /*
+   * The button's Label.
+   * If Label is not specified it will default to "".
+   * @serial
+   * @see getLabel()
+   * @see setLabel()
+   */
+  private String label;
+  private boolean isInClick = false;
+
+  private static final String base = "LWButton";
+  private static int nameCounter = 0;
+
+  private transient ActionListener actionListener;
+
+  /*
+   * The action to be performaed once a button has been
+   * pressed.
+   * actionCommand can be null.
+   * @serial
+   * @see getActionCommand()
+   * @see setActionCommand()
+   */
+  String actionCommand;
+
+  Color colMousePressed;
+
+  public LWButton() { this(""); }
+
+  public LWButton(String label) {
+    this(label, Color.red, Color.green, Color.white);
+  }
+
+  /**
+   * Initialize the LWButton, fully specifying all parameters.
+   * @param label The string to display.
+   * @param fgnd  The color to draw the label in.
+   * @param bkgnd The color of the button itself.
+   * @param mousePressed The Color of the MousePressed rectangle.
+   */
+  public LWButton(String label, Color fgnd, Color bkgnd, Color mousePressed) {
+    super();
+    this.label = label;
+    setBackground(fgnd);
+    setForeground(bkgnd);
+    colMousePressed = mousePressed;
+    setName(makeComponentName());
+
+    enableEvents(  AWTEvent.MOUSE_EVENT_MASK
+         | AWTEvent.KEY_EVENT_MASK
+         | AWTEvent.ACTION_EVENT_MASK);
+    setEnabled(true);
+  }
+
+  /**
+   * Make the component flash briefly.
+   */
+  public void flash() {
+    isInClick = true;
+    repaint();
+
+    class unClicker implements Runnable {
+      @Override
+      public void run() {
+        try { Thread.sleep(100); } catch (InterruptedException ee) {}
+        isInClick = false;
+        repaint();
+      }
+    }
+    try {
+      unClicker uc = new unClicker();
+      new Thread(uc).start();
+    } catch (Exception e) {
+      // In case we're in an applet and the security has not been
+      // turned off (in which case we can't start a new thread)
+      // we can catch that and set the flag back to how it should be.
+      isInClick = false;
+      repaint();
+    }
+  }
+
+  /**
+   * Set the MousePressed color (the color shown in the MousePressed rectangle
+   * when the mouse is over the component).
+   * @param c The color of the MousePressed rectangle.
+   */
+  public void setMousePressedColor(Color c) { colMousePressed = c; }
+
+  /**
+   * Get the MousePressed color.
+   * @return The color of the MousePressed rectangle.
+   */
+  public Color getMousePressedColor() { return colMousePressed; }
+
+  /**
+   * Used to dispatch out the ActionEvent for a corresponding InputEvent.
+   * @param e The InputEvent that is causing the ActionEvent dispatch.
+   */
+  private void sendActionEvent(InputEvent e) {
+
+    int modifiers = e.getModifiers();
+    int aModifiers = 0;
+
+    if ((modifiers & MouseEvent.SHIFT_MASK) != 0) {
+      aModifiers |= ActionEvent.SHIFT_MASK;
+    }
+    if ((modifiers & MouseEvent.CTRL_MASK) != 0) {
+      aModifiers |= ActionEvent.CTRL_MASK;
+    }
+    if ((modifiers & MouseEvent.META_MASK) != 0) {
+      aModifiers |= ActionEvent.META_MASK;
+    }
+    if ((modifiers & MouseEvent.ALT_MASK) != 0) {
+      aModifiers |= ActionEvent.ALT_MASK;
+    }
+
+    ActionEvent ae = new ActionEvent(this,
+                     ActionEvent.ACTION_PERFORMED,
+                     actionCommand,
+                     aModifiers);
+    // XXX: What's the right way to send out the ActionEvent?
+    //   My assumption was to put it into the system event queue
+    //   and the it will be dispatched back into <i>processEvent</i>
+    //   for us.  However this doesn't happen...?
+    if (actionListener != null) {
+      actionListener.actionPerformed(ae);
+    }
+    //Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(ae);
+  }
+
+  /**
+   * Set whether the component is enabled ({@code true}) or not.
+   * @param enabled If {@code true}, the component is to be enabled.
+   */
+  @Override
+  public void setEnabled(boolean enabled) {
+    super.setEnabled(enabled);
+
+    if (enabled) {
+      enableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
+    } else {
+      disableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
+    }
+    repaint(1);
+  }
+
+  /**
+   * Indicates that LWButton component can receive focus.
+   * @return  {@code true} if the LWButton component can receive focus
+   */
+  @Override
+  public boolean isFocusTraversable() { return true; }
+
+  /**
+   * Construct a name for this component. Called by getName() when the
+   * name is null.
+   */
+  String makeComponentName() {
+    synchronized (getClass()) {
+      return base + nameCounter++;
+    }
+  }
+
+  /**
+   * Handle painting the enabled version of the component.
+   *
+   * ASSUMES: g.color may be changed
+   */
+  @Override
+  public void paint(Graphics g) {
+
+    super.paint(g);
+    restrictGraphicsToClientArea(g);
+
+    Dimension dim = getClientSize();
+
+    int s = Math.min(dim.width - 1, dim.height - 1);
+
+    if (isInClick) {
+      g.setColor(Color.white);
+    } else {
+      g.setColor(getBackground());
+    }
+
+    // In jdk 1.2 (pre-release) there was a bug using clearRect
+    // to paint the background of a lightweight.
+    //g.clearRect(loc.x, loc.y, dim.width, dim.height);
+    g.fillRect(0, 0, dim.width, dim.height);
+
+    if (mouseB1Pressed) {
+      g.setColor(colMousePressed);
+      //LWComponent.traceMsg("paint mousePressed " + this.toString());
+      g.drawRect(1, 1, dim.width - 3, dim.height - 3);
+    }
+
+    Font f = getFont();
+    if (f != null) {
+      FontMetrics fm = getFontMetrics(f);
+      g.setColor(getForeground());
+      g.drawString(label,
+                   s/2 - fm.stringWidth(label)/2,
+                   s/2 + fm.getMaxDescent());
+    }
+
+    unrestrictGraphicsFromClientArea(g);
+  }
+
+  @Override
+  public Dimension getPreferredSize() {
+    Font f = getFont();
+    if (f != null) {
+      FontMetrics fm = getFontMetrics(f);
+      int max = Math.max(fm.stringWidth(label) + 40, fm.getHeight() + 40);
+      return new Dimension(max, max);
+    } else {
+      return new Dimension(100, 100);
+    }
+  }
+
+  @Override
+  public Dimension getMinimumSize() {
+    return getPreferredSize();
+  }
+
+  /**
+   * Get the text displayed in the LWButton.
+   * @return  the text displayed in the LWButton
+   */
+  public String getText() { return label; }
+
+  /**
+   * Set the text displayed in the LWButton.
+   * @param s The text to be displayed.
+   */
+  public void setText(String s) {
+    Font f = getFont();
+    int oWidth = 0;
+    int oHeight = 0;
+    int nWidth = 0;
+    int nHeight = 0;
+    int invalidated = 0;
+    FontMetrics fm = null;
+
+    if (f != null) {
+      fm = getFontMetrics(f);
+      oWidth = fm.stringWidth(label);
+      oHeight = fm.getHeight();
+    }
+
+    this.label = s;
+
+    if (f != null) {
+      nWidth = fm.stringWidth(label);
+      nHeight = fm.getHeight();
+
+      if ((nWidth > oWidth) || (nHeight > oHeight)) {
+        invalidate();
+        invalidated = 1;
+      }
+    }
+
+    if (invalidated == 0) {
+      repaint();
+    }
+  }
+
+  /**
+   * Set the command name for the action event fired
+   * by this button. By default this action command is
+   * set to match the label of the button.
+   * @param     command  A string used to set the button's
+   *                     action command.
+   *            If the string is <code>null</code> then the action command
+   *            is set to match the label of the button.
+   * @see       java.awt.event.ActionEvent
+   * @since     JDK1.1
+   */
+  public void setActionCommand(String command) {
+    actionCommand = command;
+  }
+
+  /**
+   * Returns the command name of the action event fired by this button.
+   * If the command name is {@code null} (default) then this method
+   * returns the label of the button.
+   *
+   * @return the command name of the action event fired by this button
+   *         or the label of the button (in case of {@code null})
+   */
+  public String getActionCommand() {
+    return (actionCommand == null? label : actionCommand);
+  }
+
+  /**
+   * Add the specified action listener to receive action events from
+   * this button. Action events occur when a user presses or releases
+   * the mouse over this button.
+   * @param         l the action listener.
+   * @see           java.awt.event.ActionListener
+   * @see           #removeActionListener
+   * @since         JDK1.1
+   */
+  public synchronized void addActionListener(ActionListener l) {
+    actionListener = AWTEventMulticaster.add(actionListener, l);
+    enableEvents(AWTEvent.MOUSE_EVENT_MASK);
+  }
+
+  /**
+   * Remove the specified action listener so that it no longer
+   * receives action events from this button. Action events occur
+   * when a user presses or releases the mouse over this button.
+   * @param         l     the action listener.
+   * @see           java.awt.event.ActionListener
+   * @see           #addActionListener
+   * @since         JDK1.1
+   */
+  public synchronized void removeActionListener(ActionListener l) {
+    actionListener = AWTEventMulticaster.remove(actionListener, l);
+  }
+
+  @Override
+  protected void processKeyEvent(KeyEvent e) {
+    super.processKeyEvent(e);
+    if (!isEnabled()) { return; }
+    switch(e.getID()) {
+    case KeyEvent.KEY_TYPED:
+      switch (e.getKeyCode()) {
+        case KeyEvent.VK_ENTER:
+        case KeyEvent.VK_SPACE:
+          flash();
+          sendActionEvent(e);
+          break;
+      }
+      break;
+    }
+  }
+
+  @Override
+  protected void processMouseEvent(MouseEvent e) {
+    super.processMouseEvent(e);
+    if (!isEnabled()) { return; }
+    switch(e.getID()) {
+    case MouseEvent.MOUSE_PRESSED:
+      requestFocus();
+      repaint();
+      break;
+    case MouseEvent.MOUSE_RELEASED:
+      repaint();
+      break;
+    case MouseEvent.MOUSE_CLICKED:
+      if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
+        flash();
+        sendActionEvent(e);
+      }
+      break;
+    }
+  }
+
+  /**
+   * Returns the parameter string representing the state of this
+   * button. This string is useful for debugging.
+   * @return     the parameter string of this button.
+   */
+  @Override
+  protected String paramString() {
+    return super.paramString() + ", label = " + label;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/helpers/lwcomponents/LWComponent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,464 @@
+/*
+ * Copyright (c) 2001, 2014, 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.java.awt.event.helpers.lwcomponents;
+
+import java.io.*;
+import java.awt.*;
+import java.awt.event.*;
+
+/**
+ * This is experimental - The idea is to subclass all the LW components
+ * from LWComponent to provide for some common capabilities.  The main
+ * capability to be provided is the status rectangles as done for LWButton.
+ * In particular the Focus and MouseOver rectangles are generically
+ * useful, while other rectangles might be useful to other components.<p>
+ *
+ * To implement that, here is the idea ... borrowed from Win32 ... Each
+ * of the LW components has both a client and non-client region.  We
+ * call paintNC to paint the non-client region (Focus and MouseOver
+ * rectangles), and the subclass might be permitted to implement paintNC
+ * but for now they aren't.<p>
+ *
+ * Then the paint{Enabled,Disabled} methods are called as appropriate.
+ * Note that paintDisabled is implemented in LWComponent to call paintEnabled
+ * then stipple over the top of it.<p>
+ *
+ * So it is paintEnabled that the component should implement.  This method
+ * needs to know the dimensions of the client area (getClientRegion?) and
+ * the Graphics needs to have it's clip region set appropriately.<p>
+ *
+ * <b>KVETCHING</b>: <i>Kvetch</i> is a Yiddish word which means, basically,
+ * to complain very precisely.  The LWComponent family tracks various pieces
+ * of information over time that are used to check closely for correct behavior
+ * in some circumstances.  The method <i>kvetch</i> is where this code lives
+ * and is intended to check a broad range of conditions.<p>
+ *
+ * To turn off specific kvetch's, one simply specifies a System property
+ * as in this table:<p>
+ *
+ * <table border="1">
+ * <tr><th>Property name</th><th>Value</th><th>Discussion</th></tr>
+ * <tr>
+ *    <th>javasoft.awtsqe.lw.IGNORE_FOCUS_KVETCH</th>
+ *    <th>true or false</th>
+ *    <td>Specify whether the <i>hasFocus</i> kvetch is checked.</td>
+ * </tr>
+ * </table><p>
+ *
+ * <b>XXX To implement</b> - specifying colors.  NCBackground,
+ * FocusRectColor, MouseOverColor are the threee colors.  paintNC
+ * fills the NC region with NCBackground, and then pains the two
+ * colors as appropriate.  There needs to be methods to get/specify
+ * these colors.<p>
+ *
+ * <b>XXX To implement</b> - Specifying the component name and toString().
+ * The subclass should only give the base class name, and a method
+ * in LWComponent should construct a name from that.  For toString()
+ * there needs to be a small amount of infrastructure built.<p>
+ */
+
+public abstract class LWComponent extends Component {
+
+  protected static Color ncBackgroundColor;
+  protected static Color focusColor;
+  protected static Color focusWrongColor;
+  protected static Color mouseOverColor;
+
+  static {
+    ncBackgroundColor = Color.white;
+    focusColor        = Color.black;
+    focusWrongColor   = Color.magenta;
+    mouseOverColor    = Color.blue;
+  }
+
+  /**
+   * Flag indicating whether our records indicate that the component
+   * should have focus.
+   */
+  protected boolean _shouldHaveFocus = false;
+  protected boolean _shouldBeShowing = false;
+
+  protected boolean mouseB1Pressed = false;
+  protected boolean mouseB2Pressed = false;
+  protected boolean mouseB3Pressed = false;
+  protected boolean mouseInside    = false;
+
+  protected static boolean tracingOn = false;
+  protected static PrintStream traceOutput = null;
+
+  // Uncommenting these lines turns on tracing for the package.
+  //  static {
+  //    tracingOn = true;
+  //    traceOutput = System.err;
+  //  }
+
+  public LWComponent() {
+    enableEvents(AWTEvent.MOUSE_EVENT_MASK
+         /*| AWTEvent.MOUSE_MOTION_EVENT_MASK*/
+           | AWTEvent.FOCUS_EVENT_MASK
+           | AWTEvent.COMPONENT_EVENT_MASK);
+  }
+
+  /**
+   * Print out an error message.
+   * @param msg  the message
+   */
+  public static void errorMsg(String msg) {
+    System.err.println("ERROR: " + msg);
+  }
+
+  /**
+   * Print out a tracing message
+   * @param msg  the message
+   */
+  public static void traceMsg(String msg) {
+    if (LWComponent.tracingOn) {
+      LWComponent.traceOutput.println(msg);
+    }
+  }
+
+  /////////////////////////////////////////////
+  /////// FLAGS FOR IGNORING KVETCH's /////////
+  /////////////////////////////////////////////
+
+  static boolean bIgnFocus = false;
+
+  static {
+    // Initialize the kvetch ignoring flags here.
+    String ignFocus = System.getProperty("javasoft.awtsqe.lw.IGNORE_FOCUS_KVETCH",
+                                         "false");
+    bIgnFocus = ignFocus.trim().toLowerCase().equals("true");
+  }
+
+  /**
+   * Check the <i>shoulds</i> and return a string indicating which
+   * do not match the components actual state.
+   *
+   * @return  the string indicating which do not match the components actual state
+   */
+  public String kvetch() {
+    String ret = this.toString();
+    boolean errors = false;
+
+    if (!bIgnFocus) {
+      if (hasFocus()) {
+        if (!shouldHaveFocus()) {
+          ret += "\nERROR: hasFocus indicates we have Focus, when we shouldn't.";
+          errors = true;
+        }
+      } else {
+        if (shouldHaveFocus()) {
+          ret += "\nERROR: (see bug#4233658) hasFocus does not indicate we have Focus, when we should.";
+          errors = true;
+        }
+      }
+    }
+
+    if (errors) {
+      return ret;
+    } else {
+      return null;
+    }
+  }
+
+  /**
+   * Check the <i>shoulds</i> and return a string indicating which
+   * do not match the components actual state.  Prints the output
+   * to the given PrintStream.
+   * @param out The PrintStream to print to.
+   */
+  public void kvetch(PrintStream out) {
+    if (out != null) {
+      String s = kvetch();
+      if (s != null) {
+        LWComponent.errorMsg(s);
+      }
+    }
+  }
+
+  /**
+   * Turn on tracing for the LWComponent family.
+   * @param out  the output stream
+   */
+  public static void startTracing(PrintStream out) {
+    tracingOn = true;
+    traceOutput = out;
+  }
+
+  /**
+   * Turn off tracing for the LWComponent family.
+   */
+  public static void stopTracing() { tracingOn = false; traceOutput = null; }
+
+  /**
+   * Indicate whether it is believed the component should have focus.
+   * @return {@code true} if the component should have focus
+   */
+  public boolean shouldHaveFocus() { return _shouldHaveFocus; }
+
+  /**
+   * Indicate whether it is believed the component should be showing.
+   * @return  {@code true} if the component should be showing
+   */
+  public boolean shouldBeShowing() { return _shouldBeShowing; }
+
+  @Override
+  protected void processFocusEvent(FocusEvent e) {
+    super.processFocusEvent(e);
+    LWComponent.traceMsg("processFocusEvent " + e.toString());
+    switch (e.getID()) {
+    case FocusEvent.FOCUS_GAINED:
+      _shouldHaveFocus = true;
+      repaint();
+      break;
+    case FocusEvent.FOCUS_LOST:
+      _shouldHaveFocus = false;
+      repaint();
+      break;
+    }
+  }
+
+  @Override
+  protected void processComponentEvent(ComponentEvent e) {
+    super.processComponentEvent(e);
+    LWComponent.traceMsg("processComponentEvent " + e.toString());
+    switch (e.getID()) {
+      case ComponentEvent.COMPONENT_MOVED:   break;
+      case ComponentEvent.COMPONENT_RESIZED: break;
+      case ComponentEvent.COMPONENT_SHOWN:   _shouldBeShowing = true;  break;
+      case ComponentEvent.COMPONENT_HIDDEN:  _shouldBeShowing = false; break;
+    }
+  }
+
+  @Override
+  protected void processMouseEvent(MouseEvent e) {
+    int mod = e.getModifiers();
+    super.processMouseEvent(e);
+    LWComponent.traceMsg("processMouseEvent " + e.toString());
+    switch (e.getID()) {
+    case MouseEvent.MOUSE_PRESSED:
+      if ((mod & MouseEvent.BUTTON1_MASK) != 0) {
+        if (mouseB1Pressed) {
+          errorMsg("ERROR: MOUSE_PRESSED for B1 when already pressed, on "
+              + this.toString());
+        }
+        mouseB1Pressed = true;
+        break;
+      }
+      if ((mod & MouseEvent.BUTTON2_MASK) != 0) {
+        if (mouseB2Pressed) {
+          errorMsg("ERROR: MOUSE_PRESSED for B2 when already pressed, on "
+              + this.toString());
+        }
+        mouseB2Pressed = true;
+        break;
+      }
+      if ((mod & MouseEvent.BUTTON3_MASK) != 0) {
+        if (mouseB3Pressed) {
+          errorMsg("ERROR: MOUSE_PRESSED for B3 when already pressed, on "
+              + this.toString());
+        }
+        mouseB3Pressed = true;
+        break;
+      }
+      repaint();
+      break;
+    case MouseEvent.MOUSE_RELEASED:
+      if ((mod & MouseEvent.BUTTON1_MASK) != 0) {
+        if (!mouseB1Pressed) {
+          errorMsg("ERROR: MOUSE_RELEASED for B1 when not pressed, on "
+              + this.toString());
+        }
+        mouseB1Pressed = false;
+        break;
+      }
+      if ((mod & MouseEvent.BUTTON2_MASK) != 0) {
+        if (!mouseB2Pressed) {
+          errorMsg("ERROR: MOUSE_RELEASED for B2 when not pressed, on "
+              + this.toString());
+        }
+        mouseB2Pressed = false;
+        break;
+      }
+      if ((mod & MouseEvent.BUTTON3_MASK) != 0) {
+        if (!mouseB3Pressed) {
+          errorMsg("ERROR: MOUSE_RELEASED for B3 when not pressed, on "
+              + this.toString());
+        }
+        mouseB3Pressed = false;
+        break;
+      }
+      repaint();
+      break;
+    case MouseEvent.MOUSE_CLICKED:
+      break;
+    case MouseEvent.MOUSE_ENTERED:
+      if (mouseInside) {
+        errorMsg("ERROR: MOUSE_ENTERED when mouse already inside component, on "
+            + this.toString());
+      }
+      mouseInside = true;
+      repaint();
+      break;
+    case MouseEvent.MOUSE_EXITED:
+      if (!mouseInside) {
+        errorMsg("ERROR: MOUSE_EXITED when mouse not inside component, on "
+            + this.toString());
+      }
+      mouseInside = false;
+      repaint();
+      break;
+    case MouseEvent.MOUSE_MOVED:
+      break;
+    case MouseEvent.MOUSE_DRAGGED:
+      break;
+    }
+  }
+
+  public Point getClientLocation() {
+    return new Point(5, 5);
+  }
+
+  public Dimension getClientSize() {
+    Dimension dim = getSize();
+    dim.width -= 10;
+    dim.height -= 10;
+    return dim;
+  }
+
+  public Rectangle getClientBounds() {
+    Dimension dim = getClientSize();
+    return new Rectangle(5, 5, dim.width, dim.height);
+  }
+
+  public int getClientX() { return 5; }
+  public int getClientY() { return 5; }
+
+  /**
+   * Set the color used for painting the non-client area of the component.
+   * The default for this is Color.white.
+   *
+   * @param c The new color to use.
+   */
+  public void setNonClientColor(Color c) {
+    LWComponent.ncBackgroundColor = c;
+  }
+
+  /**
+   * Handle painting for the component.
+   */
+  @Override
+  public void paint(Graphics g) {
+    Dimension dim = getSize();
+
+    kvetch(System.err);
+
+    Color saveColor = g.getColor();
+    super.paint(g);
+
+    // ------------------- Paint the background -----------------
+
+    // In jdk 1.2 (pre-release) there was a bug using clearRect
+    // to paint the background of a lightweight.
+    //g.clearRect(0, 0, dim.width, dim.height);
+    g.setColor(getBackground());
+    g.fillRect(0, 0, dim.width, dim.height);
+
+    // ------------------- Paint the non-client area ------------
+
+    g.setColor(ncBackgroundColor);
+    //         x              y                width      height
+    g.fillRect(0,             0,               dim.width, 5);
+    g.fillRect(0,             5,               5,         dim.height - 10);
+    g.fillRect(dim.width - 5, 5,               5,         dim.height - 10);
+    g.fillRect(0,             dim.height - 5,  dim.width, 5);
+
+    if (shouldHaveFocus() || hasFocus()) {
+      g.setColor(shouldHaveFocus() && hasFocus()
+         ? focusColor
+         : focusWrongColor);
+      g.drawRect(1, 1, dim.width - 3, dim.height - 3);
+    }
+
+    if (mouseInside) {
+      g.setColor(mouseOverColor);
+      g.drawRect(3, 3, dim.width - 7, dim.height - 7);
+    }
+
+    // ------------------- Paint disabledness, if true -----------
+
+    if (!isEnabled()) {
+      g.setColor(getBackground());
+      Dimension size = getSize();
+      int borderThickness = 0;
+      int startX = borderThickness;
+      int startY = borderThickness;
+      int endX = startX + size.width  - 2 * borderThickness - 2;
+      int endY = startY + size.height - 2 * borderThickness - 2;
+      int x, y;
+      for (y = startY; y <= endY; y += 1) {
+        for (x = startX + (y % 2); x <= endX; x += 2) {
+          g.fillRect(x, y, 1, 1);
+        } // x
+      } // y
+    }
+
+    g.setColor(saveColor);
+  }
+
+  /**
+   * Restricts the Graphics to be within the "client area" of the
+   * component.  Recall that the LWComponent series of components has
+   * a "non-client area" of 5 pixels wide in which it draws two
+   * status rectangles showing mouse-over and has-focus status. <p>
+   *
+   * Child classes of LWComponent are to call {@code restrictGraphicsToClientArea}
+   * at the beginning of their {@code paint} method, and then call
+   * {@code unrestrictGraphicsFromClientArea} afterwards.<p>
+   *
+   * In order to make those paint methods as convenient as possible, these
+   * two methods make it appear as if the Graphics available to the
+   * component is slightly smaller than it really is, by the amount
+   * used in the non-client area (5 pixel wide border).<p>
+   *
+   * @param g The Graphics to restrict.
+   */
+  public void restrictGraphicsToClientArea(Graphics g) {
+    Dimension dim = getSize();
+    g.translate(5, 5);
+    g.setClip(0, 0, dim.width - 10, dim.height - 10);
+  }
+
+  /**
+   * Undo the restriction done in restrictGraphicsToClientArea.
+   *
+   * @param g The Graphics to unrestrict.
+   */
+  public void unrestrictGraphicsFromClientArea(Graphics g) {
+    g.translate(-5, -5);
+    Dimension dim = getSize();
+    g.setClip(0, 0, dim.width, dim.height);
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/helpers/lwcomponents/LWList.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,726 @@
+/*
+ * Copyright (c) 1999, 2014, 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.java.awt.event.helpers.lwcomponents;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.Vector;
+import java.util.Enumeration;
+
+/**
+ * Remarks : Source for LightWeight component - List.
+ *
+ * Scroll bar support is not available for this component, so if the
+ * items exceeds visibility those items will be truncated. Also, here
+ * double buffering is not used so there will be little bit flickering
+ * while it repaints. Item listener support is not enabled in this
+ * component. Listeners handled were Mouse, Key and Focus.
+ *
+ * @author R.Govindarajan (govind@siptech.co.in), G.N.V.Sekhar (sekharv@siptech.co.in)
+ */
+
+public class LWList extends LWComponent implements ItemSelectable {
+
+  // Constants used for component size
+  private final int MIN_WIDTH   = 100;
+  private final int MIN_HEIGHT  = 100;
+  private final int PREF_WIDTH  = 100;
+  private final int PREF_HEIGHT = 100;
+
+  // Constants used for setting color for component
+  private final Color BACK_COLOR          = Color.white;
+  private final Color FRONT_COLOR         = Color.black;
+  private final Color BORDER_COLOR        = Color.darkGray;
+  private final Color FOCUS_COLOR         = Color.blue;
+  private final Color FOCUS_FORECOLOR     = Color.white;
+  private final Color FOCUS_ENABLED_COLOR = Color.red;
+  private final int BORDER_WIDTH = 2;
+
+  private Vector stringList;  // List of items
+  private Vector selList;     // List of selected items
+  private int rows;           // Visible rows
+  private int focusIndex, prevfocusIndex;
+  private Dimension minSize;
+  private Dimension prefSize;
+  private boolean pressed, eventOccurred, focusEnabled;
+  private boolean multipleMode;
+
+  // Listeners handled for this component
+  private ActionListener actionListener;
+  private KeyListener    keyListener;
+  private FocusListener  focusListener;
+  private ItemListener   itemListener;
+
+  private static int nameCounter = 0;
+
+  /**
+   * Creates a new list.
+   */
+  public LWList() {
+    this(0);
+  }
+
+  /**
+   * Creates a new list with the specified number of rows;
+   * multiple selection mode is disabled.
+   *
+   * @param i  the number of rows
+   */
+  public LWList(int i) {
+    this(i, false);
+  }
+
+  /**
+   * Creates a new list with the specified number of rows and multiple selection mode.
+   *
+   * @param rows  the number of rows
+   * @param flag  determines whether the list allows multiple selections
+   */
+  public LWList(int rows, boolean flag) {
+    multipleMode        = flag;
+    this.rows           = rows;
+    minSize             = new Dimension(MIN_WIDTH, MIN_HEIGHT);
+    prefSize            = new Dimension(PREF_WIDTH, PREF_HEIGHT);
+    stringList          = new Vector();
+    selList             = new Vector();
+    selList.addElement(0);
+    focusIndex          = -1;
+    prevfocusIndex      = focusIndex;
+    enableEvents(AWTEvent.MOUSE_EVENT_MASK);
+    enableEvents(AWTEvent.KEY_EVENT_MASK);
+    enableEvents(AWTEvent.FOCUS_EVENT_MASK);
+    enableEvents(AWTEvent.ITEM_EVENT_MASK);
+    setName(makeComponentName()); // set the name to the component
+  }
+
+  String makeComponentName() {
+    String s = "LWList" + nameCounter++;
+    return s;
+  }
+
+  /**
+   * Set whether the component is enabled or not.
+   * @param enabled  if {@code true}, the component is to be enabled
+   */
+  @Override
+  public void setEnabled(boolean enabled) {
+    super.setEnabled(enabled);
+
+    if (enabled) {
+      enableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
+    } else {
+      disableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
+    }
+    repaint(1);
+  }
+
+  /**
+   * Set the selection mode.
+   *
+   * @param flag  determines whether the list allows multiple selections
+   */
+  public void setSelectionMode(boolean flag) {
+    multipleMode = flag;
+  }
+
+  /**
+   * Check if the list allows multiple selections.
+   *
+   * @return  {@code true} if the list allows multiple selections
+   */
+  public boolean isMultipleMode() {
+    return multipleMode;
+  }
+
+  /**
+   * Add the specified item.
+   *
+   * @param listItem  the item
+   */
+  public void add(String listItem) {
+    stringList.addElement(listItem);
+    invalidate();
+    repaint();
+  }
+
+  /**
+   * Get minimum dimension for the list.
+   *
+   * @return  the minimum dimensions for displaying
+   */
+  @Override
+  public Dimension getMinimumSize() {
+    return minSize;
+  }
+
+  /**
+   * Get the preferred size of the list.
+   *
+   * @return  the preferred dimensions for displaying
+   */
+  @Override
+  public Dimension getPreferredSize() {
+    return prefSize;
+  }
+
+  /**
+   * Get the background color for the component.
+   *
+   * @return  the background color for the component
+   */
+  @Override
+  public Color getBackground() {
+    return BACK_COLOR;
+  }
+
+  /**
+   * Get the foreground color for the component.
+   *
+   * @return  the foreground color for the component
+   */
+  @Override
+  public Color getForeground() {
+    return FRONT_COLOR;
+  }
+
+  /**
+   * Get the border color for the component.
+   *
+   * @return  the border color for the component
+   */
+  public Color getBorder() {
+    return BORDER_COLOR;
+  }
+
+  /**
+   * Get background color for the selected item.
+   *
+   * @return  the color for the selected item
+   */
+  public Color getFocusColor() {
+    return FOCUS_COLOR;
+  }
+
+  /**
+   * Get foreground color for the selected item.
+   *
+   * @return  the foreground color for the selected item
+   */
+  public Color getFocusForeColor() {
+    return FOCUS_FORECOLOR;
+  }
+
+  /**
+   * Get a "focus enabled" color - a small rectangle around the item
+   * should be drawn when the component got the focus.
+   *
+   * @return  the "focus enabled" color
+   */
+  public Color getFocusEnabledColor() {
+    return FOCUS_ENABLED_COLOR;
+  }
+
+  /**
+   * Get border width.
+   *
+   * @return  the border width
+   */
+  public int getBorderWidth() {
+    return BORDER_WIDTH;
+  }
+
+  /**
+   * Get the list item count.
+   *
+   * @return  the count of items
+   */
+  public int getItemCount() {
+    return stringList.size();
+  }
+
+  /**
+   * Get the specified item from the list.
+   *
+   * @param index  the index
+   * @return  the item string
+   */
+  public String getItem(int index) {
+    return (String)stringList.elementAt(index);
+  }
+
+  /**
+   * Get array of items from the list.
+   *
+   * @return  the array of item strings
+   */
+  public String[] getItems() {
+    String str[] = new String[getItemCount()];
+    int count = 0;
+    for (Enumeration e = stringList.elements(); e.hasMoreElements(); ) {
+      str[count++] = (String)e.nextElement();
+    }
+    return str;
+  }
+
+  /**
+   * Check whether the component can be a focus owner (explicitly enabled here).
+   *
+   * @return {@code true} if the component is focusable
+   */
+  @Override
+  public boolean isFocusTraversable() {
+    return true;
+  }
+
+  /**
+   * Check whether mouse click point lies within the list of items.
+   *
+   * @param pt  the click point
+   * @return  {@code true} if the click point lies within the list of items
+   */
+  @Override
+  public boolean contains(Point pt) {
+    Rectangle rect = new Rectangle();
+    Dimension d = getSize();
+    rect.x = getBorderWidth();
+    rect.y = getBorderWidth();
+    rect.width  = d.width  - (getBorderWidth() * 2);
+    rect.height = d.height - (getBorderWidth() * 2);
+    return rect.contains(pt);
+  }
+
+  /**
+   * Given a click point the item that has to be selected is found from the list
+   * and focusIndex variable is set accordingly.
+   *
+   * @param pt  the click point
+   */
+  private void findSelectedIndex(Point pt) {
+    Font f = getFont();
+    FontMetrics fm = getFontMetrics(f);
+    focusIndex = pt.y / fm.getHeight() - 1;
+    if (multipleMode) {
+      Integer fi = focusIndex;
+      if (selList.contains(fi)) {
+        int i = selList.indexOf(fi);
+        selList.removeElementAt(i);
+      } else {
+        selList.addElement(fi);
+      }
+    }
+  }
+
+  /**
+   * Set index of the selected item.
+   *
+   * @param index  the index
+   */
+  public void setSelectedIndex(int index) {
+    prevfocusIndex = focusIndex;
+    focusIndex = index;
+  }
+
+  /**
+   * Get the selected item index.
+   *
+   * @return  the selected item index.
+   */
+  public int getSelectedIndex() {
+    return focusIndex;
+  }
+
+  /**
+   * Get an array of the selected Objects.
+   *
+   * @return  array of the Objects
+   */
+  @Override
+  public Object[] getSelectedObjects() {
+    int ai[] = getSelectedIndexes();
+    Object aobj[] = new Object[selList.size()];
+    for (int i = 0; i < selList.size(); i++) {
+      aobj[i] = stringList.elementAt(ai[i]);
+    }
+    return aobj;
+  }
+
+  /**
+   * Get an array of the selected item indices.
+   *
+   * @return  the array of the indices
+   */
+  public int[] getSelectedIndexes() {
+    int ai[] = new int[selList.size()];
+    for (int i = 0; i < selList.size(); i++) {
+      ai[i] = ((Integer)selList.elementAt(i));
+    }
+    return ai;
+  }
+
+  /**
+   * Add the specified item listener to receive item events from the list.
+   *
+   * @param itemlistener  the item listener
+   */
+  @Override
+  public synchronized void addItemListener(ItemListener itemlistener) {
+    itemListener = AWTEventMulticaster.add(itemListener, itemlistener);
+    enableEvents(AWTEvent.ITEM_EVENT_MASK);
+  }
+
+  /**
+   * Remove the specified item listener so
+   * that it no longer receives item events from this list.
+   *
+   * @param itemlistener  the item listener
+   */
+  @Override
+  public synchronized void removeItemListener(ItemListener itemlistener) {
+    itemListener = AWTEventMulticaster.remove(itemListener, itemlistener);
+  }
+
+  /**
+   * Add the specified action listener to receive action events from this list.
+   *
+   * @param listener  the action listener
+   */
+  public synchronized void addActionListener(ActionListener listener) {
+    actionListener = AWTEventMulticaster.add(actionListener, listener);
+    enableEvents(AWTEvent.MOUSE_EVENT_MASK);
+  }
+
+  /**
+   * Remove the specified action listener so
+   * that it no longer receives action events from this list.
+   *
+   * @param listener  the action listener
+   */
+  public synchronized void removeActionListener(ActionListener listener) {
+    actionListener = AWTEventMulticaster.remove(actionListener, listener);
+  }
+
+  /**
+   * Add the specified key listener to receive key events from this component.
+   *
+   * @param listener  the key listener
+   */
+  @Override
+  public synchronized void addKeyListener(KeyListener listener) {
+    keyListener = AWTEventMulticaster.add(keyListener, listener);
+    enableEvents(AWTEvent.KEY_EVENT_MASK);
+  }
+
+  /**
+   * Remove the specified key listener so
+   * that it no longer receives key events from this component.
+   *
+   * @param listener  the key listener
+   */
+  @Override
+  public synchronized void removeKeyListener(KeyListener listener) {
+    keyListener = AWTEventMulticaster.remove(keyListener, listener);
+  }
+
+  /**
+   * Add the specified focus listener to receive focus events
+   * from this component when it gains input focus.
+   *
+   * @param listener  the focus listener
+   */
+  @Override
+  public synchronized void addFocusListener(FocusListener listener) {
+    focusListener = AWTEventMulticaster.add(focusListener, listener);
+    enableEvents(AWTEvent.FOCUS_EVENT_MASK);
+  }
+
+  /**
+   * Remove the specified focus listener so
+   * that it no longer receives focus events from this component.
+   *
+   * @param listener  the focus listener
+   */
+  @Override
+  public synchronized void removeFocusListener(FocusListener listener) {
+    focusListener = AWTEventMulticaster.remove(focusListener, listener);
+  }
+
+  @Override
+  protected void processEvent(AWTEvent awtevent) {
+
+    if (awtevent instanceof FocusEvent) {
+      processFocusEvent((FocusEvent)awtevent);
+    } else if (awtevent instanceof ItemEvent) {
+      processItemEvent((ItemEvent)awtevent);
+    } else if (awtevent instanceof KeyEvent) {
+      processKeyEvent((KeyEvent)awtevent);
+    } else if (awtevent instanceof MouseEvent) {
+      switch (awtevent.getID()) {
+      case MouseEvent.MOUSE_CLICKED:
+      case MouseEvent.MOUSE_PRESSED:
+      case MouseEvent.MOUSE_RELEASED:
+      case MouseEvent.MOUSE_ENTERED:
+      case MouseEvent.MOUSE_EXITED:
+    processMouseEvent((MouseEvent)awtevent);
+    break;
+
+      case MouseEvent.MOUSE_MOVED:
+      case MouseEvent.MOUSE_DRAGGED:
+    super.processEvent((MouseEvent)awtevent);
+    break;
+      }
+    } else {
+      if (awtevent instanceof ComponentEvent)
+    super.processComponentEvent((ComponentEvent)awtevent);
+      else
+    super.processEvent(awtevent);
+    }
+  }
+
+  protected void processItemEvent(ItemEvent itemevent) {
+    if (itemListener != null) {
+      itemListener.itemStateChanged(itemevent);
+    }
+  }
+
+  @Override
+  protected void processFocusEvent(FocusEvent e) {
+    switch (e.getID()) {
+    case FocusEvent.FOCUS_GAINED:
+      if (focusListener != null) { focusListener.focusGained(e); }
+      if (getSelectedIndex() == -1) { setSelectedIndex(0); }
+      focusEnabled = true;
+      repaint();
+      break;
+    case FocusEvent.FOCUS_LOST:
+      if (focusListener != null) {
+        focusListener.focusLost(e);
+      }
+      focusEnabled = false;
+      repaint();
+      break;
+    }
+    super.processFocusEvent(e);
+  }
+
+  @Override
+  protected void processKeyEvent(KeyEvent e) {
+    rows = getItemCount();
+
+    switch (e.getID()) {
+
+    case KeyEvent.KEY_TYPED:
+      if (keyListener != null) {
+        keyListener.keyTyped(e);
+      }
+      break;
+
+    case KeyEvent.KEY_PRESSED:
+      if (keyListener != null) {
+        keyListener.keyPressed(e);
+      }
+      if (e.getKeyCode() == KeyEvent.VK_DOWN) {
+        prevfocusIndex = focusIndex;
+        int index = getSelectedIndex() + 1;
+        if (index > rows) { break; }
+        setSelectedIndex(index);
+        processItemEvent(new ItemEvent(this, 0, index, 0));
+        eventOccurred = true;
+        repaint();
+      } else if (e.getKeyCode() == KeyEvent.VK_UP) {
+        int index = getSelectedIndex()-1;
+        if (index >= 0) {
+          setSelectedIndex(index);
+          if (e.getID() != 400) {
+            processItemEvent(new ItemEvent(this, 0, index, 0));
+          }
+          eventOccurred = true;
+          repaint();
+        }
+      }
+      break;
+
+    case KeyEvent.KEY_RELEASED:
+      if (keyListener != null) {
+        keyListener.keyReleased(e);
+      }
+      if (e.getKeyCode() == KeyEvent.VK_ENTER) {
+        eventOccurred = true;
+
+        // ActionEvent is fired here
+        if (actionListener != null) {
+          actionListener.actionPerformed( new ActionEvent(
+              this, ActionEvent.ACTION_PERFORMED, null));
+        }
+        repaint();
+      }
+      break;
+    } // switch
+    super.processKeyEvent(e);
+  }
+
+  @Override
+  protected void processMouseEvent(MouseEvent e) {
+    switch (e.getID()) {
+    case MouseEvent.MOUSE_PRESSED:
+      pressed = true;
+      if (contains(e.getPoint())) {
+        findSelectedIndex(e.getPoint());
+        processItemEvent(new ItemEvent(this, 0, focusIndex, 0));
+        eventOccurred = true;
+      }
+      repaint();
+      break;
+
+    case MouseEvent.MOUSE_RELEASED:
+      if (pressed) { requestFocus(); }
+
+      if (contains(e.getPoint())) {
+        findSelectedIndex(e.getPoint());
+        eventOccurred = true;
+      }
+      // ActionEvent is fired here
+      if (actionListener != null) {
+        actionListener.actionPerformed(new ActionEvent(
+            this, ActionEvent.ACTION_PERFORMED, null));
+      }
+
+      if (pressed) {
+        pressed = false;
+        repaint();
+      }
+      break;
+    }
+    super.processMouseEvent(e);
+  }
+
+  @Override
+  /**
+   * Paint the list.
+   *
+   * @param g  the graphics context to be used for testing
+   */
+  public void paint(Graphics g) {
+    super.paint(g);
+    restrictGraphicsToClientArea(g);
+
+    Point     loc = getClientLocation();
+    Dimension dim = getClientSize();
+    Color prevColor = g.getColor();
+
+    // List border is drawn here
+    g.setColor(getBackground());
+    g.fillRect(0, 0, dim.width - 2, dim.height - 2);
+    g.setColor(getBorder());
+    g.drawRect(0, 0, dim.width - 2, dim.height - 2);
+
+    if (getItemCount() > 0) {
+      Font f = getFont();
+      if (f != null) {
+        String str[] = getItems();
+        FontMetrics fm = getFontMetrics(f);
+        int drawRow = loc.x + getBorderWidth() + fm.getAscent();
+        int drawCol = loc.y + getBorderWidth();
+        int rectRow = loc.y + getBorderWidth();
+        int i = 0;
+
+        // Draw items (if the items exceeds visibility those items will be truncated
+        // as scrollbar support is not enabled
+
+        for (;
+             i < str.length && drawRow < (dim.height - getBorderWidth());
+             i++) {
+               if (fm.stringWidth(str[i]) < (dim.width - (getBorderWidth() * 2))) {
+                 drawItem(g, i, drawCol, drawRow, rectRow, fm);
+                 drawRow += fm.getHeight();
+                 rectRow += fm.getHeight();
+               } else {
+                 LWComponent.errorMsg("string width exceeds list width");
+                 LWComponent.errorMsg("Horizontal scrollbar support is not available");
+               }
+            } // for
+
+        if ( (drawRow > (dim.height - getBorderWidth())) && (str.length > i) ) {
+          //LWComponent.errorMsg("no of strings exceeds list height");
+          //LWComponent.errorMsg("Vertical scrollbar support is not available");
+        }
+      } else { LWComponent.errorMsg("Font not available.."); }
+    }
+
+    eventOccurred = false;
+    g.setColor(prevColor);
+    unrestrictGraphicsFromClientArea(g);
+  }
+
+  // Draw String items
+  private void drawItem(Graphics g, int listIndex, int drawCol,
+      int drawRow, int rectRow, FontMetrics fm) {
+    Point     loc = getClientLocation();
+    Dimension dim = getClientSize();
+    String    str = getItem(listIndex);
+    if (multipleMode) {
+      for (int i1 = 0; i1 < selList.size(); i1++) {
+        if (listIndex == ((Integer)selList.elementAt(i1))) {
+          g.setColor(getFocusColor());
+          g.fillRect(loc.x + getBorderWidth(),
+                     rectRow,
+                     dim.width - getBorderWidth() * 2,
+                     fm.getHeight());
+          g.setColor(getFocusEnabledColor());
+          g.drawRect(loc.x + getBorderWidth(),
+                     rectRow,
+                     dim.width - getBorderWidth() * 2,
+                     fm.getHeight());
+        }
+      } // for
+    } else {
+      if (listIndex == getSelectedIndex() && !multipleMode) {
+        g.setColor(getFocusColor());
+        g.fillRect(loc.x + getBorderWidth(),
+                   rectRow,
+                   dim.width - getBorderWidth() * 2,
+                   fm.getHeight());
+        g.setColor(getFocusForeColor());
+      }
+      if ((listIndex == prevfocusIndex) && (prevfocusIndex != getSelectedIndex()) && !multipleMode) {
+        g.setColor(getBackground());
+        g.fillRect(loc.x + getBorderWidth(),
+                   rectRow,
+                   dim.width - getBorderWidth() * 2,
+                   fm.getHeight());
+        prevfocusIndex = getSelectedIndex();
+      }
+      if (focusEnabled && listIndex == getSelectedIndex() && !multipleMode) {
+        g.setColor(getFocusEnabledColor());
+        g.drawRect(loc.x + getBorderWidth(),
+                   rectRow,
+                   dim.width - getBorderWidth() * 2,
+                   fm.getHeight());
+      }
+    }
+    g.setColor(getForeground());
+    g.drawString(str,drawCol,drawRow);
+  }
+
+}
+
--- a/jdk/test/java/lang/Integer/ParsingTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/Integer/ParsingTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,29 +23,37 @@
 
 /*
  * @test
- * @bug 5017980 6576055
+ * @bug 5017980 6576055 8041972
  * @summary Test parsing methods
  * @author Joseph D. Darcy
  */
 
+import java.lang.IllegalArgumentException;
+import java.lang.IndexOutOfBoundsException;
+import java.lang.NullPointerException;
+import java.lang.RuntimeException;
 
 /**
- * There are six methods in java.lang.Integer which transform strings
+ * There are eight methods in java.lang.Integer which transform strings
  * into an int or Integer value:
  *
  * public Integer(String s)
  * public static Integer decode(String nm)
+ * public static int parseInt(CharSequence s, int radix, int beginIndex, int endIndex)
+ * public static int parseInt(CharSequence s, int radix, int beginIndex)
  * public static int parseInt(String s, int radix)
  * public static int parseInt(String s)
  * public static Integer valueOf(String s, int radix)
  * public static Integer valueOf(String s)
  *
  * Besides decode, all the methods and constructor call down into
- * parseInt(String, int) to do the actual work.  Therefore, the
- * behavior of parseInt(String, int) will be tested here.
+ * parseInt(CharSequence, int, int, int) to do the actual work.  Therefore, the
+ * behavior of parseInt(CharSequence, int, int, int) will be tested here.
+ *
  */
 
 public class ParsingTest {
+
     public static void main(String... argv) {
         check("+100", +100);
         check("-100", -100);
@@ -55,10 +63,14 @@
         check("+00000", 0);
         check("-00000", 0);
 
+        check("+00000", 0, 0, 6);
+        check("-00000", 0, 0, 6);
+
         check("0", 0);
         check("1", 1);
         check("9", 9);
 
+        checkFailure("");
         checkFailure("\u0000");
         checkFailure("\u002f");
         checkFailure("+");
@@ -72,12 +84,45 @@
         checkFailure("+-6");
         checkFailure("-+6");
         checkFailure("*100");
+
+        check("test-00000", 0, 4, 10);
+        check("test-12345", -12345, 4, 10);
+        check("xx12345yy", 12345, 2, 7);
+
+        checkNumberFormatException("", 10, 0);
+        checkNumberFormatException("100", 10, 3);
+        checkNumberFormatException("+1000000", 10, 8);
+        checkNumberFormatException("-1000000", 10, 8);
+
+        checkNumberFormatException("", 10, 0, 0);
+        checkNumberFormatException("+-6", 10, 0, 3);
+        checkNumberFormatException("1000000", 10, 7);
+        checkNumberFormatException("1000000", 10, 7, 7);
+        checkNumberFormatException("1000000", Character.MAX_RADIX + 1, 0, 2);
+        checkNumberFormatException("1000000", Character.MIN_RADIX - 1, 0, 2);
+
+        checkIndexOutOfBoundsException("1000000", 10, 8);
+        checkIndexOutOfBoundsException("1000000", 10, -1);
+        checkIndexOutOfBoundsException("1000000", 10, 10, 4);
+        checkIndexOutOfBoundsException("1000000", Character.MAX_RADIX + 1, -1, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MIN_RADIX - 1, -1, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MAX_RADIX + 1, 10, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MIN_RADIX - 1, 10, 2);
+        checkIndexOutOfBoundsException("-1", 10, 0, 3);
+        checkIndexOutOfBoundsException("-1", 10, 2, 3);
+        checkIndexOutOfBoundsException("-1", 10, -1, 2);
+
+        checkNull(10, 0, 1);
+        checkNull(10, -1, 0);
+        checkNull(10, 0, 0);
+        checkNull(10, 0, -1);
+        checkNull(-1, -1, -1);
     }
 
     private static void check(String val, int expected) {
         int n = Integer.parseInt(val);
         if (n != expected)
-            throw new RuntimeException("Integer.parsedInt failed. String:" +
+            throw new RuntimeException("Integer.parseInt failed. String:" +
                                                 val + " Result:" + n);
     }
 
@@ -91,4 +136,71 @@
             ; // Expected
         }
     }
+
+    private static void checkNumberFormatException(String val, int radix, int start) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NumberFormatException nfe) {
+            ; // Expected
+        }
+    }
+
+    private static void checkNumberFormatException(String val, int radix, int start, int end) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start, end);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NumberFormatException nfe) {
+            ; // Expected
+        }
+    }
+
+    private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (IndexOutOfBoundsException ioob) {
+            ; // Expected
+        }
+    }
+
+    private static void checkIndexOutOfBoundsException(String val, int radix, int start, int end) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start, end);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (IndexOutOfBoundsException ioob) {
+            ; // Expected
+        }
+    }
+
+    private static void checkNull(int radix, int start, int end) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(null, 10, start, end);
+            System.err.println("parseInt(null, " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NullPointerException npe) {
+            ; // Expected
+        }
+    }
+
+    private static void check(String val, int expected, int start, int end) {
+        int n = Integer.parseInt(val, 10, start, end);
+        if (n != expected)
+            throw new RuntimeException("Integer.parsedInt failed. String:" +
+                    val + ", start: " + start + ", end: " + end + " Result:" + n);
+    }
 }
--- a/jdk/test/java/lang/Long/ParsingTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/Long/ParsingTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,29 +23,31 @@
 
 /*
  * @test
- * @bug 5017980 6576055
+ * @bug 5017980 6576055 8041972
  * @summary Test parsing methods
  * @author Joseph D. Darcy
  */
 
-
 /**
- * There are six methods in java.lang.Long which transform strings
+ * There are eight methods in java.lang.Long which transform strings
  * into a long or Long value:
  *
  * public Long(String s)
  * public static Long decode(String nm)
+ * public static long parseLong(CharSequence s, int radix, int beginIndex, int endIndex)
+ * public static long parseLong(CharSequence s, int radix, int beginIndex)
  * public static long parseLong(String s, int radix)
  * public static long parseLong(String s)
  * public static Long valueOf(String s, int radix)
  * public static Long valueOf(String s)
  *
  * Besides decode, all the methods and constructor call down into
- * parseLong(String, int) to do the actual work.  Therefore, the
- * behavior of parseLong(String, int) will be tested here.
+ * parseLong(CharSequence, int, int, int) to do the actual work.  Therefore, the
+ * behavior of parseLong(CharSequence, int, int, int) will be tested here.
  */
 
 public class ParsingTest {
+
     public static void main(String... argv) {
         check("+100", +100L);
         check("-100", -100L);
@@ -59,6 +61,7 @@
         check("1", 1L);
         check("9", 9L);
 
+        checkFailure("");
         checkFailure("\u0000");
         checkFailure("\u002f");
         checkFailure("+");
@@ -72,12 +75,44 @@
         checkFailure("+-6");
         checkFailure("-+6");
         checkFailure("*100");
+
+        check("test-00000", 0L, 4, 10);
+        check("test-12345", -12345L, 4, 10);
+        check("xx12345yy", 12345L, 2, 7);
+        check("xx123456789012345yy", 123456789012345L, 2, 17);
+
+        checkNumberFormatException("100", 10, 3);
+        checkNumberFormatException("", 10, 0);
+        checkNumberFormatException("+1000000", 10, 8);
+        checkNumberFormatException("-1000000", 10, 8);
+
+        checkNumberFormatException("", 10, 0, 0);
+        checkNumberFormatException("+-6", 10, 0, 3);
+        checkNumberFormatException("1000000", 10, 7, 7);
+        checkNumberFormatException("1000000", Character.MAX_RADIX + 1, 0, 2);
+        checkNumberFormatException("1000000", Character.MIN_RADIX - 1, 0, 2);
+
+        checkIndexOutOfBoundsException("", 10, 1, 1);
+        checkIndexOutOfBoundsException("1000000", 10, 10, 4);
+        checkIndexOutOfBoundsException("1000000", Character.MAX_RADIX + 1, 10, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MIN_RADIX - 1, 10, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MAX_RADIX + 1, -1, 2);
+        checkIndexOutOfBoundsException("1000000", Character.MIN_RADIX - 1, -1, 2);
+        checkIndexOutOfBoundsException("-1", 10, 0, 3);
+        checkIndexOutOfBoundsException("-1", 10, 2, 3);
+        checkIndexOutOfBoundsException("-1", 10, -1, 2);
+
+        checkNull(10, 0, 1);
+        checkNull(10, -1, 0);
+        checkNull(10, 0, 0);
+        checkNull(10, 0, -1);
+        checkNull(-1, -1, -1);
     }
 
     private static void check(String val, long expected) {
         long n = Long.parseLong(val);
         if (n != expected)
-            throw new RuntimeException("Long.parsedLong failed. String:" +
+            throw new RuntimeException("Long.parseLong failed. String:" +
                                        val + " Result:" + n);
     }
 
@@ -91,4 +126,71 @@
             ; // Expected
         }
     }
+
+    private static void checkNumberFormatException(String val, int radix, int start) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NumberFormatException nfe) {
+            ; // Expected
+        }
+    }
+
+    private static void checkNumberFormatException(String val, int radix, int start, int end) {
+        long n = 0;
+        try {
+            n = Long.parseLong(val, radix, start, end);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NumberFormatException nfe) {
+            ; // Expected
+        }
+    }
+
+    private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
+        int n = 0;
+        try {
+            n = Integer.parseInt(val, radix, start);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (IndexOutOfBoundsException ioob) {
+            ; // Expected
+        }
+    }
+
+    private static void checkIndexOutOfBoundsException(String val, int radix, int start, int end) {
+        long n = 0;
+        try {
+            n = Long.parseLong(val, radix, start, end);
+            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (IndexOutOfBoundsException ioob) {
+            ; // Expected
+        }
+    }
+
+    private static void checkNull(int radix, int start, int end) {
+        long n = 0;
+        try {
+            n = Long.parseLong(null, 10, start, end);
+            System.err.println("parseInt(null, " + radix + ", " + start + ", " + end +
+                    ") incorrectly returned " + n);
+            throw new RuntimeException();
+        } catch (NullPointerException npe) {
+            ; // Expected
+        }
+    }
+
+    private static void check(String val, long expected, int start, int end) {
+        long n = Long.parseLong(val, 10, start, end);
+        if (n != expected)
+            throw new RuntimeException("Long.parseLong failed. String:" +
+                    val + ", start: " + start + ", end: " + end + " Result:" + n);
+    }
 }
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2269,9 +2269,9 @@
                 fail("Test failed: Process exited prematurely");
             }
             long end = System.nanoTime();
-            // give waitFor(timeout) a wide berth (100ms)
+            // give waitFor(timeout) a wide berth (200ms)
             // Old AIX machines my need a little longer.
-            if ((end - start) > 100000000L * (AIX.is() ? 4 : 1))
+            if ((end - start) > 200000000L * (AIX.is() ? 2 : 1))
                 fail("Test failed: waitFor took too long (" + (end - start) + "ns)");
 
             p.destroy();
--- a/jdk/test/java/lang/String/ToLowerCase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/String/ToLowerCase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
     @test
-    @bug 4217441 4533872 4900935 8020037 8032012 8041791
+    @bug 4217441 4533872 4900935 8020037 8032012 8041791 8042589
     @summary toLowerCase should lower-case Greek Sigma correctly depending
              on the context (final/non-final).  Also it should handle
              Locale specific (lt, tr, and az) lowercasings and supplementary
@@ -106,6 +106,12 @@
         // invalid code point tests:
         test("\uD800\uD800\uD801A\uDC00\uDC00\uDC00B", Locale.US, "\uD800\uD800\uD801a\uDC00\uDC00\uDC00b");
 
+        // lower/uppercase + surrogates
+        test("a\uD801\uDC1c", Locale.ROOT, "a\uD801\uDC44");
+        test("A\uD801\uDC1c", Locale.ROOT, "a\uD801\uDC44");
+        test("a\uD801\uDC00\uD801\uDC01\uD801\uDC02", Locale.US, "a\uD801\uDC28\uD801\uDC29\uD801\uDC2A");
+        test("A\uD801\uDC00\uD801\uDC01\uD801\uDC02", Locale.US, "a\uD801\uDC28\uD801\uDC29\uD801\uDC2A");
+
         // test bmp + supp1
         StringBuilder src = new StringBuilder(0x20000);
         StringBuilder exp = new StringBuilder(0x20000);
--- a/jdk/test/java/lang/String/ToUpperCase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/String/ToUpperCase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
     @test
-    @bug 4219630 4304573 4533872 4900935
+    @bug 4219630 4304573 4533872 4900935 8042589
     @summary toUpperCase should upper-case German sharp s correctly even if
              it's the only character in the string. should also uppercase
              all of the 1:M char mappings correctly.  Also it should handle
@@ -91,6 +91,12 @@
         test("\uD801\uDC28a\uD801\uDC29b\uD801\uDC2Ac", Locale.US, "\uD801\uDC00A\uD801\uDC01B\uD801\uDC02C");
         // invalid code point tests:
         test("\uD800\uD800\uD801a\uDC00\uDC00\uDC00b", Locale.US, "\uD800\uD800\uD801A\uDC00\uDC00\uDC00B");
+
+        // lower/uppercase + surrogates
+        test("a\uD801\uDC44", Locale.ROOT, "A\uD801\uDC1c");
+        test("A\uD801\uDC44", Locale.ROOT, "A\uD801\uDC1c");
+        test("a\uD801\uDC28\uD801\uDC29\uD801\uDC2A", Locale.US, "A\uD801\uDC00\uD801\uDC01\uD801\uDC02");
+        test("A\uD801\uDC28a\uD801\uDC29b\uD801\uDC2Ac", Locale.US, "A\uD801\uDC00A\uD801\uDC01B\uD801\uDC02C");
     }
 
     static void test(String in, Locale locale, String expected) {
--- a/jdk/test/java/lang/reflect/Modifier/toStringTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/lang/reflect/Modifier/toStringTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -23,11 +23,11 @@
 
 /**
  * @test
- * @bug 4394937
+ * @bug 4394937 8051382
  * @summary tests the toString method of reflect.Modifier
  */
 
-import java.lang.reflect.*;
+import java.lang.reflect.Modifier;
 
 public class toStringTest {
 
--- a/jdk/test/java/net/MulticastSocket/TestInterfaces.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/net/MulticastSocket/TestInterfaces.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,6 +28,8 @@
  *          same InetAddress set by MulticastSocket.setInterface
  */
 import java.net.*;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.io.IOException;
 
@@ -47,6 +49,7 @@
             /*
              * Test MulticastSocket.getInterface
              */
+            System.out.println("Testing network interface " + ni);
             Enumeration addrs = ni.getInetAddresses();
             while (addrs.hasMoreElements()) {
                 InetAddress ia = (InetAddress)addrs.nextElement();
@@ -64,6 +67,8 @@
 
                 InetAddress curr = soc.getInterface();
                 if (!curr.equals(ia)) {
+                    System.err.println("NetworkInterface under test " + ni);
+                    displayInterfaceInformation(ni);
                     System.err.println("MulticastSocket.getInterface returned: " + curr);
                     System.err.println("Failed! Expected: " + ia);
                     failures++;
@@ -96,6 +101,10 @@
             if (!curr.equals(ni)) {
                 System.err.println("MulticastSocket.getNetworkInterface returned: " + curr);
                 System.err.println("Failed! Expected: " + ni);
+                System.err.println("NetworkInterface details for curr variable ");
+                displayInterfaceInformation(curr);
+                System.err.println("NetworkInterface details for ni variable ");
+                displayInterfaceInformation(ni) ;
                 failures++;
             } else {
                 System.out.println("Passed.");
@@ -110,4 +119,23 @@
 
     }
 
+    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
+        System.err.println("Display name: " + netint.getDisplayName());
+        System.err.println("Name: " + netint.getName());
+        Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
+
+        for (InetAddress inetAddress : Collections.list(inetAddresses))
+            System.err.println("InetAddress: " + inetAddress);
+
+        System.err.println("Up? " + netint.isUp());
+        System.err.println("Loopback? " + netint.isLoopback());
+        System.err.println("PointToPoint? " + netint.isPointToPoint());
+        System.err.println("Supports multicast? " + netint.supportsMulticast());
+        System.err.println("Virtual? " + netint.isVirtual());
+        System.err.println("Hardware address: " +
+                Arrays.toString(netint.getHardwareAddress()));
+        System.err.println("MTU: " + netint.getMTU());
+        System.err.println("Index: " + netint.getIndex());
+        System.err.println();
+    }
 }
--- a/jdk/test/java/util/Collections/CheckedListReplaceAll.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/util/Collections/CheckedListReplaceAll.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     8047795
+ * @bug     8047795 8053938
  * @summary Ensure that replaceAll operator cannot add bad elements
  * @author  Mike Duigou
  */
@@ -46,5 +46,16 @@
             thwarted.printStackTrace(System.out);
             System.out.println("Curses! Foiled again!");
         }
+
+        unwrapped = Arrays.asList(new Object[]{});  // Empty list
+        wrapped = Collections.checkedList(unwrapped, Integer.class);
+        try {
+            wrapped.replaceAll((UnaryOperator)null);
+            System.out.printf("Bwahaha! I have defeated you! %s\n", wrapped);
+            throw new RuntimeException("NPE not thrown when passed a null operator");
+        } catch (NullPointerException thwarted) {
+            thwarted.printStackTrace(System.out);
+            System.out.println("Curses! Foiled again!");
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Collections/SyncSubMutexes.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2014, 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 8048209
+ * @summary Check that Collections.synchronizedNavigableSet().tailSet() is using
+ * the same lock object as it's source.
+ * @run testng SyncSubMutexes
+ */
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.Set;
+import java.util.Arrays;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.DataProvider;
+import static org.testng.Assert.assertSame;
+
+public class SyncSubMutexes {
+
+    @Test(dataProvider = "Collections")
+    public void testCollections(Collection<String> instance) {
+        // nothing to test, no subset methods
+    }
+
+    @Test(dataProvider = "Lists")
+    public void testLists(List<String> instance) {
+         assertSame(getSyncCollectionMutex(instance.subList(0, 1)), getSyncCollectionMutex(instance));
+    }
+
+    @Test(dataProvider = "Sets")
+    public void testSets(Set<String> instance) {
+        // nothing to test, no subset methods
+
+    }
+
+    @Test(dataProvider = "SortedSets")
+    public void testSortedSets(SortedSet<String> instance) {
+         assertSame(getSyncCollectionMutex(instance.headSet("Echo")), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.tailSet("Charlie")), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.subSet("Charlie", "Echo")), getSyncCollectionMutex(instance));
+
+    }
+
+    @Test(dataProvider = "NavigableSets")
+    public void testNavigableSets(NavigableSet<String> instance) {
+         assertSame(getSyncCollectionMutex(instance.descendingSet()), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.headSet("Echo")), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.headSet("Echo", true)), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.tailSet("Charlie")), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.tailSet("Charlie", true)), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.subSet("Charlie", "Echo")), getSyncCollectionMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.subSet("Charlie", true, "Echo", true)), getSyncCollectionMutex(instance));
+    }
+
+    @Test(dataProvider = "Maps")
+    public void testMaps(Map<String, String> instance) {
+         assertSame(getSyncCollectionMutex(instance.entrySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.keySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.values()), getSyncMapMutex(instance));
+    }
+
+    @Test(dataProvider = "SortedMaps")
+    public void testSortedMaps(SortedMap<String, String> instance) {
+         assertSame(getSyncCollectionMutex(instance.entrySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.keySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.values()), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.headMap("Echo")), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.tailMap("Charlie")), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.subMap("Charlie", "Echo")), getSyncMapMutex(instance));
+    }
+
+    @Test(dataProvider = "NavigableMaps")
+    public void testNavigableMaps(NavigableMap<String, String> instance) {
+         assertSame(getSyncMapMutex(instance.descendingMap()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.entrySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.keySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.descendingKeySet()), getSyncMapMutex(instance));
+         assertSame(getSyncCollectionMutex(instance.values()), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.headMap("Echo")), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.headMap("Echo", true)), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.tailMap("Charlie")), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.tailMap("Charlie", true)), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.subMap("Charlie", true, "Echo", true)), getSyncMapMutex(instance));
+         assertSame(getSyncMapMutex(instance.subMap("Charlie", true, "Echo", true)), getSyncMapMutex(instance));
+    }
+
+    @DataProvider(name = "Collections", parallel = true)
+    public static Iterator<Object[]> collectionProvider() {
+        return makeCollections().iterator();
+    }
+
+    @DataProvider(name = "Lists", parallel = true)
+    public static Iterator<Object[]> listProvider() {
+        return makeLists().iterator();
+    }
+
+    @DataProvider(name = "Sets", parallel = true)
+    public static Iterator<Object[]> setProvider() {
+        return makeSets().iterator();
+    }
+
+    @DataProvider(name = "SortedSets", parallel = true)
+    public static Iterator<Object[]> sortedsetProvider() {
+        return makeSortedSets().iterator();
+    }
+
+    @DataProvider(name = "NavigableSets", parallel = true)
+    public static Iterator<Object[]> navigablesetProvider() {
+        return makeNavigableSets().iterator();
+    }
+
+    @DataProvider(name = "Maps", parallel = true)
+    public static Iterator<Object[]> mapProvider() {
+        return makeMaps().iterator();
+    }
+
+    @DataProvider(name = "SortedMaps", parallel = true)
+    public static Iterator<Object[]> sortedmapProvider() {
+        return makeSortedMaps().iterator();
+    }
+
+    @DataProvider(name = "NavigableMaps", parallel = true)
+    public static Iterator<Object[]> navigablemapProvider() {
+        return makeNavigableMaps().iterator();
+    }
+
+    private static final Collection<String> BASE_COLLECTION = Collections.unmodifiableCollection(
+            Arrays.asList("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf")
+    );
+    private static final Map<String, String> BASE_MAP;
+
+    static {
+        Map<String, String> map = new HashMap<>();
+        for(String each : BASE_COLLECTION) {
+            map.put(each, "*" + each + "*");
+        }
+        BASE_MAP = Collections.unmodifiableMap(map);
+    }
+
+    public static Collection<Object[]> makeCollections() {
+        Collection<Object[]> instances = new ArrayList<>();
+        instances.add(new Object[] {Collections.synchronizedCollection(new ArrayList<>(BASE_COLLECTION))});
+        instances.addAll(makeLists());
+
+        return instances;
+    }
+
+    public static Collection<Object[]> makeLists() {
+        Collection<Object[]> instances = new ArrayList<>();
+        instances.add(new Object[] {Collections.synchronizedList(new ArrayList<>(BASE_COLLECTION))});
+        instances.add(new Object[] {Collections.synchronizedList(new ArrayList<>(BASE_COLLECTION)).subList(1, 2)});
+
+        return instances;
+    }
+
+     public static Collection<Object[]> makeSets() {
+        Collection<Object[]> instances = new ArrayList<>();
+
+        instances.add(new Object[] {Collections.synchronizedSet(new TreeSet<>(BASE_COLLECTION))});
+        instances.addAll(makeSortedSets());
+        return instances;
+     }
+
+    public static Collection<Object[]> makeSortedSets() {
+        Collection<Object[]> instances = new ArrayList<>();
+        instances.add(new Object[] {Collections.synchronizedSortedSet(new TreeSet<>(BASE_COLLECTION))});
+        instances.add(new Object[] {Collections.synchronizedSortedSet(new TreeSet<>(BASE_COLLECTION)).headSet("Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedSortedSet(new TreeSet<>(BASE_COLLECTION)).tailSet("Bravo")});
+        instances.add(new Object[] {Collections.synchronizedSortedSet(new TreeSet<>(BASE_COLLECTION)).subSet("Bravo", "Foxtrot")});
+        instances.addAll(makeNavigableSets());
+
+        return instances;
+     }
+
+    public static Collection<Object[]> makeNavigableSets() {
+        Collection<Object[]> instances = new ArrayList<>();
+
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION))});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).descendingSet().descendingSet()});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).headSet("Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).headSet("Foxtrot", true)});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).tailSet("Bravo")});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).tailSet("Bravo", true)});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).subSet("Bravo", "Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedNavigableSet(new TreeSet<>(BASE_COLLECTION)).subSet("Bravo", true, "Foxtrot", true)});
+
+        return instances;
+    }
+
+    public static Collection<Object[]> makeMaps() {
+        Collection<Object[]> instances = new ArrayList<>();
+
+        instances.add(new Object[] {Collections.synchronizedMap(new HashMap<>(BASE_MAP))});
+        instances.addAll(makeSortedMaps());
+
+        return instances;
+    }
+
+    public static Collection<Object[]> makeSortedMaps() {
+        Collection<Object[]> instances = new ArrayList<>();
+
+        instances.add(new Object[] {Collections.synchronizedSortedMap(new TreeMap<>(BASE_MAP))});
+        instances.add(new Object[] {Collections.synchronizedSortedMap(new TreeMap<>(BASE_MAP)).headMap("Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedSortedMap(new TreeMap<>(BASE_MAP)).tailMap("Bravo")});
+        instances.add(new Object[] {Collections.synchronizedSortedMap(new TreeMap<>(BASE_MAP)).subMap("Bravo", "Foxtrot")});
+        instances.addAll(makeNavigableMaps());
+
+        return instances;
+    }
+
+    public static Collection<Object[]> makeNavigableMaps() {
+        Collection<Object[]> instances = new ArrayList<>();
+
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP))});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP).descendingMap().descendingMap())});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).headMap("Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).headMap("Foxtrot", true)});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).tailMap("Bravo")});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).tailMap("Bravo", true)});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).subMap("Bravo", "Foxtrot")});
+        instances.add(new Object[] {Collections.synchronizedNavigableMap(new TreeMap<>(BASE_MAP)).subMap("Bravo", true, "Foxtrot", true)});
+
+        return instances;
+    }
+
+    private static Object getSyncCollectionMutex(Collection<?> from) {
+        try {
+            Class<?> synchronizedCollectionClazz = Class.forName("java.util.Collections$SynchronizedCollection");
+            Field f = synchronizedCollectionClazz.getDeclaredField("mutex");
+            f.setAccessible(true);
+            return f.get(from);
+        } catch ( ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
+            throw new RuntimeException("Unable to get mutex field.", e);
+        }
+    }
+
+    private static Object getSyncMapMutex(Map<?,?> from) {
+        try {
+            Class<?> synchronizedMapClazz = Class.forName("java.util.Collections$SynchronizedMap");
+            Field f = synchronizedMapClazz.getDeclaredField("mutex");
+            f.setAccessible(true);
+            return f.get(from);
+        } catch ( ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
+            throw new RuntimeException("Unable to get mutex field.", e);
+        }
+    }
+
+}
--- a/jdk/test/java/util/UUID/UUIDTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/java/util/UUID/UUIDTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -96,6 +96,23 @@
             if (!u1.equals(u2))
                 throw new Exception("UUID -> string -> UUID failed");
         }
+
+        testFromStringError("-0");
+        testFromStringError("x");
+        testFromStringError("----");
+        testFromStringError("-0-0-0-0");
+        testFromStringError("0-0-0-0-");
+        testFromStringError("0-0-0-0-0-");
+        testFromStringError("0-0-0-0-x");
+    }
+
+    private static void testFromStringError(String str) {
+        try {
+            UUID test = UUID.fromString(str);
+            throw new RuntimeException("Should have thrown IAE");
+        } catch (IllegalArgumentException iae) {
+            // pass
+        }
     }
 
     private static void versionTest() throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/PngDitDepthTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2014, 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 4991647
+* @summary PNGMetadata.getAsTree() sets bitDepth to invalid value
+* @run main PngDitDepthTest
+*/
+
+import org.w3c.dom.Node;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+import java.awt.image.ColorModel;
+import java.awt.image.SampleModel;
+import java.util.Iterator;
+
+public class PngDitDepthTest {
+
+    public static void main(String[] args) throws IIOInvalidTreeException {
+
+        // getting the writer for the png format
+        Iterator iter = ImageIO.getImageWritersByFormatName("png");
+        ImageWriter writer = (ImageWriter) iter.next();
+
+        // creating a color model
+        ColorModel colorModel = ColorModel.getRGBdefault();
+
+        // creating a sample model
+        SampleModel sampleModel = colorModel.createCompatibleSampleModel(640, 480);
+
+        // creating a default metadata object
+        IIOMetadata metaData = writer.getDefaultImageMetadata(new ImageTypeSpecifier(colorModel, sampleModel), null);
+        String formatName = metaData.getNativeMetadataFormatName();
+
+        // first call
+        Node metaDataNode = metaData.getAsTree(formatName);
+        try {
+            metaData.setFromTree(formatName, metaDataNode);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+
+        // second call (bitdepht is already set to an invalid value)
+        metaDataNode = metaData.getAsTree(formatName);
+
+        metaData.setFromTree(formatName, metaDataNode);
+
+    }
+}
--- a/jdk/test/javax/management/monitor/StartStopTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/javax/management/monitor/StartStopTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -213,6 +213,6 @@
     }
 
     private static void doSleep(long ms) throws Exception {
-        Thread.sleep(Math.round(ms * Utils.TIMEOUT_FACTOR));
+        Thread.sleep(Utils.adjustTimeout(ms));
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/naming/InitialContext/AppletIsNotUsed.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014, 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 javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.naming.NoInitialContextException;
+import java.util.Hashtable;
+
+/*
+ * @test
+ * @bug 8051422
+ * @summary Make sure java.applet.Applet is not used as a source of
+ *          configuration parameters for an InitialContext
+ */
+public class AppletIsNotUsed {
+
+    @SuppressWarnings("deprecation")
+    public static void main(String[] args) throws NamingException {
+
+        testWith(Context.APPLET);
+        testWith("java.naming.applet");
+
+    }
+
+    private static void testWith(String appletProperty) throws NamingException {
+        Hashtable<Object, Object> env = new Hashtable<>();
+        // Deliberately put java.lang.Object rather than java.applet.Applet
+        // if an applet was used we would see a ClassCastException down there
+        env.put(appletProperty, new Object());
+        // It's ok to instantiate InitialContext with no parameters
+        // and be unaware of it right until you try to use it
+        Context ctx = new InitialContext(env);
+        boolean threw = true;
+        try {
+            ctx.lookup("whatever");
+            threw = false;
+        } catch (NoInitialContextException e) {
+            String m = e.getMessage();
+            if (m == null || m.contains("applet"))
+                throw new RuntimeException("The exception message is incorrect", e);
+        } catch (Throwable t) {
+            throw new RuntimeException(
+                    "The test was supposed to catch NoInitialContextException" +
+                            " here, but caught: " + t.getClass().getName(), t);
+        } finally {
+            ctx.close();
+        }
+
+        if (!threw)
+            throw new RuntimeException("The test was supposed to catch NoInitialContextException here");
+    }
+}
--- a/jdk/test/javax/naming/InitialContext/NoApplet.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/javax/naming/InitialContext/NoApplet.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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,12 +31,11 @@
 import java.util.Hashtable;
 
 public class NoApplet {
+    @SuppressWarnings("deprecation")
     public static void main(String[] args) throws NamingException {
-         Hashtable<Object,Object> env = new Hashtable<>();
-         env.put(Context.APPLET, new Object());
-         try {
-             Context ctxt = new InitialContext(env);
-             throw new RuntimeException("ClassCastException expected");
-         } catch (ClassCastException expected) { }
+        Hashtable<Object,Object> env = new Hashtable<>();
+        env.put(Context.APPLET, new Object());
+        Context ctxt = new InitialContext(env);
+        ctxt.close();
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSv12/ProtocolFilter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
+/*
+ * @test
+ * @bug 8052406
+ * @summary SSLv2Hello protocol may be filter out unexpectedly
+ * @run main/othervm ProtocolFilter
+ */
+
+import java.io.*;
+import java.net.*;
+import javax.net.ssl.*;
+
+public class ProtocolFilter {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = false;
+
+    /*
+     * Where do we find the keystores?
+     */
+    static String pathToStores = "../etc";
+    static String keyStoreFile = "keystore";
+    static String trustStoreFile = "truststore";
+    static String passwd = "passphrase";
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+
+    /*
+     * Turn on SSL debugging?
+     */
+    static boolean debug = false;
+
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide() throws Exception {
+        SSLServerSocketFactory sslssf =
+            (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+
+        // Only enable cipher suites for TLS v1.2.
+        sslServerSocket.setEnabledCipherSuites(
+            new String[]{"TLS_RSA_WITH_AES_128_CBC_SHA256"});
+
+        serverPort = sslServerSocket.getLocalPort();
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslIS.read();
+        sslOS.write(85);
+        sslOS.flush();
+
+        sslSocket.close();
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide() throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        SSLSocketFactory sslsf =
+            (SSLSocketFactory) SSLSocketFactory.getDefault();
+        SSLSocket sslSocket = (SSLSocket)
+            sslsf.createSocket("localhost", serverPort);
+
+        // Enable all supported protocols, including SSLv2Hello.
+        sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
+
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslOS.write(280);
+        sslOS.flush();
+        sslIS.read();
+
+        sslSocket.close();
+    }
+
+    /*
+     * =============================================================
+     * The remainder is just support stuff
+     */
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    public static void main(String[] args) throws Exception {
+        String keyFilename =
+            System.getProperty("test.src", ".") + "/" + pathToStores +
+                "/" + keyStoreFile;
+        String trustFilename =
+            System.getProperty("test.src", ".") + "/" + pathToStores +
+                "/" + trustStoreFile;
+
+        System.setProperty("javax.net.ssl.keyStore", keyFilename);
+        System.setProperty("javax.net.ssl.keyStorePassword", passwd);
+        System.setProperty("javax.net.ssl.trustStore", trustFilename);
+        System.setProperty("javax.net.ssl.trustStorePassword", passwd);
+
+        if (debug)
+            System.setProperty("javax.net.debug", "all");
+
+        /*
+         * Start the tests.
+         */
+        new ProtocolFilter();
+    }
+
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    ProtocolFilter() throws Exception {
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                startServer(true);
+                startClient(false);
+            } else {
+                startClient(true);
+                startServer(false);
+            }
+        } catch (Exception e) {
+            startException = e;
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            if (serverThread != null) {
+                serverThread.join();
+            }
+        } else {
+            if (clientThread != null) {
+                clientThread.join();
+            }
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         * Which side threw the error?
+         */
+        Exception local;
+        Exception remote;
+
+        if (separateServerThread) {
+            remote = serverException;
+            local = clientException;
+        } else {
+            remote = clientException;
+            local = serverException;
+        }
+
+        Exception exception = null;
+
+        /*
+         * Check various exception conditions.
+         */
+        if ((local != null) && (remote != null)) {
+            // If both failed, return the curthread's exception.
+            local.initCause(remote);
+            exception = local;
+        } else if (local != null) {
+            exception = local;
+        } else if (remote != null) {
+            exception = remote;
+        } else if (startException != null) {
+            exception = startException;
+        }
+
+        /*
+         * If there was an exception *AND* a startException,
+         * output it.
+         */
+        if (exception != null) {
+            if (exception != startException && startException != null) {
+                exception.addSuppressed(startException);
+            }
+            throw exception;
+        }
+
+        // Fall-through: no exception to throw!
+    }
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            try {
+                doServerSide();
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            try {
+                doClientSide();
+            } catch (Exception e) {
+                clientException = e;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/print/attribute/PrintResAttr.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, 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 8048328
+ * @summary CUPS Printing does not report supported printer resolutions.
+ * @run main PrintResAttr
+ */
+
+/*
+ * Since there is no guarantee you have any printers that support
+ * resolution this test can't verify that resolution is being
+ * reported when supported. But when they are it should test that
+ * the code behaves reasonably.
+ */
+import javax.print.*;
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+
+public class PrintResAttr {
+
+   public static void main(String args[]) throws Exception {
+
+      PrintService[] services =
+            PrintServiceLookup.lookupPrintServices(null,null);
+      for (int i=0; i<services.length; i++) {
+          if (services[i].isAttributeCategorySupported(PrinterResolution.class)) {
+              System.out.println("Testing " + services[i]);
+              PrinterResolution[] res = (PrinterResolution[])
+            services[i].getSupportedAttributeValues(PrinterResolution.class,
+                                                      null,null);
+              System.out.println("# supp res= " + res.length);
+              for (int r=0;r<res.length;r++) System.out.println(res[r]);
+          }
+      }
+   }
+}
--- a/jdk/test/javax/security/auth/kerberos/KerberosHashEqualsTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/javax/security/auth/kerberos/KerberosHashEqualsTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -33,9 +33,7 @@
 
 import java.net.InetAddress;
 import java.util.Date;
-import javax.security.auth.kerberos.KerberosKey;
-import javax.security.auth.kerberos.KerberosPrincipal;
-import javax.security.auth.kerberos.KerberosTicket;
+import javax.security.auth.kerberos.*;
 
 public class KerberosHashEqualsTest {
     public static void main(String[] args) throws Exception {
@@ -66,28 +64,67 @@
 
         k2.destroy();
         checkNotSame(k1, k2);
-
-        // destroyed keys doesn't equal to each other
         checkNotSame(k2, k1);
         checkSame(k2, k2);
 
+        k1.destroy();
+        checkNotSame(k1, k2);
+
+        // Destroyed key has string and hashCode
+        k1.toString(); k1.hashCode();
+
         // a little different
+        k1 = new KerberosKey(newKP("A"), "pass".getBytes(), 1, 1);
         k2 = new KerberosKey(newKP("B"), "pass".getBytes(), 1, 1);
         checkNotSame(k1, k2);
+
         k2 = new KerberosKey(newKP("A"), "ssap".getBytes(), 1, 1);
         checkNotSame(k1, k2);
+
         k2 = new KerberosKey(newKP("A"), "pass".getBytes(), 2, 1);
         checkNotSame(k1, k2);
+
         k2 = new KerberosKey(newKP("A"), "pass".getBytes(), 1, 2);
         checkNotSame(k1, k2);
 
+        // Null
         k1 = new KerberosKey(null, "pass".getBytes(), 1, 2);
         checkNotSame(k1, k2); // null to non-null
         k2 = new KerberosKey(null, "pass".getBytes(), 1, 2);
         checkSame(k1, k2);    // null to null
 
+        // Even key with null principal has a string and hashCode
+        k1.toString(); k1.hashCode();
+
         checkNotSame(k1, "Another Object");
 
+        EncryptionKey e1, e2;
+        e1 = new EncryptionKey("pass".getBytes(), 1);
+        e2 = new EncryptionKey("pass".getBytes(), 1);
+        checkSame(e1, e1);  // me to me
+        checkSame(e1, e2);  // same
+
+        e2.destroy();
+        checkNotSame(e1, e2);
+        checkNotSame(e2, e1);
+        checkSame(e2, e2);
+
+        e1.destroy();
+        checkNotSame(e1, e2);
+
+        // Destroyed key has string and hashCode
+        e1.toString(); e1.hashCode();
+
+        // a little different
+        e1 = new EncryptionKey("pass".getBytes(), 1);
+        e2 = new EncryptionKey("ssap".getBytes(), 1);
+        checkNotSame(e1, e2);
+
+        e2 = new EncryptionKey("pass".getBytes(), 2);
+        checkNotSame(e1, e2);
+
+        checkNotSame(e1, "Another Object");
+
         KerberosTicket t1, t2;
         t1 = new KerberosTicket("asn1".getBytes(), newKP("client"), newKP("server"), "pass".getBytes(), 1, new boolean[] {true, true}, new Date(0), new Date(0), new Date(0), new Date(0), null);
         t2 = new KerberosTicket("asn1".getBytes(), newKP("client"), newKP("server"), "pass".getBytes(), 1, new boolean[] {true, true}, new Date(0), new Date(0), new Date(0), new Date(0), null);
@@ -120,6 +157,7 @@
 
         t2.destroy();
         checkNotSame(t1, t2);
+        t2.hashCode(); t2.toString();
 
         // destroyed tickets doesn't equal to each other
         checkNotSame(t2, t1);
@@ -130,6 +168,37 @@
         checkNotSame(t1, t2);  // renewtill is useful
 
         checkNotSame(t1, "Another Object");
+
+        KerberosCredMessage m1, m2;
+        m1 = new KerberosCredMessage(newKP("C"), newKP("S"), "message".getBytes());
+        m2 = new KerberosCredMessage(newKP("C"), newKP("S"), "message".getBytes());
+        checkSame(m1, m1);  // me to me
+        checkSame(m1, m2);  // same
+
+        m2.destroy();
+        checkNotSame(m1, m2);
+        checkNotSame(m2, m1);
+        checkSame(m2, m2);
+
+        m1.destroy();
+        checkNotSame(m1, m2);
+
+        // Destroyed message has string and hashCode
+        m1.toString(); m1.hashCode();
+
+        // a little different
+        m1 = new KerberosCredMessage(newKP("C"), newKP("S"), "message".getBytes());
+        m2 = new KerberosCredMessage(newKP("A"), newKP("S"), "message".getBytes());
+        checkNotSame(m1, m2);
+
+        m2 = new KerberosCredMessage(newKP("C"), newKP("B"), "message".getBytes());
+        checkNotSame(m1, m2);
+
+        m1 = new KerberosCredMessage(newKP("C"), newKP("S"), "hello".getBytes());
+        checkNotSame(m1, m2);
+
+        checkNotSame(m1, "Another Object");
+
         System.out.println("Good!");
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/kerberos/KerberosNullsAndDestroyTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2014, 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 8043071
+ * @summary Expose session key and KRB_CRED through extended GSS-API
+ */
+
+import javax.security.auth.kerberos.*;
+import java.util.function.Supplier;
+
+public class KerberosNullsAndDestroyTest {
+
+    public static void main(String[] args) throws Exception {
+
+        KerberosPrincipal c = new KerberosPrincipal("me@HERE");
+        KerberosPrincipal s = new KerberosPrincipal("you@THERE");
+
+        // These object constructions should throw NullPointerException
+        checkNPE(() -> new KerberosKey(c, null, 17, 1));
+        checkNPE(() -> new EncryptionKey(null, 17));
+        checkNPE(() -> new KerberosCredMessage(null, s, new byte[1]));
+        checkNPE(() -> new KerberosCredMessage(c, null, new byte[1]));
+        checkNPE(() -> new KerberosCredMessage(c, s, null));
+
+        KerberosKey k1 = new KerberosKey(c, new byte[16], 17, 1);
+        EncryptionKey k2 = new EncryptionKey(new byte[16], 17);
+        KerberosCredMessage m = new KerberosCredMessage(c, s, new byte[1]);
+
+        // These get calls should throw IllegalStateException
+        k1.destroy();
+        checkISE(() -> k1.getAlgorithm());
+        checkISE(() -> k1.getEncoded());
+        checkISE(() -> k1.getFormat());
+        checkISE(() -> k1.getKeyType());
+        checkISE(() -> k1.getPrincipal());
+        checkISE(() -> k1.getVersionNumber());
+
+        k2.destroy();
+        checkISE(() -> k2.getAlgorithm());
+        checkISE(() -> k2.getEncoded());
+        checkISE(() -> k2.getFormat());
+        checkISE(() -> k2.getKeyType());
+
+        m.destroy();
+        checkISE(() -> m.getSender());
+        checkISE(() -> m.getRecipient());
+        checkISE(() -> m.getEncoded());
+    }
+
+    static void checkNPE(Supplier<?> f) throws Exception {
+        check(f, NullPointerException.class);
+    }
+
+    static void checkISE(Supplier<?> f) throws Exception {
+        check(f, IllegalStateException.class);
+    }
+
+    static void check(Supplier<?> f, Class<? extends Exception> type) throws Exception {
+        try {
+            f.get();
+        } catch (Exception e) {
+            if (e.getClass() != type) {
+                throw e;
+            } else {
+                return;
+            }
+        }
+        throw new Exception("Should fail");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/bind/xjc/8029837/PreParseGrammarTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, 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 8029837
+ * @summary Test simulates the partial call to xjc ant task that fails with
+ *          NullPointer exception
+ * @run main/othervm PreParseGrammarTest
+ */
+
+import com.sun.org.apache.xerces.internal.parsers.XMLGrammarPreparser;
+import com.sun.org.apache.xerces.internal.xni.XNIException;
+import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
+import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
+import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class PreParseGrammarTest {
+
+    public static void main(String[] args) throws FileNotFoundException, XNIException, IOException {
+        File xsdf = new File(System.getProperty("test.src", ".") + "/test.xsd");
+        InputStream is = new BufferedInputStream(new FileInputStream(xsdf));
+        XMLInputSource xis = new XMLInputSource(null, null, null, is, null);
+        XMLGrammarPreparser gp = new XMLGrammarPreparser();
+        gp.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+        //The NullPointerException is observed on next call during ant task
+        // execution
+        Grammar res = gp.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, xis);
+        System.out.println("Grammar preparsed successfully:" + res);
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/bind/xjc/8029837/test.xsd	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,4 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+	<xsd:element name="root">
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/TestFunc.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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 org.w3c.dom.Node;
+
+public class TestFunc {
+
+    public static String test(Node node) {
+        String s = node.getTextContent();
+        return s;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/XSLT.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, 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 8032908
+ * @summary Test if Node.getTextContent() function correctly returns children
+ * content
+ * @compile TestFunc.java XSLT.java
+ * @run main/othervm XSLT
+ */
+import java.io.ByteArrayOutputStream;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+public class XSLT {
+
+    static final String XMLTOTRANSFORM = "/in.xml";
+    static final String XSLTRANSFORMER = "/test.xsl";
+    static final String EXPECTEDRESULT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>ABCDEFG";
+
+    public static void main(String[] args) throws TransformerException {
+        ByteArrayOutputStream resStream = new ByteArrayOutputStream();
+        TransformerFactory trf = TransformerFactory.newInstance();
+        Transformer tr = trf.newTransformer(new StreamSource(System.getProperty("test.src", ".") + XSLTRANSFORMER));
+        tr.transform(new StreamSource(System.getProperty("test.src", ".") + XMLTOTRANSFORM), new StreamResult(resStream));
+        System.out.println("Transformation completed. Result:" + resStream.toString());
+        if (!resStream.toString().equals(EXPECTEDRESULT)) {
+            throw new RuntimeException("Incorrect transformation result");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/in.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><elem><level2_0>ABCD</level2_0><level2_1>EFG</level2_1></elem></root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/test.xsl	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform exclude-result-prefixes="cscdt_ufunc" version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:cscdt_ufunc="http://xml.apache.org/xalan/java">
+    <xsl:template match="elem">
+        <xsl:value-of select="cscdt_ufunc:TestFunc.test(.)" />
+    </xsl:template>
+</xsl:transform>
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Fri Aug 08 11:36:48 2014 -0700
@@ -148,9 +148,7 @@
          */
         @Override
         public void xrun() throws Throwable {
-            this.process = ProcessTools.startProcess(
-                name, processBuilder, waitfor, -1, TimeUnit.SECONDS
-            );
+            this.process = ProcessTools.startProcess(name, processBuilder, waitfor);
             // Release when process is started
             latch.countDown();
 
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Fri Aug 08 11:36:48 2014 -0700
@@ -74,7 +74,7 @@
     public static Process startProcess(String name,
                                        ProcessBuilder processBuilder)
     throws IOException {
-        return startProcess(name, processBuilder, null);
+        return startProcess(name, processBuilder, (Consumer)null);
     }
 
     /**
@@ -124,7 +124,7 @@
      *                      Used to determine the moment the target app is
      *                      properly warmed-up.
      *                      It can be null - in that case the warmup is skipped.
-     * @param timeout The timeout for the warmup waiting
+     * @param timeout The timeout for the warmup waiting; -1 = no wait; 0 = wait forever
      * @param unit The timeout {@linkplain TimeUnit}
      * @return Returns the initialized {@linkplain Process}
      * @throws IOException
@@ -156,15 +156,20 @@
             };
             stdout.addPump(pump);
             stderr.addPump(pump);
+        } else {
+            latch.countDown();
         }
         Future<Void> stdoutTask = stdout.process();
         Future<Void> stderrTask = stderr.process();
 
         try {
             if (timeout > -1) {
-                long realTimeout = Math.round(timeout * Utils.TIMEOUT_FACTOR);
-                if (!latch.await(realTimeout, unit)) {
-                    throw new TimeoutException();
+                if (timeout == 0) {
+                    latch.await();
+                } else {
+                    if (!latch.await(Utils.adjustTimeout(timeout), unit)) {
+                        throw new TimeoutException();
+                    }
                 }
             }
         } catch (TimeoutException | InterruptedException e) {
@@ -181,6 +186,31 @@
     }
 
     /**
+     * <p>Starts a process from its builder.</p>
+     * <span>The default redirects of STDOUT and STDERR are started</span>
+     * <p>
+     * It is possible to wait for the process to get to a warmed-up state
+     * via {@linkplain Predicate} condition on the STDOUT
+     * </p>
+     * @param name The process name
+     * @param processBuilder The process builder
+     * @param linePredicate The {@linkplain Predicate} to use on the STDOUT
+     *                      Used to determine the moment the target app is
+     *                      properly warmed-up.
+     *                      It can be null - in that case the warmup is skipped.
+     * @return Returns the initialized {@linkplain Process}
+     * @throws IOException
+     * @throws InterruptedException
+     * @throws TimeoutException
+     */
+    public static Process startProcess(String name,
+                                       ProcessBuilder processBuilder,
+                                       final Predicate<String> linePredicate)
+    throws IOException, InterruptedException, TimeoutException {
+        return startProcess(name, processBuilder, linePredicate, 0, TimeUnit.SECONDS);
+    }
+
+    /**
      * Pumps stdout and stderr from running the process into a String.
      *
      * @param processBuilder
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -280,4 +280,13 @@
         return output;
     }
 
+    /**
+     * Adjusts the provided timeout value for the TIMEOUT_FACTOR
+     * @param tOut the timeout value to be adjusted
+     * @return The timeout value adjusted for the value of "test.timeout.factor"
+     *         system property
+     */
+    public static long adjustTimeout(long tOut) {
+        return Math.round(tOut * Utils.TIMEOUT_FACTOR);
+    }
 }
--- a/jdk/test/sun/awt/image/bug8038000.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/awt/image/bug8038000.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,11 +23,13 @@
 
 /**
  * @test
- * @bug     8038000
+ * @bug     8038000 8047066
  *
  * @summary Verifies that we could create different type of Rasters with height 1
  * and strideline which exceeds raster width.
  * Also checks that a set of RasterOp work correctly with such kind of Rasters.
+ * For 8047066 verifies that ColorConvertOp could process
+ * Raster (ByteBuffer + SinglePixelPackedSampleModel)
  *
  * @run     main bug8038000
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/misc/JavaLangAccess/FormatUnsigned.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2012, 2014, 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 sun.misc.JavaLangAccess;
+import sun.misc.SharedSecrets;
+
+/*
+ * @test
+ * @summary Test JavaLangAccess.formatUnsignedInt/-Long
+ * @bug 8050114
+ */
+public class FormatUnsigned {
+
+    static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
+    public static void testFormatUnsignedInt() {
+        testFormatUnsignedInt("7fffffff", Integer.MAX_VALUE, 8, 4, 0, 8);
+        testFormatUnsignedInt("80000000", Integer.MIN_VALUE, 8, 4, 0, 8);
+        testFormatUnsignedInt("4711", 04711, 4, 3, 0, 4);
+        testFormatUnsignedInt("4711", 0x4711, 4, 4, 0, 4);
+        testFormatUnsignedInt("1010", 0b1010, 4, 1, 0, 4);
+        testFormatUnsignedInt("00001010", 0b1010, 8, 1, 0, 8);
+        testFormatUnsignedInt("\u0000\u000000001010", 0b1010, 10, 1, 2, 8);
+    }
+
+    public static void testFormatUnsignedLong() {
+        testFormatUnsignedLong("7fffffffffffffff", Long.MAX_VALUE, 16, 4, 0, 16);
+        testFormatUnsignedLong("8000000000000000", Long.MIN_VALUE, 16, 4, 0, 16);
+        testFormatUnsignedLong("4711", 04711L, 4, 3, 0, 4);
+        testFormatUnsignedLong("4711", 0x4711L, 4, 4, 0, 4);
+        testFormatUnsignedLong("1010", 0b1010L, 4, 1, 0, 4);
+        testFormatUnsignedLong("00001010", 0b1010L, 8, 1, 0, 8);
+        testFormatUnsignedLong("\u0000\u000000001010", 0b1010L, 10, 1, 2, 8);
+    }
+
+    public static void testFormatUnsignedInt(String expected, int value, int arraySize, int shift, int offset, int length) {
+        char[] chars = new char[arraySize];
+        jla.formatUnsignedInt(value, shift, chars, offset, length);
+        String s = new String(chars);
+        if (!expected.equals(s)) {
+            throw new Error(s + " should be equal to expected " + expected);
+        }
+    }
+
+    public static void testFormatUnsignedLong(String expected, long value, int arraySize, int shift, int offset, int length) {
+        char[] chars = new char[arraySize];
+        jla.formatUnsignedLong(value, shift, chars, offset, length);
+        String s = new String(chars);
+        if (!expected.equals(s)) {
+            throw new Error(s + " should be equal to expected " + expected);
+        }
+    }
+
+    public static void main(String[] args) {
+        testFormatUnsignedInt();
+        testFormatUnsignedLong();
+    }
+}
--- a/jdk/test/sun/net/ftp/FtpURL.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/net/ftp/FtpURL.java	Fri Aug 08 11:36:48 2014 -0700
@@ -483,7 +483,7 @@
 
             // Now let's check the URL handler
 
-            url = new URL("ftp://user2:@localhost:" + port + "/%2Fusr/bin;type=d");
+            url = new URL("ftp://user2@localhost:" + port + "/%2Fusr/bin;type=d");
             con = url.openConnection();
             in = new BufferedReader(new InputStreamReader(con.getInputStream()));
             do {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/jgss/spnego/NotPreferredMech.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2014, 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 8048194
+ * @run main/othervm NotPreferredMech
+ * @summary GSSContext.acceptSecContext fails when a supported mech is not initiator preferred
+ */
+
+import org.ietf.jgss.*;
+import sun.security.jgss.*;
+import sun.security.jgss.spnego.NegTokenInit;
+import sun.security.jgss.spnego.NegTokenTarg;
+import sun.security.util.BitArray;
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+public class NotPreferredMech {
+
+    public static void main(String[] argv) throws Exception {
+
+        // Generates a NegTokenInit mechTypes field, with an
+        // unsupported mech as the preferred.
+        DerOutputStream mech = new DerOutputStream();
+        mech.write(new Oid("1.2.3.4").getDER());
+        mech.write(GSSUtil.GSS_KRB5_MECH_OID.getDER());
+        DerOutputStream mechTypeList = new DerOutputStream();
+        mechTypeList.write(DerValue.tag_Sequence, mech);
+
+        // Generates a NegTokenInit mechToken field for 1.2.3.4 mech
+        GSSHeader h1 = new GSSHeader(new ObjectIdentifier("1.2.3.4"), 1);
+        ByteArrayOutputStream bout = new ByteArrayOutputStream();
+        h1.encode(bout);
+        bout.write(new byte[1]);
+
+        // Generates the NegTokenInit token
+        Constructor<NegTokenInit> ctor = NegTokenInit.class.getDeclaredConstructor(
+                byte[].class, BitArray.class, byte[].class, byte[].class);
+        ctor.setAccessible(true);
+        NegTokenInit initToken = ctor.newInstance(
+                mechTypeList.toByteArray(),
+                new BitArray(0),
+                bout.toByteArray(),
+                null);
+        Method m = Class.forName("sun.security.jgss.spnego.SpNegoToken")
+                .getDeclaredMethod("getEncoded");
+        m.setAccessible(true);
+        byte[] spnegoToken = (byte[])m.invoke(initToken);
+
+        // and wraps it into a GSSToken
+        GSSHeader h = new GSSHeader(
+                new ObjectIdentifier(GSSUtil.GSS_SPNEGO_MECH_OID.toString()),
+                spnegoToken.length);
+        bout = new ByteArrayOutputStream();
+        h.encode(bout);
+        bout.write(spnegoToken);
+        byte[] token = bout.toByteArray();
+
+        // and feeds it to a GSS acceptor
+        GSSManager man = GSSManager.getInstance();
+        GSSContext ctxt = man.createContext((GSSCredential) null);
+        token = ctxt.acceptSecContext(token, 0, token.length);
+        NegTokenTarg targ = new NegTokenTarg(token);
+
+        // Make sure it's a GO-ON message
+        Method m2 = NegTokenTarg.class.getDeclaredMethod("getNegotiatedResult");
+        m2.setAccessible(true);
+        int negResult = (int)m2.invoke(targ);
+
+        if (negResult != 1 /* ACCEPT_INCOMPLETE */) {
+            throw new Exception("Not a continue");
+        }
+    }
+}
--- a/jdk/test/sun/security/krb5/auto/Context.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/krb5/auto/Context.java	Fri Aug 08 11:36:48 2014 -0700
@@ -26,9 +26,11 @@
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.Arrays;
+import java.util.Base64;
 import java.util.HashMap;
 import java.util.Map;
 import javax.security.auth.Subject;
+import javax.security.auth.kerberos.KerberosCredMessage;
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosTicket;
 import javax.security.auth.login.LoginContext;
@@ -86,7 +88,6 @@
 
     /**
      * Using the delegated credentials from a previous acceptor
-     * @param c
      */
     public Context delegated() throws Exception {
         Context out = new Context();
@@ -177,7 +178,6 @@
     /**
      * Logins with username/keytab as an existing Subject. The
      * same subject can be used multiple times to simulate multiple logins.
-     * @param s existing subject
      */
     public static Context fromUserKtab(
             String user, String ktab, boolean storeKey) throws Exception {
@@ -411,6 +411,12 @@
                 Key k = (Key)ex.inquireSecContext(
                         InquireType.KRB5_GET_SESSION_KEY);
                 if (k == null) {
+                    throw new Exception("(Old) Session key cannot be null");
+                }
+                System.out.println("(Old) Session key is: " + k);
+                Key k2 = (Key)ex.inquireSecContext(
+                        InquireType.KRB5_GET_SESSION_KEY_EX);
+                if (k2 == null) {
                     throw new Exception("Session key cannot be null");
                 }
                 System.out.println("Session key is: " + k);
@@ -431,6 +437,19 @@
                             InquireType.KRB5_GET_AUTHZ_DATA);
                     System.out.println("AuthzData is: " + Arrays.toString(ad));
                 }
+                try {
+                    KerberosCredMessage tok = (KerberosCredMessage)ex.inquireSecContext(
+                            InquireType.KRB5_GET_KRB_CRED);
+                    System.out.println("KRB_CRED is " +
+                            (tok == null?"not ":"") + "available");
+                    if (tok != null) {
+                        System.out.println("From " + tok.getSender() + " to "
+                                + tok.getRecipient());
+                        System.out.println(Base64.getEncoder().encodeToString(tok.getEncoded()));
+                    }
+                } catch (Exception e) {
+                    System.out.println("KRB_CRED is not available: " + e);
+                }
             }
         }
     }
--- a/jdk/test/sun/security/krb5/auto/KerberosHashEqualsTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, 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 4641821
- * @run main/othervm KerberosHashEqualsTest
- * @summary hashCode() and equals() for KerberosKey and KerberosTicket
- */
-
-import java.net.InetAddress;
-import java.util.Date;
-import javax.security.auth.kerberos.KerberosKey;
-import javax.security.auth.kerberos.KerberosPrincipal;
-import javax.security.auth.kerberos.KerberosTicket;
-
-public class KerberosHashEqualsTest {
-    public static void main(String[] args) throws Exception {
-        new OneKDC(null);
-        new KerberosHashEqualsTest().check();
-    }
-
-    void checkSame(Object o1, Object o2) {
-        if(!o1.equals(o2)) {
-            throw new RuntimeException("equals() fails");
-        }
-        if(o1.hashCode() != o2.hashCode()) {
-            throw new RuntimeException("hashCode() not same");
-        }
-    }
-
-    void checkNotSame(Object o1, Object o2) {
-        if(o1.equals(o2)) {
-            throw new RuntimeException("equals() succeeds");
-        }
-    }
-
-    void check() throws Exception {
-
-        // The key part:
-        // new KerberosKey(principal, bytes, keyType, version)
-
-        KerberosKey k1, k2;
-        KerberosPrincipal CLIENT = new KerberosPrincipal("client");
-        KerberosPrincipal SERVER = new KerberosPrincipal("server");
-        byte[] PASS = "pass".getBytes();
-
-        k1 = new KerberosKey(CLIENT, PASS, 1, 1);
-        k2 = new KerberosKey(CLIENT, PASS, 1, 1);
-        checkSame(k1, k1);  // me is me
-        checkSame(k1, k2);  // same
-
-        // A destroyed key doesn't equal to any key
-        k2.destroy();
-        checkNotSame(k1, k2);
-        checkNotSame(k2, k1);
-        k1.destroy();
-        checkNotSame(k1, k2);   // even if they are both destroyed
-        checkNotSame(k2, k1);
-        checkSame(k2, k2);
-
-        // a little difference means not equal
-        k1 = new KerberosKey(CLIENT, PASS, 1, 1);
-        k2 = new KerberosKey(SERVER, PASS, 1, 1);
-        checkNotSame(k1, k2);   // Different principal name
-
-        k2 = new KerberosKey(CLIENT, "ssap".getBytes(), 1, 1);
-        checkNotSame(k1, k2);   // Different password
-
-        k2 = new KerberosKey(CLIENT, PASS, 2, 1);
-        checkNotSame(k1, k2);   // Different keytype
-
-        k2 = new KerberosKey(CLIENT, PASS, 1, 2);
-        checkNotSame(k1, k2);   // Different version
-
-        k2 = new KerberosKey(null, PASS, 1, 2);
-        checkNotSame(k1, k2);   // null is not non-null
-
-        k1 = new KerberosKey(null, PASS, 1, 2);
-        checkSame(k1, k2);      // null is null
-
-        checkNotSame(k1, "Another Object");
-
-        // The ticket part:
-        // new KerberosTicket(asn1 bytes, client, server, session key, type, flags,
-        //      auth, start, end, renewUntil times, address)
-
-        KerberosTicket t1, t2;
-
-        byte[] ASN1 = "asn1".getBytes();
-        boolean[] FORWARDABLE = new boolean[] {true, true};
-        boolean[] ALLTRUE = new boolean[] {true, true, true, true, true, true, true, true, true, true};
-        Date D0 = new Date(0);
-
-        t1 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        checkSame(t1, t1);
-        checkSame(t1, t2);
-
-        // destroyed tickets doesn't equal to each other
-        t1.destroy();
-        checkNotSame(t1, t2);
-        checkNotSame(t2, t1);
-
-        t2.destroy();
-        checkNotSame(t1, t2);   // even if they are both destroyed
-        checkNotSame(t2, t1);
-
-        checkSame(t2, t2);  // unless they are the same object
-
-        // a little difference means not equal
-        t1 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        t2 = new KerberosTicket("asn11".getBytes(), CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different ASN1 encoding
-
-        t2 = new KerberosTicket(ASN1, new KerberosPrincipal("client1"), SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different client
-
-        t2 = new KerberosTicket(ASN1, CLIENT, new KerberosPrincipal("server1"), PASS, 1, FORWARDABLE, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different server
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, "pass1".getBytes(), 1, FORWARDABLE, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different session key
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 2, FORWARDABLE, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different key type
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, new boolean[] {true, false}, D0, D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different flags, not FORWARDABLE
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, new Date(1), D0, D0, D0, null);
-        checkNotSame(t1, t2);   // Different authtime
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, new Date(1), D0, D0, null);
-        checkNotSame(t1, t2);   // Different starttime
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, new Date(1), D0, null);
-        checkNotSame(t1, t2);   // Different endtime
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, D0, new InetAddress[2]);
-        checkNotSame(t1, t2);   // Different client addresses
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, new Date(1), null);
-        t1 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, FORWARDABLE, D0, D0, D0, new Date(2), null);
-        checkSame(t1, t2);      // renewtill is ignored when RENEWABLE ticket flag is not set.
-
-        t2 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, ALLTRUE, D0, D0, D0, new Date(1), null);
-        t1 = new KerberosTicket(ASN1, CLIENT, SERVER, PASS, 1, ALLTRUE, D0, D0, D0, new Date(2), null);
-        checkNotSame(t1, t2);   // renewtill is used when RENEWABLE is set.
-
-        checkNotSame(t1, "Another Object");
-        System.out.println("Good!");
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/NewInquireTypes.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2014, 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 8043071
+ * @summary Expose session key and KRB_CRED through extended GSS-API
+ * @compile -XDignore.symbol.file NewInquireTypes.java
+ * @run main/othervm NewInquireTypes
+ */
+
+import com.sun.security.jgss.InquireType;
+import sun.security.jgss.GSSUtil;
+import sun.security.krb5.internal.KRBCred;
+import sun.security.krb5.internal.crypto.KeyUsage;
+
+import javax.security.auth.kerberos.KerberosCredMessage;
+import javax.security.auth.kerberos.EncryptionKey;
+
+public class NewInquireTypes {
+
+    public static void main(String[] args) throws Exception {
+
+        new OneKDC(null).writeJAASConf();
+
+        Context c, s;
+        c = Context.fromJAAS("client");
+        s = Context.fromJAAS("server");
+
+        c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+        s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
+
+        Context.handshake(c, s);
+
+        EncryptionKey key = (EncryptionKey)
+                c.x().inquireSecContext(InquireType.KRB5_GET_SESSION_KEY_EX);
+        KerberosCredMessage cred = (KerberosCredMessage)
+                c.x().inquireSecContext(InquireType.KRB5_GET_KRB_CRED);
+
+        // Confirm the KRB_CRED message is encrypted with the session key.
+        new KRBCred(cred.getEncoded()).encPart.decrypt(
+                new sun.security.krb5.EncryptionKey(key.getKeyType(), key.getEncoded()),
+                KeyUsage.KU_ENC_KRB_CRED_PART);
+    }
+}
--- a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6405536 6414980
+ * @bug 6405536 6414980 8051972
  * @summary Make sure that we can parse certificates using various named curves
  *   and verify their signatures
  * @author Andreas Sterbenz
@@ -153,8 +153,14 @@
                 signer = getRandomCert(certList);
             } while (cert.getIssuerX500Principal().equals(signer.getSubjectX500Principal()));
             try {
-                cert.verify(signer.getPublicKey());
-                throw new Exception("Verified invalid signature");
+                PublicKey signerPublicKey = signer.getPublicKey();
+                cert.verify(signerPublicKey);
+                // Ignore false positives
+                if (cert.getPublicKey().equals(signerPublicKey)) {
+                    System.out.println("OK: self-signed certificate detected");
+                } else {
+                    throw new Exception("Verified invalid signature");
+                }
             } catch (SignatureException e) {
                 System.out.println("OK: " + e);
             } catch (InvalidKeyException e) {
--- a/jdk/test/sun/security/smartcardio/TestAll.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestAll.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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,7 +26,7 @@
 // Because all the tests are marked @ignore as they require special hardware,
 // we cannot use jtreg to do this.
 
-import java.lang.reflect.*;
+import java.lang.reflect.Method;
 
 public class TestAll {
 
--- a/jdk/test/sun/security/smartcardio/TestChannel.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestChannel.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,10 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
 
 public class TestChannel extends Utils {
 
@@ -95,7 +95,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/jdk/test/sun/security/smartcardio/TestConnect.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestConnect.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,11 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.TerminalFactory;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
 
 public class TestConnect extends Utils {
 
@@ -63,7 +64,7 @@
             throw new Exception("Not T=0 protocol");
         }
         transmit(card);
-        card.disconnect(false);
+        card.disconnect(true);
 
         try {
             transmit(card);
@@ -96,7 +97,7 @@
             throw new Exception("Not T=0 protocol");
         }
         transmit(card);
-        card.disconnect(true);
+        card.disconnect(false);
 
         card = terminal.connect("*");
         System.out.println("card: " + card);
@@ -105,7 +106,6 @@
         }
         transmit(card);
         card.disconnect(true);
-        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/jdk/test/sun/security/smartcardio/TestConnectAgain.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestConnectAgain.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,10 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
 
 public class TestConnectAgain extends Utils {
 
@@ -95,7 +95,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/jdk/test/sun/security/smartcardio/TestControl.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestControl.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,9 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardTerminal;
 
 public class TestControl extends Utils {
 
@@ -68,7 +67,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/jdk/test/sun/security/smartcardio/TestDefault.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestDefault.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,9 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.TerminalFactory;
 
 public class TestDefault {
 
--- a/jdk/test/sun/security/smartcardio/TestExclusive.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestExclusive.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,11 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
 
 public class TestExclusive extends Utils {
 
@@ -84,9 +85,9 @@
         Thread.sleep(1000);
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
-        if (otherOK == false) {
+        if (! otherOK) {
             throw new Exception("Secondary thread failed");
         }
 
--- a/jdk/test/sun/security/smartcardio/TestMultiplePresent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestMultiplePresent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,10 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardTerminals;
+import javax.smartcardio.TerminalFactory;
 import static javax.smartcardio.CardTerminals.State.*;
 
 public class TestMultiplePresent {
--- a/jdk/test/sun/security/smartcardio/TestPresent.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestPresent.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,9 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.TerminalFactory;
 
 public class TestPresent {
 
--- a/jdk/test/sun/security/smartcardio/TestTransmit.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/TestTransmit.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,10 +31,16 @@
 
 // This test requires special hardware.
 
-import java.io.*;
-import java.util.*;
-
-import javax.smartcardio.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StringReader;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
+import javax.smartcardio.ResponseAPDU;
 
 public class TestTransmit extends Utils {
 
@@ -79,7 +85,7 @@
         }
 
         // disconnect
-        card.disconnect(false);
+        card.disconnect(true);
 
         System.out.println("OK.");
     }
--- a/jdk/test/sun/security/smartcardio/Utils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/smartcardio/Utils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -24,10 +24,16 @@
 
 // common utility functions for the PC/SC tests
 
-import javax.smartcardio.*;
-
-import java.io.*;
-import java.util.*;
+import java.io.StringReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.ResponseAPDU;
+import javax.smartcardio.CommandAPDU;
+import javax.smartcardio.TerminalFactory;
 
 public class Utils {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/default_options.sh	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2014, 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 8049834
+# @summary Two security tools tests do not run with only JRE
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+KS=ks
+KEYTOOL="$TESTJAVA/bin/keytool ${TESTTOOLVMOPTS}"
+JAR="$TESTJAVA/bin/jar ${TESTTOOLVMOPTS}"
+JARSIGNER="$TESTJAVA/bin/jarsigner ${TESTTOOLVMOPTS}"
+
+rm $KS 2> /dev/null
+
+PASS=changeit
+export PASS
+
+$KEYTOOL -genkeypair -dname CN=A -alias a \
+         -storepass:env PASS -keypass:env PASS -keystore $KS \
+         -keyalg rsa || exit 1
+
+cat <<EOF > js.conf
+jarsigner.all = -keystore \${user.dir}/$KS -storepass:env PASS -debug -strict
+jarsigner.sign = -digestalg SHA1
+jarsigner.verify = -verbose:summary
+
+EOF
+
+$JAR cvf a.jar ks js.conf
+
+$JARSIGNER -conf js.conf a.jar a || exit 21
+$JARSIGNER -conf js.conf -verify a.jar > jarsigner.out || exit 22
+grep "and 1 more" jarsigner.out || exit 23
+$JAR xvf a.jar META-INF/MANIFEST.MF
+grep "SHA1-Digest" META-INF/MANIFEST.MF || exit 24
+
+echo Done
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/weaksize.sh	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2014, 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 8044755
+# @summary Add a test for algorithm constraints check in jarsigner
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# The sigalg used is MD2withRSA, which is obsolete.
+
+KT="$TESTJAVA/bin/keytool ${TESTTOOLVMOPTS} -keystore ks
+    -storepass changeit -keypass changeit
+    -keyalg rsa -sigalg MD2withRSA -debug"
+JS="$TESTJAVA/bin/jarsigner ${TESTTOOLVMOPTS} -keystore ks
+    -storepass changeit -strict -debug"
+JAR="$TESTJAVA/bin/jar ${TESTTOOLVMOPTS}"
+
+rm ks 2> /dev/null
+
+$KT -genkeypair -alias ca -dname CN=CA -ext bc
+$KT -genkeypair -alias signer -dname CN=Signer
+
+$KT -certreq -alias signer | \
+        $KT -gencert -alias ca -ext ku=dS -rfc | \
+        $KT -importcert -alias signer
+
+$JAR cvf a.jar ks
+
+# We always trust a TrustedCertificateEntry
+$JS a.jar ca || exit 1
+
+# An end-entity cert must follow algorithm constraints
+$JS a.jar signer && exit 2
+
+exit 0
--- a/jdk/test/sun/security/tools/keytool/default_options.sh	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/sun/security/tools/keytool/default_options.sh	Fri Aug 08 11:36:48 2014 -0700
@@ -33,16 +33,12 @@
 
 KS=ks
 KEYTOOL="$TESTJAVA/bin/keytool ${TESTTOOLVMOPTS}"
-JAR="$TESTJAVA/bin/jar ${TESTTOOLVMOPTS}"
-JARSIGNER="$TESTJAVA/bin/jarsigner ${TESTTOOLVMOPTS}"
 
 rm $KS 2> /dev/null
 
 PASS=changeit
 export PASS
 
-# keytool
-
 cat <<EOF > kt.conf
 # A Pre-configured options file
 keytool.all = -storepass:env PASS -keypass:env PASS -keystore \${user.dir}/$KS -debug
@@ -69,23 +65,6 @@
 # Single-valued option on command line overrides again
 $KEYTOOL -conf kt.conf -delete -alias b -keystore $KS || exit 17
 
-# jarsigner
-
-cat <<EOF > js.conf
-jarsigner.all = -keystore \${user.dir}/$KS -storepass:env PASS -debug -strict
-jarsigner.sign = -digestalg SHA1
-jarsigner.verify = -verbose:summary
-
-EOF
-
-$JAR cvf a.jar ks js.conf kt.conf
-
-$JARSIGNER -conf js.conf a.jar a || exit 21
-$JARSIGNER -conf js.conf -verify a.jar > jarsigner.out || exit 22
-grep "and 2 more" jarsigner.out || exit 23
-$JAR xvf a.jar META-INF/MANIFEST.MF
-grep "SHA1-Digest" META-INF/MANIFEST.MF || exit 24
-
 # Error cases
 
 # File does not exist
--- a/jdk/test/sun/security/tools/keytool/weaksize.sh	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2014, 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 8044755
-# @summary Add a test for algorithm constraints check in jarsigner
-#
-
-if [ "${TESTJAVA}" = "" ] ; then
-  JAVAC_CMD=`which javac`
-  TESTJAVA=`dirname $JAVAC_CMD`/..
-fi
-
-# The sigalg used is MD2withRSA, which is obsolete.
-
-KT="$TESTJAVA/bin/keytool ${TESTTOOLVMOPTS} -keystore ks
-    -storepass changeit -keypass changeit
-    -keyalg rsa -sigalg MD2withRSA -debug"
-JS="$TESTJAVA/bin/jarsigner ${TESTTOOLVMOPTS} -keystore ks
-    -storepass changeit -strict -debug"
-JAR="$TESTJAVA/bin/jar ${TESTTOOLVMOPTS}"
-
-rm ks 2> /dev/null
-
-$KT -genkeypair -alias ca -dname CN=CA -ext bc
-$KT -genkeypair -alias signer -dname CN=Signer
-
-$KT -certreq -alias signer | \
-        $KT -gencert -alias ca -ext ku=dS -rfc | \
-        $KT -importcert -alias signer
-
-$JAR cvf a.jar ks
-
-# We always trust a TrustedCertificateEntry
-$JS a.jar ca || exit 1
-
-# An end-entity cert must follow algorithm constraints
-$JS a.jar signer && exit 2
-
-exit 0
--- a/jdk/test/tools/launcher/TestSpecialArgs.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/jdk/test/tools/launcher/TestSpecialArgs.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7124089 7131021
+ * @bug 7124089 7131021 8042469
  * @summary Checks for MacOSX specific flags are accepted or rejected, and
  *          MacOSX platforms specific environment is consistent.
  * @compile -XDignore.symbol.file TestSpecialArgs.java EnvironmentVariables.java
@@ -69,6 +69,137 @@
                 throw new RuntimeException("Error: argument was accepted ????");
             }
         }
+
+        /*
+         * test argument : -XX:NativeMemoryTracking=value
+         * A JVM flag, comsumed by the JVM, but requiring launcher
+         * to set an environmental variable if and only if value is supplied.
+         * Test and order:
+         * 1) execute with valid parameter: -XX:NativeMemoryTracking=MyValue
+         *    a) check for correct env variable name: "NMT_LEVEL_" + pid
+         *    b) check that "MyValue" was found in local env.
+         * 2) execute with invalid parameter: -XX:NativeMemoryTracking=
+         *    !) Won't find "NativeMemoryTracking:"
+         *       Code to create env variable not executed.
+         * 3) execute with invalid parameter: -XX:NativeMemoryTracking
+         *    !) Won't find "NativeMemoryTracking:"
+         *       Code to create env variable not executed.
+         * 4) give and invalid value and check to make sure JVM commented
+         */
+        { // NativeMemoryTracking
+            String launcherPidString = "launcher.pid=";
+            String envVarPidString = "TRACER_MARKER: NativeMemoryTracking: env var is NMT_LEVEL_";
+            String NMT_Option_Value = "off";
+            String myClassName = "helloworld";
+            boolean haveLauncherPid = false;
+
+            // === Run the tests ===
+
+            // ---Test 1a
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=" + NMT_Option_Value,
+                        "-version");
+
+            // get the PID from the env var we set for the JVM
+            String envVarPid = null;
+            for (String line : tr.testOutput) {
+                if (line.contains(envVarPidString)) {
+                    int sindex = envVarPidString.length();
+                    envVarPid = line.substring(sindex);
+                    break;
+                }
+            }
+            // did we find envVarPid?
+            if (envVarPid == null) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: failed to find env Var Pid in tracking info");
+            }
+            // we think we found the pid string.  min test, not "".
+            if (envVarPid.length() < 1) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: env Var Pid in tracking info is empty string");
+            }
+
+            /*
+             * On Linux, Launcher Tracking will print the PID.  Use this info
+             * to validate what we got as the PID in the Launcher itself.
+             * Linux is the only one that prints this, and trying to get it
+             * here for win is awful.  So let the linux test make sure we get
+             * the valid pid, and for non-linux, just make sure pid string is
+             * non-zero.
+             */
+            if (isLinux) {
+                // get what the test says is the launcher pid
+                String launcherPid = null;
+                for (String line : tr.testOutput) {
+                    int index = line.indexOf(launcherPidString);
+                    if (index >= 0) {
+                        int sindex = index + launcherPidString.length();
+                        int tindex = sindex + line.substring(sindex).indexOf("'");
+                        System.out.println("DEBUG INFO: sindex = " + sindex);
+                        System.out.println("DEBUG INFO: searching substring: " + line.substring(sindex));
+                        System.out.println("DEBUG INFO: tindex = " + tindex);
+                        // DEBUG INFO
+                        System.out.println(tr);
+                        launcherPid = line.substring(sindex, tindex);
+                        break;
+                    }
+                }
+                if (launcherPid == null) {
+                    System.out.println(tr);
+                    throw new RuntimeException("Error: failed to find launcher Pid in launcher tracking info");
+                }
+
+                // did we create the env var with the correct pid?
+                if (!launcherPid.equals(envVarPid)) {
+                    System.out.println(tr);
+                    System.out.println("Error: wrong pid in creating env var");
+                    System.out.println("Error Info: launcherPid = " + launcherPid);
+                    System.out.println("Error Info: envVarPid   = " + envVarPid);
+                    throw new RuntimeException("Error: wrong pid in creating env var");
+                }
+            }
+
+
+            // --- Test 1b
+            if (!tr.contains("NativeMemoryTracking: got value " + NMT_Option_Value)) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: Valid param failed to set env variable");
+            }
+
+            // --- Test 2
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=",
+                        "-version");
+            if (tr.contains("NativeMemoryTracking:")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param caused env variable to be erroneously created");
+            }
+            if (!tr.contains("Syntax error, expecting -XX:NativeMemoryTracking=")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param not checked by JVM");
+            }
+
+            // --- Test 3
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking",
+                        "-version");
+            if (tr.contains("NativeMemoryTracking:")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param caused env variable to be erroneously created");
+            }
+            if (!tr.contains("Syntax error, expecting -XX:NativeMemoryTracking=")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param not checked by JVM");
+            }
+            // --- Test 4
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=BADVALUE",
+                        "-version");
+            if (!tr.contains("expecting -XX:NativeMemoryTracking")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param did not get JVM Syntax error message");
+            }
+
+        } // NativeMemoryTracking
+
+
         // MacOSX specific tests ensue......
         if (!isMacOSX)
             return;
--- a/langtools/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -266,3 +266,5 @@
 fa0d1059a26f82f95620b7dc8bbfbe302bce8883 jdk9-b21
 aca19c52b24627a6b085cfeb433051a3e420cd81 jdk9-b22
 0402a91cd14b530b6e98452341ff853717948239 jdk9-b23
+980b18627fd3f4936be2d9e2b013abb461cb2ddb jdk9-b24
+d60b572d759449913d02478219ad87e0574a3909 jdk9-b25
--- a/langtools/make/build.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/build.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2014, 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
@@ -168,6 +168,8 @@
 sjavac.tests = \
         tools/sjavac
 
+crules.tests = ../make/test/crules
+
 #
 
 # The following files require the latest JDK to be available.
--- a/langtools/make/build.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/build.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -760,7 +760,8 @@
     **** crules targets.
     -->
 
-    <target name="build-crules" depends="-def-compilecrules,-def-build-jar-with-services">
+    <target name="build-crules"
+            depends="-def-compilecrules,-def-build-jar-with-services,build-bootstrap-javac,-create-import-jdk-stubs">
         <compilecrules/>
         <build-jar-with-services
                     name="crules"
@@ -770,13 +771,19 @@
                     jarmainclass=""
                     jarclasspath="crules.jar"
                     service.type="com.sun.source.util.Plugin"
-                    service.provider="crules.MutableFieldsAnalyzer"/>
+                    service.provider="crules.CodingRulesAnalyzerPlugin"/>
         <build-tool name="crules"/>
     </target>
 
+    <target name="jtreg-crules" depends="build-javac,build-crules,-def-jtreg">
+        <jtreg-tool name="crules"
+                    tests="${crules.tests}"
+                    extra.jvmargs="-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar" />
+    </target>
+
     <target name="check-coding-rules" depends="build-bootstrap-javac,-create-import-jdk-stubs,build-crules">
         <build-classes includes="${javac.includes}"
-            plugin.options="-J-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar -Xplugin:mutable_fields_analyzer" />
+            plugin.options="-J-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar -Xplugin:coding_rules" />
     </target>
 
     <!--
@@ -799,9 +806,15 @@
     <target name="idea">
         <mkdir dir=".idea"/>
         <copy todir=".idea" >
-            <fileset dir="make/intellij" includes="**"/>
+            <fileset dir="make/intellij" excludes="**/src/**"/>
         </copy>
-        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
+        <condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]">
+            <isset property="jtreg.home"/>
+        </condition>
+        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/>
+        <mkdir dir=".idea/classes"/>
+        <javac srcdir="make/intellij/src"
+               destdir=".idea/classes"/>
     </target>
 
     <!--
@@ -1144,6 +1157,7 @@
             <attribute name="options" default="${other.jtreg.options}"/>
             <attribute name="keywords" default="-keywords:!ignore"/>
             <attribute name="jpda.jvmargs" default=""/>
+            <attribute name="extra.jvmargs" default=""/>
             <sequential>
                 <property name="coverage.options" value=""/>              <!-- default -->
                 <property name="coverage.classpath" value=""/>            <!-- default -->
@@ -1157,7 +1171,7 @@
                     samevm="@{samevm}" verbose="@{verbose}"
                     failonerror="false" resultproperty="jtreg.@{name}.result"
                     javacoptions="-g"
-                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs}">
+                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs} @{extra.jvmargs}">
                     <arg line="@{keywords}"/>
                     <arg line="@{options}"/>
                     <arg line="@{tests}"/>
--- a/langtools/make/intellij/ant.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/ant.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -10,7 +10,7 @@
         <property name="javac.debuglevel" value="source,lines,vars" />
         <property name="jtreg.jpda.jvmargs" value="-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5900,suspend=y" />
       </properties>
-      <executeOn event="afterCompilation" target="build-all-classes" />
+      <executeOn event="afterCompilation" target="post-make" />
     </buildFile>
   </component>
 </project>
--- a/langtools/make/intellij/build.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/build.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -1,17 +1,14 @@
 <!-- importing.xml -->
 <project name="langtools" basedir="..">
-    <import file="../make/build.xml"/>
-
-    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
-        <exec-target target="jtreg-debug-internal"/>
-    </target>
 
-    <target name="jtreg-debug-internal" depends="build-all-tools,-def-jtreg">
-        <sequential>
-            <sleep seconds="2"/>
-            <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
-        </sequential>
-    </target>
+    <script language="javascript" classpath=".idea/classes">
+        var ideaListener = project.getBuildListeners().firstElement();            
+        var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
+        project.removeBuildListener(ideaListener)
+        project.addBuildListener(new LangtoolsLogger(ideaListener))
+    </script>
+
+    <import file="../make/build.xml"/>
 
     <macrodef name="exec-target">
         <attribute name="antfile" default="${ant.file}" />
@@ -32,5 +29,15 @@
             </java>
         </sequential>
     </macrodef>
+
+    <target name="post-make" depends="build-all-tools"/>
+
+    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
+        <exec-target target="jtreg-debug-internal"/>
+    </target>
+
+    <target name="jtreg-debug-internal" depends="-def-jtreg">
+        <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
+    </target>
 </project>
 
--- a/langtools/make/intellij/codeStyleSettings.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/codeStyleSettings.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -5,10 +5,14 @@
       <value>
         <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
         <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
-        <option name="RIGHT_MARGIN" value="80" />
+        <option name="RIGHT_MARGIN" value="100" />
+        <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
         <XML>
           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
         </XML>
+        <codeStyleSettings language="JAVA">
+          <option name="SPACE_AFTER_TYPE_CAST" value="false" />
+        </codeStyleSettings>
       </value>
     </option>
     <option name="USE_PER_PROJECT_SETTINGS" value="true" />
--- a/langtools/make/intellij/compiler.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/compiler.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -3,28 +3,16 @@
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />
     <excludeFromCompile>
+      <directory url="file://$PROJECT_DIR$/src" includeSubdirectories="true" />
       <directory url="file://$PROJECT_DIR$/test" includeSubdirectories="true" />
     </excludeFromCompile>
     <resourceExtensions />
-    <wildcardResourcePatterns>
-      <entry name="!?*.java" />
-      <entry name="!?*.form" />
-      <entry name="!?*.class" />
-      <entry name="!?*.groovy" />
-      <entry name="!?*.scala" />
-      <entry name="!?*.flex" />
-      <entry name="!?*.kt" />
-      <entry name="!?*.clj" />
-    </wildcardResourcePatterns>
+    <wildcardResourcePatterns />
     <annotationProcessing>
       <profile default="true" name="Default" enabled="false">
         <processorPath useClasspath="true" />
       </profile>
     </annotationProcessing>
-  </component>
-  <component name="JavacSettings">
-    <option name="DEBUGGING_INFO" value="false" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all -Werror" />
-  </component>
+  </component>  
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/langtools.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,9 @@
+<component name="CopyrightManager">
+  <copyright>
+    <option name="notice" value="Copyright (c) &amp;#36;today.year, Oracle and/or its affiliates. All rights reserved.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation.  Oracle designates this&#10;particular file as subject to the &quot;Classpath&quot; exception as provided&#10;by Oracle in the LICENSE file that accompanied this code.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
+    <option name="keyword" value="Copyright" />
+    <option name="allowReplaceKeyword" value="" />
+    <option name="myName" value="langtools" />
+    <option name="myLocal" value="true" />
+  </copyright>
+</component>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/profiles_settings.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+  <settings default="langtools" />
+</component>
\ No newline at end of file
--- a/langtools/make/intellij/inspectionProfiles/langtools.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/inspectionProfiles/langtools.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -14,6 +14,10 @@
         <value />
       </option>
     </inspection_tool>
+    <inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoreObjectConstruction" value="false" />
+      <option name="ignoreUncompilable" value="true" />
+    </inspection_tool>
     <inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
       <option name="processCode" value="false" />
       <option name="processLiterals" value="false" />
--- a/langtools/make/intellij/langtools.iml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/langtools.iml	Fri Aug 08 11:36:48 2014 -0700
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build" />
+    <output-test url="file://$MODULE_DIR$/build" />
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/genstubs" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/test" type="java-test-resource" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />    
     <orderEntry type="inheritedJdk" />
--- a/langtools/make/intellij/misc.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/misc.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -4,7 +4,7 @@
     <entry_points version="2.0" />
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true">
-    <output url="file://$PROJECT_DIR$/build/intellij" />
+    <output url="file://$PROJECT_DIR$/build" />
   </component>
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/src/idea/LangtoolsIdeaAntLogger.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2014, 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 idea;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.DefaultLogger;
+
+import java.util.EnumSet;
+import java.util.Stack;
+
+import static org.apache.tools.ant.Project.*;
+
+/**
+ * This class is used to wrap the IntelliJ ant logger in order to provide more meaningful
+ * output when building langtools. The basic ant output in IntelliJ can be quite cumbersome to
+ * work with, as it provides two separate views: (i) a tree view, which is good to display build task
+ * in a hierarchical fashion as they are processed; and a (ii) plain text view, which gives you
+ * the full ant output. The main problem is that javac-related messages are buried into the
+ * ant output (which is made very verbose by IntelliJ in order to support the tree view). It is
+ * not easy to figure out which node to expand in order to see the error message; switching
+ * to plain text doesn't help either, as now the output is totally flat.
+ *
+ * This logger class removes a lot of verbosity from the IntelliJ ant logger by not propagating
+ * all the events to the IntelliJ's logger. In addition, certain events are handled in a custom
+ * fashion, to generate better output during the build.
+ */
+public final class LangtoolsIdeaAntLogger extends DefaultLogger {
+
+    /**
+     * This is just a way to pass in customized binary string predicates;
+     *
+     * TODO: replace with @code{BiPredicate<String, String>} and method reference when moving to 8
+     */
+    enum StringBinaryPredicate {
+        CONTAINS() {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.contains(s2);
+            }
+        },
+        STARTS_WITH {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.startsWith(s2);
+            }
+        };
+
+        abstract boolean apply(String s1, String s2);
+    }
+
+    /**
+     * Various kinds of ant messages that we shall intercept
+     */
+    enum MessageKind {
+
+        /** a javac error */
+        JAVAC_ERROR(StringBinaryPredicate.CONTAINS, MSG_ERR, "error:", "compiler.err"),
+        /** a javac warning */
+        JAVAC_WARNING(StringBinaryPredicate.CONTAINS, MSG_WARN, "warning:", "compiler.warn"),
+        /** a javac note */
+        JAVAC_NOTE(StringBinaryPredicate.CONTAINS, MSG_INFO, "note:", "compiler.note"),
+        /** continuation of some javac error message */
+        JAVAC_NESTED_DIAG(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "  "),
+        /** a javac crash */
+        JAVAC_CRASH(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "An exception has occurred in the compiler"),
+        /** jtreg test success */
+        JTREG_TEST_PASSED(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Passed: "),
+        /** jtreg test failure */
+        JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
+        /** jtreg test error */
+        JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: ");
+
+        StringBinaryPredicate sbp;
+        int priority;
+        String[] keys;
+
+        MessageKind(StringBinaryPredicate sbp, int priority, String... keys) {
+            this.sbp = sbp;
+            this.priority = priority;
+            this.keys = keys;
+        }
+
+        /**
+         * Does a given message string matches this kind?
+         */
+        boolean matches(String s) {
+            for (String key : keys) {
+                if (sbp.apply(s, key)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of tasks we need to keep track of during logging.
+     */
+    enum Task {
+        /** javac task - invoked during compilation */
+        JAVAC("javac", MessageKind.JAVAC_ERROR, MessageKind.JAVAC_WARNING, MessageKind.JAVAC_NOTE,
+                       MessageKind.JAVAC_NESTED_DIAG, MessageKind.JAVAC_CRASH),
+        /** jtreg task - invoked during test execution */
+        JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR),
+        /** initial synthetic task when the logger is created */
+        ROOT("") {
+            @Override
+            boolean matches(String s) {
+                return false;
+            }
+        },
+        /** synthetic task catching any other tasks not in this list */
+        ANY("") {
+            @Override
+            boolean matches(String s) {
+                return true;
+            }
+        };
+
+        String taskName;
+        MessageKind[] msgs;
+
+        Task(String taskName, MessageKind... msgs) {
+            this.taskName = taskName;
+            this.msgs = msgs;
+        }
+
+        boolean matches(String s) {
+            return s.equals(taskName);
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of targets we need to keep track of during logging.
+     * A regular expression is used to match a given target name.
+     */
+    enum Target {
+        /** jtreg target - executed when launching tests */
+        JTREG("jtreg") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Running jtreg tests: " + e.getProject().getProperty("jtreg.tests");
+            }
+        },
+        /** build bootstrap tool target - executed when bootstrapping javac */
+        BUILD_BOOTSTRAP_TOOL("build-bootstrap-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building bootstrap " + tool + "...";
+            }
+        },
+        /** build classes target - executed when building classes of given tool */
+        BUILD_TOOL("build-classes-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building " + tool + "...";
+            }
+        },
+        /** synthetic target catching any other target not in this list */
+        ANY("") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Executing Ant target(s): " + e.getProject().getProperty("ant.project.invoked-targets");
+            }
+            @Override
+            boolean matches(String msg) {
+                return true;
+            }
+        };
+
+        String targetRegex;
+
+        Target(String targetRegex) {
+            this.targetRegex = targetRegex;
+        }
+
+        boolean matches(String msg) {
+            return msg.matches(targetRegex);
+        }
+
+        abstract String getDisplayMessage(BuildEvent e);
+    }
+
+    /**
+     * A custom build event used to represent status changes which should be notified inside
+     * Intellij
+     */
+    static class StatusEvent extends BuildEvent {
+
+        /** the target to which the status update refers */
+        Target target;
+
+        StatusEvent(BuildEvent e, Target target) {
+            super(new StatusTask(e, target.getDisplayMessage(e)));
+            this.target = target;
+            setMessage(getTask().getTaskName(), 2);
+        }
+
+        /**
+         * A custom task used to channel info regarding a status change
+         */
+        static class StatusTask extends org.apache.tools.ant.Task {
+            StatusTask(BuildEvent event, String msg) {
+                setProject(event.getProject());
+                setOwningTarget(event.getTarget());
+                setTaskName(msg);
+            }
+        }
+    }
+
+    /** wrapped ant logger (IntelliJ's own logger) */
+    DefaultLogger logger;
+
+    /** flag - is this the first target we encounter? */
+    boolean firstTarget = true;
+
+    /** flag - should subsequenet failures be suppressed ? */
+    boolean suppressTaskFailures = false;
+
+    /** flag - have we ran into a javac crash ? */
+    boolean crashFound = false;
+
+    /** stack of status changes associated with pending targets */
+    Stack<StatusEvent> statusEvents = new Stack<>();
+
+    /** stack of pending tasks */
+    Stack<Task> tasks = new Stack<>();
+
+    public LangtoolsIdeaAntLogger(DefaultLogger logger) {
+        this.logger = logger;
+        tasks.push(Task.ROOT);
+    }
+
+    @Override
+    public void buildStarted(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void buildFinished(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void targetStarted(BuildEvent event) {
+        EnumSet<Target> statusKinds = firstTarget ?
+                EnumSet.allOf(Target.class) :
+                EnumSet.complementOf(EnumSet.of(Target.ANY));
+
+        String targetName = event.getTarget().getName();
+
+        for (Target statusKind : statusKinds) {
+            if (statusKind.matches(targetName)) {
+                StatusEvent statusEvent = new StatusEvent(event, statusKind);
+                statusEvents.push(statusEvent);
+                logger.taskStarted(statusEvent);
+                firstTarget = false;
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void targetFinished(BuildEvent event) {
+        if (!statusEvents.isEmpty()) {
+            StatusEvent lastEvent = statusEvents.pop();
+            if (lastEvent.target.matches(event.getTarget().getName())) {
+                logger.taskFinished(lastEvent);
+            }
+        }
+    }
+
+    @Override
+    public void taskStarted(BuildEvent event) {
+        String taskName = event.getTask().getTaskName();
+        for (Task task : Task.values()) {
+            if (task.matches(taskName)) {
+                tasks.push(task);
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void taskFinished(BuildEvent event) {
+        if (tasks.peek() == Task.ROOT) {
+            //we need to 'close' the root task to get nicer output
+            logger.taskFinished(event);
+        } else if (!suppressTaskFailures && event.getException() != null) {
+            //the first (innermost) task failure should always be logged
+            event.setMessage(event.getException().toString(), 0);
+            event.setException(null);
+            //note: we turn this into a plain message to avoid stack trace being logged by Idea
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        }
+        tasks.pop();
+    }
+
+    @Override
+    public void messageLogged(BuildEvent event) {
+        String msg = event.getMessage();
+
+        boolean processed = false;
+
+        if (!tasks.isEmpty()) {
+            Task task = tasks.peek();
+            for (MessageKind messageKind : task.msgs) {
+                if (messageKind.matches(msg)) {
+                    event.setMessage(msg, messageKind.priority);
+                    processed = true;
+                    if (messageKind == MessageKind.JAVAC_CRASH) {
+                        crashFound = true;
+                    }
+                    break;
+                }
+            }
+        }
+
+        if (event.getPriority() == MSG_ERR || crashFound) {
+            //we log errors regardless of owning task
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        } else if (processed) {
+            logger.messageLogged(event);
+        }
+    }
+}
--- a/langtools/make/intellij/workspace.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/intellij/workspace.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -7,6 +7,7 @@
     <option name="MAKE_PROJECT_ON_SAVE" value="true" />
   </component>
   <component name="RunManager" selected="Application.javac">
+    <!-- standard tools -->
     <configuration default="false" name="javac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
       <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
@@ -19,7 +20,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javac" />
+      </method>
     </configuration>
     <configuration default="false" name="javadoc" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
@@ -33,7 +39,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javadoc" />
+      </method> 
     </configuration>
     <configuration default="false" name="javap" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
@@ -47,7 +58,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javap" />
+      </method> 
     </configuration>
     <configuration default="false" name="javah" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
@@ -61,21 +77,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
-    </configuration>
-    <configuration default="false" name="jdeps" type="Application" factoryName="Application">
-      <option name="MAIN_CLASS_NAME" value="com.sun.tools.jdeps.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
-      <option name="PROGRAM_PARAMETERS" value="" />
-      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" value="" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="langtools" />
-      <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javah" />
+      </method> 
     </configuration>
     <configuration default="false" name="sjavac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
@@ -89,9 +96,35 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-sjavac" />
+      </method> 
     </configuration>
-    <configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
+    <!-- bootstrap javac -->
+    <configuration default="false" name="javac (bootstrap)" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/bootstrap/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-bootstrap-javac" />
+      </method> 
+    </configuration>
+    <!-- jtreg debug -->
+    <configuration default="false" name="jtreg (debug)" type="Remote" factoryName="Remote" singleton="true">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="true" />
       <option name="SHMEM_ADDRESS" />
@@ -108,15 +141,6 @@
       </method>
       <method />
     </configuration>
-    <list size="7">
-      <item index="0" class="java.lang.String" itemvalue="Application.javac" />
-      <item index="1" class="java.lang.String" itemvalue="Application.javadoc" />
-      <item index="2" class="java.lang.String" itemvalue="Application.javap" />
-      <item index="3" class="java.lang.String" itemvalue="Application.javah" />
-      <item index="4" class="java.lang.String" itemvalue="Application.jdeps" />
-      <item index="5" class="java.lang.String" itemvalue="Application.sjavac" />
-      <item index="6" class="java.lang.String" itemvalue="Remote.jtreg" />
-    </list>
   </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
@@ -131,8 +155,9 @@
         <filter targetName="jtreg-debug" isVisible="true" />
         <filter targetName="checkstyle" isVisible="true" />
       </targetFilters>
-      <viewClosedWhenNoErrors value="false" />
+      <viewClosedWhenNoErrors value="true" />
       <expanded value="false" />
+      <treeView value="false" />
     </buildFile>
   </component>
 </project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/CodingRulesAnalyzerPlugin/Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,11 @@
+/**@test /nodynamiccopyright/
+ * @compile/fail/ref=Test.out -Xplugin:coding_rules -XDrawDiagnostics Test.java
+ */
+
+import com.sun.tools.javac.util.Assert;
+
+public class Test {
+    public void check(String value) {
+        Assert.check(value.trim().length() > 0, "value=" + value);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/CodingRulesAnalyzerPlugin/Test.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Test.java:9:21: compiler.err.proc.messager: compiler.misc.crules.should.not.use.string.concatenation
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/MutableFieldsAnalyzer/Test.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,9 @@
+/**@test /nodynamiccopyright/
+ * @compile/fail/ref=Test.out -Xplugin:coding_rules -XDrawDiagnostics Test.java
+ */
+
+package com.sun.tools.javac;
+
+public class Test {
+    public static String mutable;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/MutableFieldsAnalyzer/Test.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Test.java:8:26: compiler.err.proc.messager: compiler.misc.crules.err.var.must.be.final: public static String mutable
+1 error
--- a/langtools/make/tools/crules/AbstractCodingRulesAnalyzer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/tools/crules/AbstractCodingRulesAnalyzer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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,64 +27,43 @@
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-import javax.lang.model.element.TypeElement;
-import javax.tools.JavaFileObject;
-
-import com.sun.source.tree.Tree;
 import com.sun.source.util.JavacTask;
-import com.sun.source.util.Plugin;
-import com.sun.source.util.TaskEvent;
-import com.sun.source.util.TaskListener;
-import com.sun.source.util.Trees;
 import com.sun.tools.javac.api.BasicJavacTask;
+import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.TreeScanner;
 import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
 import com.sun.tools.javac.util.Log;
+import com.sun.tools.javac.util.Options;
+import com.sun.tools.javac.util.RawDiagnosticFormatter;
 
 import static com.sun.source.util.TaskEvent.Kind;
 
-public abstract class AbstractCodingRulesAnalyzer implements Plugin {
+public abstract class AbstractCodingRulesAnalyzer {
 
-    protected Log log;
-    protected Trees trees;
+    private   final Log log;
+    private   final boolean rawDiagnostics;
+    private   final JCDiagnostic.Factory diags;
+    private   final Options options;
+    protected final Messages messages;
+    protected final Symtab syms;
     protected TreeScanner treeVisitor;
     protected Kind eventKind;
-    protected Messages messages;
 
-    public void init(JavacTask task, String... args) {
+    public AbstractCodingRulesAnalyzer(JavacTask task) {
         BasicJavacTask impl = (BasicJavacTask)task;
         Context context = impl.getContext();
         log = Log.instance(context);
-        trees = Trees.instance(task);
+        options = Options.instance(context);
+        rawDiagnostics = options.isSet("rawDiagnostics");
+        diags = JCDiagnostic.Factory.instance(context);
         messages = new Messages();
-        task.addTaskListener(new PostAnalyzeTaskListener());
+        syms = Symtab.instance(context);
     }
 
-    public class PostAnalyzeTaskListener implements TaskListener {
-
-        @Override
-        public void started(TaskEvent taskEvent) {}
-
-        @Override
-        public void finished(TaskEvent taskEvent) {
-            if (taskEvent.getKind().equals(eventKind)) {
-                TypeElement typeElem = taskEvent.getTypeElement();
-                Tree tree = trees.getTree(typeElem);
-                if (tree != null) {
-                    JavaFileObject prevSource = log.currentSourceFile();
-                    try {
-                        log.useSource(taskEvent.getCompilationUnit().getSourceFile());
-                        treeVisitor.scan((JCTree)tree);
-                    } finally {
-                        log.useSource(prevSource);
-                    }
-                }
-            }
-        }
-    }
-
-    class Messages {
+    protected class Messages {
         ResourceBundle bundle;
 
         Messages() {
@@ -93,7 +72,14 @@
         }
 
         public void error(JCTree tree, String code, Object... args) {
-            String msg = (code == null) ? (String) args[0] : localize(code, args);
+            String msg;
+            if (rawDiagnostics) {
+                RawDiagnosticFormatter f = new RawDiagnosticFormatter(options);
+                msg = f.formatMessage(diags.create(DiagnosticType.FRAGMENT, log.currentSource(),
+                                                   tree.pos(), code, args), null);
+            } else {
+                msg = (code == null) ? (String) args[0] : localize(code, args);
+            }
             log.error(tree, "proc.messager", msg.toString());
         }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/tools/crules/AssertCheckAnalyzer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2013, 2014, 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 crules;
+
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.Tag;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import com.sun.tools.javac.util.Assert;
+
+public class AssertCheckAnalyzer extends AbstractCodingRulesAnalyzer {
+
+    public AssertCheckAnalyzer(JavacTask task) {
+        super(task);
+        treeVisitor = new AssertCheckVisitor();
+        eventKind = Kind.ANALYZE;
+    }
+
+    class AssertCheckVisitor extends TreeScanner {
+
+        @Override
+        public void visitApply(JCMethodInvocation tree) {
+            Symbol method = TreeInfo.symbolFor(tree);
+            if (method != null &&
+                method.owner.getQualifiedName().contentEquals(Assert.class.getName()) &&
+                !method.name.contentEquals("error")) {
+                JCExpression lastParam = tree.args.last();
+                if (lastParam != null &&
+                    lastParam.type.tsym == syms.stringType.tsym &&
+                    lastParam.hasTag(Tag.PLUS)) {
+                    messages.error(tree, "crules.should.not.use.string.concatenation");
+                }
+            }
+
+            super.visitApply(tree);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2013, 2014, 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 crules;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.tree.Tree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.Plugin;
+import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.source.util.TaskListener;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.api.BasicJavacTask;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Log;
+
+public class CodingRulesAnalyzerPlugin implements Plugin {
+
+    protected Log log;
+    protected Trees trees;
+
+    public void init(JavacTask task, String... args) {
+        BasicJavacTask impl = (BasicJavacTask)task;
+        Context context = impl.getContext();
+        log = Log.instance(context);
+        trees = Trees.instance(task);
+        task.addTaskListener(new PostAnalyzeTaskListener(
+                new MutableFieldsAnalyzer(task),
+                new AssertCheckAnalyzer(task)
+        ));
+    }
+
+    public class PostAnalyzeTaskListener implements TaskListener {
+        private final Map<Kind, List<AbstractCodingRulesAnalyzer>> analyzers = new HashMap<>();
+
+        public PostAnalyzeTaskListener(AbstractCodingRulesAnalyzer... analyzers) {
+            for (AbstractCodingRulesAnalyzer analyzer : analyzers) {
+                List<AbstractCodingRulesAnalyzer> currentAnalyzers = this.analyzers.get(analyzer.eventKind);
+
+                if (currentAnalyzers == null) {
+                    this.analyzers.put(analyzer.eventKind, currentAnalyzers = new ArrayList<>());
+                }
+
+                currentAnalyzers.add(analyzer);
+            }
+        }
+
+        @Override
+        public void started(TaskEvent taskEvent) {}
+
+        @Override
+        public void finished(TaskEvent taskEvent) {
+            List<AbstractCodingRulesAnalyzer> currentAnalyzers = this.analyzers.get(taskEvent.getKind());
+
+            if (currentAnalyzers != null) {
+                TypeElement typeElem = taskEvent.getTypeElement();
+                Tree tree = trees.getTree(typeElem);
+                if (tree != null) {
+                    JavaFileObject prevSource = log.currentSourceFile();
+                    try {
+                        log.useSource(taskEvent.getCompilationUnit().getSourceFile());
+                        for (AbstractCodingRulesAnalyzer analyzer : currentAnalyzers) {
+                            analyzer.treeVisitor.scan((JCTree)tree);
+                        }
+                    } finally {
+                        log.useSource(prevSource);
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public String getName() {
+        return "coding_rules";
+    }
+
+}
--- a/langtools/make/tools/crules/MutableFieldsAnalyzer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/tools/crules/MutableFieldsAnalyzer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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,24 +28,25 @@
 import java.util.List;
 import java.util.Map;
 
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent.Kind;
 import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
 import com.sun.tools.javac.tree.TreeScanner;
 
-import static com.sun.source.util.TaskEvent.Kind;
-import static com.sun.tools.javac.code.Flags.*;
-import static com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import static com.sun.tools.javac.code.Flags.ENUM;
+import static com.sun.tools.javac.code.Flags.FINAL;
+import static com.sun.tools.javac.code.Flags.STATIC;
+import static com.sun.tools.javac.code.Flags.SYNTHETIC;
 
 public class MutableFieldsAnalyzer extends AbstractCodingRulesAnalyzer {
 
-    public MutableFieldsAnalyzer() {
+    public MutableFieldsAnalyzer(JavacTask task) {
+        super(task);
         treeVisitor = new MutableFieldsVisitor();
         eventKind = Kind.ANALYZE;
     }
 
-    public String getName() {
-        return "mutable_fields_analyzer";
-    }
-
     private boolean ignoreField(String className, String field) {
         List<String> currentFieldsToIgnore =
                 classFieldsToIgnoreMap.get(className);
@@ -89,7 +90,7 @@
     private static final String packageToCheck = "com.sun.tools.javac";
 
     private static final Map<String, List<String>> classFieldsToIgnoreMap =
-                new HashMap<String, List<String>>();
+                new HashMap<>();
 
     static {
         classFieldsToIgnoreMap.
--- a/langtools/make/tools/crules/resources/crules.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/make/tools/crules/resources/crules.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, 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,3 +26,5 @@
 # 0: symbol
 crules.err.var.must.be.final=\
     Static variable {0} must be final
+crules.should.not.use.string.concatenation=\
+    Should not use string concatenation.
--- a/langtools/src/share/classes/com/sun/tools/javac/code/ClassFinder.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/ClassFinder.java	Fri Aug 08 11:36:48 2014 -0700
@@ -103,6 +103,10 @@
      */
     private final JavaFileManager fileManager;
 
+    /** Dependency tracker
+     */
+    private final Dependencies dependencies;
+
     /** Factory for diagnostics
      */
     JCDiagnostic.Factory diagFactory;
@@ -150,6 +154,7 @@
         names = Names.instance(context);
         syms = Symtab.instance(context);
         fileManager = context.get(JavaFileManager.class);
+        dependencies = Dependencies.instance(context);
         if (fileManager == null)
             throw new AssertionError("FileManager initialization error");
         diagFactory = JCDiagnostic.Factory.instance(context);
@@ -179,18 +184,23 @@
      */
     private void complete(Symbol sym) throws CompletionFailure {
         if (sym.kind == TYP) {
-            ClassSymbol c = (ClassSymbol)sym;
-            c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
-            annotate.enterStart();
             try {
-                completeOwners(c.owner);
-                completeEnclosing(c);
+                ClassSymbol c = (ClassSymbol) sym;
+                dependencies.push(c);
+                c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
+                annotate.enterStart();
+                try {
+                    completeOwners(c.owner);
+                    completeEnclosing(c);
+                } finally {
+                    // The flush needs to happen only after annotations
+                    // are filled in.
+                    annotate.enterDoneWithoutFlush();
+                }
+                fillIn(c);
             } finally {
-                // The flush needs to happen only after annotations
-                // are filled in.
-                annotate.enterDoneWithoutFlush();
+                dependencies.pop();
             }
-            fillIn(c);
         } else if (sym.kind == PCK) {
             PackageSymbol p = (PackageSymbol)sym;
             try {
@@ -257,7 +267,6 @@
                                                         + classfile.toUri());
                     }
                 }
-                return;
             } finally {
                 currentClassFile = previousClassFile;
             }
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Aug 08 11:36:48 2014 -0700
@@ -66,7 +66,7 @@
                 flags &= ~flag.value;
             }
         }
-        Assert.check(flags == 0, "Flags parameter contains unknown flags " + flags);
+        Assert.check(flags == 0);
         return flagSet;
     }
 
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -67,22 +67,19 @@
         private TypePathEntry(TypePathEntryKind tag) {
             Assert.check(tag == TypePathEntryKind.ARRAY ||
                     tag == TypePathEntryKind.INNER_TYPE ||
-                    tag == TypePathEntryKind.WILDCARD,
-                    "Invalid TypePathEntryKind: " + tag);
+                    tag == TypePathEntryKind.WILDCARD);
             this.tag = tag;
             this.arg = 0;
         }
 
         public TypePathEntry(TypePathEntryKind tag, int arg) {
-            Assert.check(tag == TypePathEntryKind.TYPE_ARGUMENT,
-                    "Invalid TypePathEntryKind: " + tag);
+            Assert.check(tag == TypePathEntryKind.TYPE_ARGUMENT);
             this.tag = tag;
             this.arg = arg;
         }
 
         public static TypePathEntry fromBinary(int tag, int arg) {
-            Assert.check(arg == 0 || tag == TypePathEntryKind.TYPE_ARGUMENT.tag,
-                    "Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
+            Assert.check(arg == 0 || tag == TypePathEntryKind.TYPE_ARGUMENT.tag);
             switch (tag) {
             case 0:
                 return ARRAY;
@@ -351,7 +348,7 @@
         Iterator<Integer> iter = list.iterator();
         while (iter.hasNext()) {
             Integer fst = iter.next();
-            Assert.check(iter.hasNext(), "Could not decode type path: " + list);
+            Assert.check(iter.hasNext());
             Integer snd = iter.next();
             loc = loc.append(TypePathEntry.fromBinary(fst, snd));
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Aug 08 11:36:48 2014 -0700
@@ -49,6 +49,7 @@
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.tree.JCTree.JCPolyExpression.*;
 import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.Dependencies.AttributionKind;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
 import static com.sun.tools.javac.code.Flags.*;
@@ -94,6 +95,7 @@
     final Annotate annotate;
     final DeferredLintHandler deferredLintHandler;
     final TypeEnvs typeEnvs;
+    final Dependencies dependencies;
 
     public static Attr instance(Context context) {
         Attr instance = context.get(attrKey);
@@ -123,6 +125,7 @@
         annotate = Annotate.instance(context);
         deferredLintHandler = DeferredLintHandler.instance(context);
         typeEnvs = TypeEnvs.instance(context);
+        dependencies = Dependencies.instance(context);
 
         Options options = Options.instance(context);
 
@@ -254,7 +257,7 @@
      *  @param env    The current environment.
      */
     boolean isAssignableAsBlankFinal(VarSymbol v, Env<AttrContext> env) {
-        Symbol owner = owner(env);
+        Symbol owner = env.info.scope.owner;
            // owner refers to the innermost variable, method or
            // initializer block declaration at this point.
         return
@@ -269,41 +272,6 @@
              ((v.flags() & STATIC) != 0) == Resolve.isStatic(env));
     }
 
-    /**
-     * Return the innermost enclosing owner symbol in a given attribution context
-     */
-    Symbol owner(Env<AttrContext> env) {
-        while (true) {
-            switch (env.tree.getTag()) {
-                case VARDEF:
-                    //a field can be owner
-                    VarSymbol vsym = ((JCVariableDecl)env.tree).sym;
-                    if (vsym.owner.kind == TYP) {
-                        return vsym;
-                    }
-                    break;
-                case METHODDEF:
-                    //method def is always an owner
-                    return ((JCMethodDecl)env.tree).sym;
-                case CLASSDEF:
-                    //class def is always an owner
-                    return ((JCClassDecl)env.tree).sym;
-                case BLOCK:
-                    //static/instance init blocks are owner
-                    Symbol blockSym = env.info.scope.owner;
-                    if ((blockSym.flags() & BLOCK) != 0) {
-                        return blockSym;
-                    }
-                    break;
-                case TOPLEVEL:
-                    //toplevel is always an owner (for pkge decls)
-                    return env.info.scope.owner;
-            }
-            Assert.checkNonNull(env.next);
-            env = env.next;
-        }
-    }
-
     /** Check that variable can be assigned to.
      *  @param pos    The current source code position.
      *  @param v      The assigned varaible
@@ -695,6 +663,7 @@
      */
     void attribTypeVariables(List<JCTypeParameter> typarams, Env<AttrContext> env) {
         for (JCTypeParameter tvar : typarams) {
+            dependencies.push(AttributionKind.TVAR, tvar);
             TypeVar a = (TypeVar)tvar.type;
             a.tsym.flags_field |= UNATTRIBUTED;
             a.bound = Type.noType;
@@ -710,6 +679,7 @@
                 types.setBounds(a, List.of(syms.objectType));
             }
             a.tsym.flags_field &= ~UNATTRIBUTED;
+            dependencies.pop();
         }
         for (JCTypeParameter tvar : typarams) {
             chk.checkNonCyclic(tvar.pos(), (TypeVar)tvar.type);
@@ -3815,7 +3785,7 @@
             // and are subject to definite assignment checking.
             if ((env.info.enclVar == v || v.pos > tree.pos) &&
                 v.owner.kind == TYP &&
-                canOwnInitializer(owner(env)) &&
+                enclosingInitEnv(env) != null &&
                 v.owner == env.info.scope.owner.enclClass() &&
                 ((v.flags() & STATIC) != 0) == Resolve.isStatic(env) &&
                 (!env.tree.hasTag(ASSIGN) ||
@@ -3835,6 +3805,36 @@
         }
 
         /**
+         * Returns the enclosing init environment associated with this env (if any). An init env
+         * can be either a field declaration env or a static/instance initializer env.
+         */
+        Env<AttrContext> enclosingInitEnv(Env<AttrContext> env) {
+            while (true) {
+                switch (env.tree.getTag()) {
+                    case VARDEF:
+                        JCVariableDecl vdecl = (JCVariableDecl)env.tree;
+                        if (vdecl.sym.owner.kind == TYP) {
+                            //field
+                            return env;
+                        }
+                        break;
+                    case BLOCK:
+                        if (env.next.tree.hasTag(CLASSDEF)) {
+                            //instance/static initializer
+                            return env;
+                        }
+                        break;
+                    case METHODDEF:
+                    case CLASSDEF:
+                    case TOPLEVEL:
+                        return null;
+                }
+                Assert.checkNonNull(env.next);
+                env = env.next;
+            }
+        }
+
+        /**
          * Check for illegal references to static members of enum.  In
          * an enum type, constructors and initializers may not
          * reference its static members unless they are constant.
@@ -3887,17 +3887,6 @@
                    v.name != names._class;
         }
 
-        /** Can the given symbol be the owner of code which forms part
-         *  if class initialization? This is the case if the symbol is
-         *  a type or field, or if the symbol is the synthetic method.
-         *  owning a block.
-         */
-        private boolean canOwnInitializer(Symbol sym) {
-            return
-                (sym.kind & (VAR | TYP)) != 0 ||
-                (sym.kind == MTH && (sym.flags() & BLOCK) != 0);
-        }
-
     Warner noteWarner = new Warner();
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Aug 08 11:36:48 2014 -0700
@@ -2765,7 +2765,7 @@
     }
 
     public void validateTypeAnnotation(JCAnnotation a, boolean isTypeParameter) {
-        Assert.checkNonNull(a.type, "annotation tree hasn't been attributed yet: " + a);
+        Assert.checkNonNull(a.type);
         validateAnnotationTree(a);
 
         if (a.hasTag(TYPE_ANNOTATION) &&
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -29,6 +29,7 @@
 import com.sun.tools.javac.tree.JCTree.JCTypeCast;
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.GraphUtils.DottableNode;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.code.*;
@@ -40,9 +41,9 @@
 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph.Node;
 import com.sun.tools.javac.comp.Resolve.InapplicableMethodException;
 import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode;
-import com.sun.tools.javac.util.GraphUtils.TarjanNode;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.EnumSet;
@@ -50,6 +51,7 @@
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import static com.sun.tools.javac.code.TypeTag.*;
@@ -1607,11 +1609,6 @@
         private DependencyKind(String dotSyle) {
             this.dotSyle = dotSyle;
         }
-
-        @Override
-        public String getDotStyle() {
-            return dotSyle;
-        }
     }
 
     /**
@@ -1684,7 +1681,7 @@
              * updates on the structure of the graph this node belongs to (used to
              * keep dependencies in sync).
              */
-            class Node extends GraphUtils.TarjanNode<ListBuffer<Type>> {
+            class Node extends GraphUtils.TarjanNode<ListBuffer<Type>, Node> implements DottableNode<ListBuffer<Type>, Node> {
 
                 /** map listing all dependencies (grouped by kind) */
                 EnumMap<DependencyKind, Set<Node>> deps;
@@ -1699,33 +1696,12 @@
                     return DependencyKind.values();
                 }
 
-                @Override
-                public String getDependencyName(GraphUtils.Node<ListBuffer<Type>> to, GraphUtils.DependencyKind dk) {
-                    if (dk == DependencyKind.STUCK) return "";
-                    else {
-                        StringBuilder buf = new StringBuilder();
-                        String sep = "";
-                        for (Type from : data) {
-                            UndetVar uv = (UndetVar)inferenceContext.asUndetVar(from);
-                            for (Type bound : uv.getBounds(InferenceBound.values())) {
-                                if (bound.containsAny(List.from(to.data))) {
-                                    buf.append(sep);
-                                    buf.append(bound);
-                                    sep = ",";
-                                }
-                            }
-                        }
-                        return buf.toString();
-                    }
-                }
-
-                @Override
                 public Iterable<? extends Node> getAllDependencies() {
                     return getDependencies(DependencyKind.values());
                 }
 
                 @Override
-                public Iterable<? extends TarjanNode<ListBuffer<Type>>> getDependenciesByKind(GraphUtils.DependencyKind dk) {
+                public Collection<? extends Node> getDependenciesByKind(GraphUtils.DependencyKind dk) {
                     return getDependencies((DependencyKind)dk);
                 }
 
@@ -1855,6 +1831,36 @@
                         }
                     }
                 }
+
+                @Override
+                public Properties nodeAttributes() {
+                    Properties p = new Properties();
+                    p.put("label", toString());
+                    return p;
+                }
+
+                @Override
+                public Properties dependencyAttributes(Node sink, GraphUtils.DependencyKind dk) {
+                    Properties p = new Properties();
+                    p.put("style", ((DependencyKind)dk).dotSyle);
+                    if (dk == DependencyKind.STUCK) return p;
+                    else {
+                        StringBuilder buf = new StringBuilder();
+                        String sep = "";
+                        for (Type from : data) {
+                            UndetVar uv = (UndetVar)inferenceContext.asUndetVar(from);
+                            for (Type bound : uv.getBounds(InferenceBound.values())) {
+                                if (bound.containsAny(List.from(sink.data))) {
+                                    buf.append(sep);
+                                    buf.append(bound);
+                                    sep = ",";
+                                }
+                            }
+                        }
+                        p.put("label", buf.toString());
+                    }
+                    return p;
+                }
             }
 
             /** the nodes in the inference graph */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -55,6 +55,7 @@
 import static com.sun.tools.javac.code.TypeTag.TYPEVAR;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
+import com.sun.tools.javac.util.Dependencies.AttributionKind;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
@@ -90,6 +91,7 @@
     private final DeferredLintHandler deferredLintHandler;
     private final Lint lint;
     private final TypeEnvs typeEnvs;
+    private final Dependencies dependencies;
 
     public static MemberEnter instance(Context context) {
         MemberEnter instance = context.get(memberEnterKey);
@@ -116,6 +118,7 @@
         deferredLintHandler = DeferredLintHandler.instance(context);
         lint = Lint.instance(context);
         typeEnvs = TypeEnvs.instance(context);
+        dependencies = Dependencies.instance(context);
         allowTypeAnnos = source.allowTypeAnnotations();
     }
 
@@ -555,6 +558,7 @@
 
     // process the non-static imports and the static imports of types.
     public void visitImport(JCImport tree) {
+        dependencies.push(AttributionKind.IMPORT, tree);
         JCFieldAccess imp = (JCFieldAccess)tree.qualid;
         Name name = TreeInfo.name(imp);
 
@@ -581,6 +585,7 @@
                 importNamed(tree.pos(), c, env);
             }
         }
+        dependencies.pop();
     }
 
     public void visitMethodDef(JCMethodDecl tree) {
@@ -952,6 +957,8 @@
         JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
         DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
         try {
+            dependencies.push(c);
+
             // Save class environment for later member enter (2) processing.
             halfcompleted.append(env);
 
@@ -990,16 +997,21 @@
             Type supertype;
 
             if (tree.extending != null) {
-                supertype = attr.attribBase(tree.extending, baseEnv,
-                                            true, false, true);
-                if (sym.isAnonymous()) {
-                    annotate.annotateAnonClassDefLater(tree.extending,
-                                                       tree.mods.annotations,
-                                                       baseEnv, sym, tree.pos(),
-                                                       annotate.extendsCreator);
-                } else {
-                    annotate.annotateTypeLater(tree.extending, baseEnv, sym,
-                                               tree.pos(), annotate.extendsCreator);
+                dependencies.push(AttributionKind.EXTENDS, tree.extending);
+                try {
+                    supertype = attr.attribBase(tree.extending, baseEnv,
+                            true, false, true);
+                    if (sym.isAnonymous()) {
+                        annotate.annotateAnonClassDefLater(tree.extending,
+                                tree.mods.annotations,
+                                baseEnv, sym, tree.pos(),
+                                annotate.extendsCreator);
+                    } else {
+                        annotate.annotateTypeLater(tree.extending, baseEnv, sym,
+                                tree.pos(), annotate.extendsCreator);
+                    }
+                } finally {
+                    dependencies.pop();
                 }
             } else {
                 supertype = ((tree.mods.flags & Flags.ENUM) != 0)
@@ -1018,29 +1030,34 @@
             List<JCExpression> interfaceTrees = tree.implementing;
             int i = 0;
             for (JCExpression iface : interfaceTrees) {
-                Type it = attr.attribBase(iface, baseEnv, false, true, true);
-                if (it.hasTag(CLASS)) {
-                    interfaces.append(it);
-                    if (all_interfaces != null) all_interfaces.append(it);
-                    chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
-                } else {
-                    if (all_interfaces == null)
-                        all_interfaces = new ListBuffer<Type>().appendList(interfaces);
-                    all_interfaces.append(modelMissingTypes(it, iface, true));
+                dependencies.push(AttributionKind.IMPLEMENTS, iface);
+                try {
+                    Type it = attr.attribBase(iface, baseEnv, false, true, true);
+                    if (it.hasTag(CLASS)) {
+                        interfaces.append(it);
+                        if (all_interfaces != null) all_interfaces.append(it);
+                        chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
+                    } else {
+                        if (all_interfaces == null)
+                            all_interfaces = new ListBuffer<Type>().appendList(interfaces);
+                        all_interfaces.append(modelMissingTypes(it, iface, true));
 
+                    }
+                    if (sym.isAnonymous()) {
+                        // Note: if an anonymous class ever has more than
+                        // one supertype for some reason, this will
+                        // incorrectly attach tree.mods.annotations to ALL
+                        // supertypes, not just the first.
+                        annotate.annotateAnonClassDefLater(iface, tree.mods.annotations,
+                                baseEnv, sym, tree.pos(),
+                                annotate.implementsCreator(i++));
+                    } else {
+                        annotate.annotateTypeLater(iface, baseEnv, sym, tree.pos(),
+                                annotate.implementsCreator(i++));
+                    }
+                } finally {
+                    dependencies.pop();
                 }
-                if (sym.isAnonymous()) {
-                    // Note: if an anonymous class ever has more than
-                    // one supertype for some reason, this will
-                    // incorrectly attach tree.mods.annotations to ALL
-                    // supertypes, not just the first.
-                    annotate.annotateAnonClassDefLater(iface, tree.mods.annotations,
-                                                       baseEnv, sym, tree.pos(),
-                                                       annotate.implementsCreator(i++));
-                } else {
-                    annotate.annotateTypeLater(iface, baseEnv, sym, tree.pos(),
-                                               annotate.implementsCreator(i++));
-            }
             }
 
             if ((c.flags_field & ANNOTATION) != 0) {
@@ -1157,6 +1174,7 @@
         } finally {
             deferredLintHandler.setPos(prevLintPos);
             log.useSource(prev);
+            dependencies.pop();
         }
 
         // Enter all member fields and methods of a set of half completed
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Fri Aug 08 11:36:48 2014 -0700
@@ -488,6 +488,10 @@
                 }
             }
 
+            if (options.isSet("completionDeps")) {
+                Dependencies.GraphDependencies.preRegister(context);
+            }
+
             comp = JavaCompiler.instance(context);
 
             // FIXME: this code will not be invoked if using JavacTask.parse/analyze/generate
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Aug 08 11:36:48 2014 -0700
@@ -749,7 +749,7 @@
      * Leave class public for external testing purposes.
      */
     public static class ComputeAnnotationSet extends
-        ElementScanner8<Set<TypeElement>, Set<TypeElement>> {
+        ElementScanner9<Set<TypeElement>, Set<TypeElement>> {
         final Elements elements;
 
         public ComputeAnnotationSet(Elements elements) {
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Fri Aug 08 11:36:48 2014 -0700
@@ -114,7 +114,7 @@
         if (a.getKind() != ElementKind.ANNOTATION_TYPE)
             throw new IllegalArgumentException(NOT_AN_ANNOTATION_TYPE + a);
 
-        ElementScanner8<Set<Element>, TypeElement> scanner =
+        ElementScanner9<Set<Element>, TypeElement> scanner =
             new AnnotationSetScanner(result);
 
         for (Element element : rootElements)
@@ -125,7 +125,7 @@
 
     // Could be written as a local class inside getElementsAnnotatedWith
     private class AnnotationSetScanner extends
-        ElementScanner8<Set<Element>, TypeElement> {
+        ElementScanner9<Set<Element>, TypeElement> {
         // Insertion-order preserving set
         Set<Element> annotatedElements = new LinkedHashSet<>();
 
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -83,7 +83,7 @@
      * Used for the -Xprint option and called by Elements.printElements
      */
     public static class PrintingElementVisitor
-        extends SimpleElementVisitor8<PrintingElementVisitor, Boolean> {
+        extends SimpleElementVisitor9<PrintingElementVisitor, Boolean> {
         int indentation; // Indentation level;
         final PrintWriter writer;
         final Elements elementUtils;
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Assert.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Assert.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,7 +25,6 @@
 
 package com.sun.tools.javac.util;
 
-
 /**
  * Simple facility for unconditional assertions.
  * The methods in this class are described in terms of equivalent assert
@@ -87,7 +86,7 @@
     }
 
     /** Equivalent to
-     *   assert cond : value;
+     *   assert cond : msg;
      */
     public static void check(boolean cond, String msg) {
         if (!cond)
@@ -103,7 +102,7 @@
     }
 
     /** Equivalent to
-     *   assert (o == null) : value;
+     *   assert (o == null) : msg;
      */
     public static void checkNull(Object o, String msg) {
         if (o != null)
@@ -111,7 +110,7 @@
     }
 
     /** Equivalent to
-     *   assert (o != null) : value;
+     *   assert (o != null) : msg;
      */
     public static <T> T checkNonNull(T t, String msg) {
         if (t == null)
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Fri Aug 08 11:36:48 2014 -0700
@@ -183,7 +183,7 @@
      */
     public void incl(int x) {
         Assert.check(currentState != BitsState.UNKNOWN);
-        Assert.check(x >= 0, "Value of x " + x);
+        Assert.check(x >= 0);
         sizeTo((x >>> wordshift) + 1);
         bits[x >>> wordshift] = bits[x >>> wordshift] |
             (1 << (x & wordmask));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Dependencies.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,559 @@
+/*
+ * Copyright (c) 2014, 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 com.sun.tools.javac.util;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.Completer;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.main.JavaCompiler;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.GraphUtils.DotVisitor;
+import com.sun.tools.javac.util.GraphUtils.NodeVisitor;
+
+import java.io.Closeable;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.tools.JavaFileObject;
+
+/**
+ *  This class is used to track dependencies in the javac symbol completion process.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public abstract class Dependencies {
+
+    protected static final Context.Key<Dependencies> dependenciesKey = new Context.Key<>();
+
+    public static Dependencies instance(Context context) {
+        Dependencies instance = context.get(dependenciesKey);
+        if (instance == null) {
+            //use a do-nothing implementation in case no other implementation has been set by preRegister
+            instance = new DummyDependencies(context);
+        }
+        return instance;
+    }
+
+    Dependencies(Context context) {
+        context.put(dependenciesKey, this);
+    }
+
+    /**
+     * This enum models different kinds of attribution actions triggered during
+     * symbol completion.
+     */
+    public enum AttributionKind {
+        /**
+         * Attribution of superclass (i.e. @{code extends} clause).
+         */
+        EXTENDS {
+            @Override
+            String format(JCTree tree) {
+                return "extends " + super.format(tree);
+            }
+        },
+        /**
+         * Attribution of superinterface (i.e. an type in the @{code interface} clause).
+         */
+        IMPLEMENTS {
+            @Override
+            String format(JCTree tree) {
+                return "implements " + super.format(tree);
+            }
+        },
+        /**
+         * Attribution of an import statement
+         */
+        IMPORT,
+        /**
+         * Attribution of type-variable bound
+         */
+        TVAR {
+            @Override
+            String format(JCTree tree) {
+                return "<" + super.format(tree) + ">";
+            }
+        };
+
+        String format(JCTree tree) {
+            return tree.toString();
+        }
+    }
+
+    /**
+     * Push a new completion node on the stack.
+     */
+    abstract public void push(ClassSymbol s);
+
+    /**
+     * Push a new attribution node on the stack.
+     */
+    abstract public void push(AttributionKind ak, JCTree t);
+
+    /**
+     * Remove current dependency node from the stack.
+     */
+    abstract public void pop();
+
+    /**
+     * This class creates a graph of all dependencies as symbols are completed;
+     * when compilation finishes, the resulting dependecy graph is then dumped
+     * onto a dot file. Several options are provided to customise the output of the graph.
+     */
+    public static class GraphDependencies extends Dependencies implements Closeable, Completer {
+
+        /**
+         * set of enabled dependencies modes
+         */
+        private EnumSet<DependenciesMode> dependenciesModes;
+
+        /**
+         * file in which the dependency graph should be written
+         */
+        private String dependenciesFile;
+
+        /**
+         * Register a Context.Factory to create a Dependencies.
+         */
+        public static void preRegister(final Context context) {
+            context.put(dependenciesKey, new Context.Factory<Dependencies>() {
+                public Dependencies make(Context c) {
+                    Dependencies deps = new GraphDependencies(context);
+                    return deps;
+                }
+            });
+        }
+
+        /**
+         * Build a Dependencies instance.
+         */
+        GraphDependencies(Context context) {
+            super(context);
+            Options options = Options.instance(context);
+            //fetch filename
+            String[] modes = options.get("completionDeps").split(",");
+            for (String mode : modes) {
+                if (mode.startsWith("file=")) {
+                    dependenciesFile = mode.substring(5);
+                }
+            }
+            //parse modes
+            dependenciesModes = DependenciesMode.getDependenciesModes(modes);
+            //add to closeables
+            JavaCompiler compiler = JavaCompiler.instance(context);
+            compiler.closeables = compiler.closeables.prepend(this);
+        }
+
+        enum DependenciesMode {
+            SOURCE("source"),
+            CLASS("class"),
+            REDUNDANT("redundant"),
+            SIDE_EFFECTS("side-effects");
+
+            final String opt;
+
+            private DependenciesMode(String opt) {
+                this.opt = opt;
+            }
+
+            /**
+             * This method is used to parse the {@code completionDeps} option.
+             * Possible modes are separated by colon; a mode can be excluded by
+             * prepending '-' to its name. Finally, the special mode 'all' can be used to
+             * add all modes to the resulting enum.
+             */
+            static EnumSet<DependenciesMode> getDependenciesModes(String[] modes) {
+                EnumSet<DependenciesMode> res = EnumSet.noneOf(DependenciesMode.class);
+                Collection<String> args = Arrays.asList(modes);
+                if (args.contains("all")) {
+                    res = EnumSet.allOf(DependenciesMode.class);
+                }
+                for (DependenciesMode mode : values()) {
+                    if (args.contains(mode.opt)) {
+                        res.add(mode);
+                    } else if (args.contains("-" + mode.opt)) {
+                        res.remove(mode);
+                    }
+                }
+                return res;
+            }
+        }
+
+        /**
+         * Class representing a node in the dependency graph. Nodes are of two main
+         * kinds: (i) symbol nodes, corresponding to symbol completion requests
+         * (either from source or classfile); (ii) attribution nodes, corresponding to
+         * attribution actions triggered during (source) completion.
+         */
+        static abstract class Node extends GraphUtils.AbstractNode<String, Node>
+                implements GraphUtils.DottableNode<String, Node> {
+
+            /**
+             * Model the dependencies between nodes.
+             */
+            enum DependencyKind implements GraphUtils.DependencyKind {
+                /**
+                 * standard dependency - i.e. completion of the source node depends
+                 * on completion of the sink node.
+                 */
+                REQUIRES("solid"),
+                /**
+                 * soft dependencies - i.e. completion of the source node depends
+                 * on side-effects of the source node. These dependencies are meant
+                 * to capture the order in which javac processes all dependants of a given node.
+                 */
+                SIDE_EFFECTS("dashed");
+
+                final String dotStyle;
+
+                DependencyKind(String dotStyle) {
+                    this.dotStyle = dotStyle;
+                }
+            }
+
+            /**
+             * dependant nodes grouped by kind
+             */
+            EnumMap<DependencyKind, List<Node>> depsByKind;
+
+            Node(String value) {
+                super(value);
+                this.depsByKind = new EnumMap<>(DependencyKind.class);
+                for (DependencyKind depKind : DependencyKind.values()) {
+                    depsByKind.put(depKind, new ArrayList<Node>());
+                }
+            }
+
+            void addDependency(DependencyKind depKind, Node dep) {
+                List<Node> deps = depsByKind.get(depKind);
+                if (!deps.contains(dep)) {
+                    deps.add(dep);
+                }
+            }
+
+            @Override
+            public boolean equals(Object obj) {
+                return obj instanceof Node &&
+                        data.equals(((Node) obj).data);
+            }
+
+            @Override
+            public int hashCode() {
+                return data.hashCode();
+            }
+
+            @Override
+            public GraphUtils.DependencyKind[] getSupportedDependencyKinds() {
+                return DependencyKind.values();
+            }
+
+            @Override
+            public java.util.Collection<? extends Node> getDependenciesByKind(GraphUtils.DependencyKind dk) {
+                List<Node> deps = depsByKind.get(dk);
+                if (dk == DependencyKind.REQUIRES) {
+                    return deps;
+                } else {
+                    Set<Node> temp = new HashSet<>(deps);
+                    temp.removeAll(depsByKind.get(DependencyKind.REQUIRES));
+                    return temp;
+                }
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = new Properties();
+                p.put("label", DotVisitor.wrap(toString()));
+                return p;
+            }
+
+            @Override
+            public Properties dependencyAttributes(Node to, GraphUtils.DependencyKind dk) {
+                Properties p = new Properties();
+                p.put("style", ((DependencyKind) dk).dotStyle);
+                return p;
+            }
+        }
+
+        /**
+         * This is a dependency node used to model symbol completion requests.
+         * Completion requests can come from either source or class.
+         */
+        static class CompletionNode extends Node {
+
+            /**
+             * Completion kind (source vs. classfile)
+             */
+            enum Kind {
+                /**
+                 * Source completion request
+                 */
+                SOURCE("solid"),
+                /**
+                 * Classfile completion request
+                 */
+                CLASS("dotted");
+
+                final String dotStyle;
+
+                Kind(String dotStyle) {
+                    this.dotStyle = dotStyle;
+                }
+            }
+
+            final Kind ck;
+
+            CompletionNode(ClassSymbol sym) {
+                super(sym.getQualifiedName().toString());
+                //infer completion kind by looking at the symbol fields
+                boolean fromClass = (sym.classfile == null && sym.sourcefile == null) ||
+                        (sym.classfile != null && sym.classfile.getKind() == JavaFileObject.Kind.CLASS);
+                ck = fromClass ?
+                        CompletionNode.Kind.CLASS :
+                        CompletionNode.Kind.SOURCE;
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = super.nodeAttributes();
+                p.put("style", ck.dotStyle);
+                p.put("shape", "ellipse");
+                return p;
+            }
+        }
+
+        /**
+         * This is a dependency node used to model attribution actions triggered during
+         * source symbol completion. The possible kinds of attribution actions are
+         * captured in {@link AttributionNode}.
+         */
+        static class AttributionNode extends Node {
+
+            AttributionNode(AttributionKind ak, JCTree tree) {
+                super(ak.format(tree));
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = super.nodeAttributes();
+                p.put("shape", "box");
+                p.put("style", "solid");
+                return p;
+            }
+        }
+
+        /**
+         * stack of dependency nodes currently being processed
+         */
+        Stack<Node> nodeStack = new Stack<>();
+
+        /**
+         * map containing all dependency nodes seen so far
+         */
+        Map<String, Node> dependencyNodeMap = new LinkedHashMap<>();
+
+        @Override
+        public void push(ClassSymbol s) {
+            Node n = new CompletionNode(s);
+            if (n == push(n)) {
+                s.completer = this;
+            }
+        }
+
+        @Override
+        public void push(AttributionKind ak, JCTree t) {
+            push(new AttributionNode(ak, t));
+        }
+
+        /**
+         * Push a new dependency on the stack.
+         */
+        protected Node push(Node newNode) {
+            Node cachedNode = dependencyNodeMap.get(newNode.data);
+            if (cachedNode == null) {
+                dependencyNodeMap.put(newNode.data, newNode);
+            } else {
+                newNode = cachedNode;
+            }
+            if (!nodeStack.isEmpty()) {
+                Node currentNode = nodeStack.peek();
+                currentNode.addDependency(Node.DependencyKind.REQUIRES, newNode);
+            }
+            nodeStack.push(newNode);
+            return newNode;
+        }
+
+        @Override
+        public void pop() {
+            nodeStack.pop();
+        }
+
+        @Override
+        public void close() throws IOException {
+            if (dependenciesFile != null) {
+                if (!dependenciesModes.contains(DependenciesMode.REDUNDANT)) {
+                    //prune spurious edges
+                    new PruneVisitor().visit(dependencyNodeMap.values(), null);
+                }
+                if (!dependenciesModes.contains(DependenciesMode.CLASS)) {
+                    //filter class completions
+                    new FilterVisitor(CompletionNode.Kind.SOURCE).visit(dependencyNodeMap.values(), null);
+                }
+                if (!dependenciesModes.contains(DependenciesMode.SOURCE)) {
+                    //filter source completions
+                    new FilterVisitor(CompletionNode.Kind.CLASS).visit(dependencyNodeMap.values(), null);
+                }
+                if (dependenciesModes.contains(DependenciesMode.SIDE_EFFECTS)) {
+                    //add side-effects edges
+                    new SideEffectVisitor().visit(dependencyNodeMap.values(), null);
+                }
+                //write to file
+                try (FileWriter fw = new FileWriter(dependenciesFile)) {
+                    fw.append(GraphUtils.toDot(dependencyNodeMap.values(), "CompletionDeps", ""));
+                }
+            }
+        }
+
+        @Override
+        public void complete(Symbol sym) throws CompletionFailure {
+            push((ClassSymbol) sym);
+            pop();
+            sym.completer = this;
+        }
+
+        /**
+         * This visitor is used to generate the special side-effect dependencies
+         * given a graph containing only standard dependencies.
+         */
+        private static class SideEffectVisitor extends NodeVisitor<String, Node, Void> {
+            @Override
+            public void visitNode(Node node, Void arg) {
+                //do nothing
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                //if we are adding multiple dependencies to same node
+                //make order explicit via special 'side-effect' dependencies
+                List<Node> deps = from.depsByKind.get(dk);
+                int pos = deps.indexOf(to);
+                if (dk == Node.DependencyKind.REQUIRES && pos > 0) {
+                    to.addDependency(Node.DependencyKind.SIDE_EFFECTS, deps.get(pos - 1));
+                }
+            }
+        }
+
+        /**
+         * This visitor is used to prune the graph from spurious edges using some heuristics.
+         */
+        private static class PruneVisitor extends NodeVisitor<String, Node, Void> {
+            @Override
+            public void visitNode(Node node, Void arg) {
+                //do nothing
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                //heuristic - skips dependencies that are likely to be fake
+                if (from.equals(to) ||
+                        from.depsByKind.get(Node.DependencyKind.REQUIRES).contains(to)) {
+                    to.depsByKind.get(dk).remove(from);
+                }
+            }
+        }
+
+        /**
+         * This visitor is used to retain only completion nodes with given kind.
+         */
+        private class FilterVisitor extends NodeVisitor<String, Node, Void> {
+
+            CompletionNode.Kind ck;
+
+            private FilterVisitor(CompletionNode.Kind ck) {
+                this.ck = ck;
+            }
+
+            @Override
+            public void visitNode(Node node, Void arg) {
+                if (node instanceof CompletionNode) {
+                    if (((CompletionNode) node).ck != ck) {
+                        dependencyNodeMap.remove(node.data);
+                    }
+                }
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                if (to instanceof CompletionNode) {
+                    if (((CompletionNode) to).ck != ck) {
+                        from.depsByKind.get(dk).remove(to);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Dummy class to be used when dependencies options are not set. This keeps
+     * performance cost of calling push/pop methods during completion marginally low.
+     */
+    private static class DummyDependencies extends Dependencies {
+
+        private DummyDependencies(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void push(ClassSymbol s) {
+            //do nothing
+        }
+
+        @Override
+        public void push(AttributionKind ak, JCTree t) {
+            //do nothing
+        }
+
+        @Override
+        public void pop() {
+            //do nothing
+        }
+    }
+}
--- a/langtools/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,6 +25,10 @@
 
 package com.sun.tools.javac.util;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Properties;
+
 /** <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
@@ -33,25 +37,65 @@
 public class GraphUtils {
 
     /**
-     * Basic interface for defining various dependency kinds. All dependency kinds
-     * must at least support basic capabilities to tell the DOT engine how to render them.
+     * Basic interface for defining various dependency kinds.
+     */
+    public interface DependencyKind { }
+
+    /**
+     * Common superinterfaces to all graph nodes.
      */
-    public interface DependencyKind {
+    public interface Node<D, N extends Node<D, N>> {
+        /**
+         * visitor method.
+         */
+        <A> void accept(NodeVisitor<D, N, A> visitor, A arg);
+    }
+
+    /**
+     * Visitor for graph nodes.
+     */
+    static abstract class NodeVisitor<D, N extends Node<D, N>, A> {
+        /**
+         * Visitor action for nodes.
+         */
+        public abstract void visitNode(N node, A arg);
         /**
-         * Returns the DOT representation (to be used in a {@code style} attribute
-         * that's most suited for this dependency kind.
+         * Visitor action for a dependency between 'from' and 'to' with given kind.
+         */
+        public abstract void visitDependency(DependencyKind dk, N from, N to, A arg);
+
+        /**
+         * Visitor entry point.
          */
-        String getDotStyle();
+        public void visit(Collection<? extends N> nodes, A arg) {
+            for (N n : new ArrayList<>(nodes)) {
+                n.accept(this, arg);
+            }
+        }
+    }
+
+    /**
+     * Optional interface for nodes supporting dot-based representation.
+     */
+    public interface DottableNode<D, N extends DottableNode<D, N>> extends Node<D, N> {
+        /**
+         * Retrieves the set of dot attributes associated with the node.
+         */
+        Properties nodeAttributes();
+        /**
+         * Retrieves the set of dot attributes associated with a given dependency.
+         */
+        Properties dependencyAttributes(N to, DependencyKind dk);
     }
 
     /**
      * This class is a basic abstract class for representing a node.
      * A node is associated with a given data.
      */
-    public static abstract class Node<D> {
+    public static abstract class AbstractNode<D, N extends AbstractNode<D, N>> implements Node<D, N> {
         public final D data;
 
-        public Node(D data) {
+        public AbstractNode(D data) {
             this.data = data;
         }
 
@@ -61,26 +105,32 @@
         public abstract DependencyKind[] getSupportedDependencyKinds();
 
         /**
-         * Get all dependencies, regardless of their kind.
+         * Get all dependencies of a given kind
          */
-        public abstract Iterable<? extends Node<D>> getAllDependencies();
-
-        /**
-         * Get a name for the dependency (of given kind) linking this node to a given node
-         */
-        public abstract String getDependencyName(Node<D> to, DependencyKind dk);
+        public abstract Collection<? extends N> getDependenciesByKind(DependencyKind dk);
 
         @Override
         public String toString() {
             return data.toString();
         }
+
+        @SuppressWarnings("unchecked")
+        public <A> void accept(NodeVisitor<D, N, A> visitor, A arg) {
+            visitor.visitNode((N)this, arg);
+            for (DependencyKind dk : getSupportedDependencyKinds()) {
+                for (N dep : new ArrayList<>(getDependenciesByKind(dk))) {
+                    visitor.visitDependency(dk, (N)this, dep, arg);
+                }
+            }
+        }
     }
 
     /**
      * This class specialized Node, by adding elements that are required in order
      * to perform Tarjan computation of strongly connected components.
      */
-    public static abstract class TarjanNode<D> extends Node<D> implements Comparable<TarjanNode<D>> {
+    public static abstract class TarjanNode<D, N extends TarjanNode<D, N>> extends AbstractNode<D, N>
+            implements Comparable<N> {
         int index = -1;
         int lowlink;
         boolean active;
@@ -89,11 +139,9 @@
             super(data);
         }
 
-        public abstract Iterable<? extends TarjanNode<D>> getAllDependencies();
+        public abstract Iterable<? extends N> getAllDependencies();
 
-        public abstract Iterable<? extends TarjanNode<D>> getDependenciesByKind(DependencyKind dk);
-
-        public int compareTo(TarjanNode<D> o) {
+        public int compareTo(N o) {
             return (index < o.index) ? -1 : (index == o.index) ? 0 : 1;
         }
     }
@@ -102,7 +150,7 @@
      * Tarjan's algorithm to determine strongly connected components of a
      * directed graph in linear time. Works on TarjanNode.
      */
-    public static <D, N extends TarjanNode<D>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes) {
+    public static <D, N extends TarjanNode<D, N>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes) {
         ListBuffer<List<N>> cycles = new ListBuffer<>();
         ListBuffer<N> stack = new ListBuffer<>();
         int index = 0;
@@ -114,15 +162,13 @@
         return cycles.toList();
     }
 
-    private static <D, N extends TarjanNode<D>> int tarjan(N v, int index, ListBuffer<N> stack, ListBuffer<List<N>> cycles) {
+    private static <D, N extends TarjanNode<D, N>> int tarjan(N v, int index, ListBuffer<N> stack, ListBuffer<List<N>> cycles) {
         v.index = index;
         v.lowlink = index;
         index++;
         stack.prepend(v);
         v.active = true;
-        for (TarjanNode<D> nd: v.getAllDependencies()) {
-            @SuppressWarnings("unchecked")
-            N n = (N)nd;
+        for (N n: v.getAllDependencies()) {
             if (n.index == -1) {
                 tarjan(n, index, stack, cycles);
                 v.lowlink = Math.min(v.lowlink, n.lowlink);
@@ -149,24 +195,45 @@
      * and {@code Node.printDependency} to display edge labels. The resulting
      * representation is also customizable with a graph name and a header.
      */
-    public static <D> String toDot(Iterable<? extends TarjanNode<D>> nodes, String name, String header) {
+    public static <D, N extends DottableNode<D, N>> String toDot(Collection<? extends N> nodes, String name, String header) {
         StringBuilder buf = new StringBuilder();
         buf.append(String.format("digraph %s {\n", name));
-        buf.append(String.format("label = \"%s\";\n", header));
-        //dump nodes
-        for (TarjanNode<D> n : nodes) {
-            buf.append(String.format("%s [label = \"%s\"];\n", n.hashCode(), n.toString()));
-        }
-        //dump arcs
-        for (TarjanNode<D> from : nodes) {
-            for (DependencyKind dk : from.getSupportedDependencyKinds()) {
-                for (TarjanNode<D> to : from.getDependenciesByKind(dk)) {
-                    buf.append(String.format("%s -> %s [label = \" %s \" style = %s ];\n",
-                            from.hashCode(), to.hashCode(), from.getDependencyName(to, dk), dk.getDotStyle()));
-                }
-            }
-        }
+        buf.append(String.format("label = %s;\n", DotVisitor.wrap(header)));
+        DotVisitor<D, N> dotVisitor = new DotVisitor<>();
+        dotVisitor.visit(nodes, buf);
         buf.append("}\n");
         return buf.toString();
     }
+
+    /**
+     * This visitor is used to dump the contents of a set of nodes of type {@link DottableNode}
+     * onto a string builder.
+     */
+    public static class DotVisitor<D, N extends DottableNode<D, N>> extends NodeVisitor<D, N, StringBuilder> {
+
+        @Override
+        public void visitDependency(DependencyKind dk, N from, N to, StringBuilder buf) {
+            buf.append(String.format("%s -> %s", from.hashCode(), to.hashCode()));
+            buf.append(formatProperties(from.dependencyAttributes(to, dk)));
+            buf.append('\n');
+        }
+
+        @Override
+        public void visitNode(N node, StringBuilder buf) {
+            buf.append(String.format("%s ", node.hashCode()));
+            buf.append(formatProperties(node.nodeAttributes()));
+            buf.append('\n');
+        }
+
+        protected String formatProperties(Properties p) {
+            return p.toString().replaceAll(",", " ")
+                .replaceAll("\\{", "[")
+                .replaceAll("\\}", "]");
+        }
+
+        protected static String wrap(String s) {
+            String res = "\"" + s + "\"";
+            return res.replaceAll("\n", "");
+        }
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -60,7 +60,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 import javax.lang.model.util.Types;
 
 import javax.tools.Diagnostic;
@@ -738,7 +738,7 @@
         }
 
         private TypeVisitor<Void,Types> checkMethodParametersVisitor =
-                new SimpleTypeVisitor8<Void,Types>() {
+                new SimpleTypeVisitor9<Void,Types>() {
             @Override
             public Void visitArray(ArrayType t, Types types) {
                 visit(t.getComponentType(), types);
--- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -45,7 +45,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 
 /*
  * <p><b>This is NOT part of any supported API.
@@ -628,7 +628,7 @@
     }
 
     protected final boolean isLongOrDouble(TypeMirror t) {
-        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor8<Boolean,Void>() {
+        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor9<Boolean,Void>() {
             public Boolean defaultAction(TypeMirror t, Void p){
                 return false;
             }
--- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -38,7 +38,7 @@
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 
 /**
  * Returns internal type signature.
@@ -248,7 +248,7 @@
 
 
     String qualifiedTypeName(TypeMirror type) {
-        TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
+        TypeVisitor<Name, Void> v = new SimpleTypeVisitor9<Name, Void>() {
             @Override
             public Name visitArray(ArrayType t, Void p) {
                 return t.getComponentType().accept(this, p);
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Fri Aug 08 11:36:48 2014 -0700
@@ -575,6 +575,9 @@
                 }
                 reportError("err.ioerror", className, msg);
                 result = EXIT_ERROR;
+            } catch (OutOfMemoryError e) {
+                reportError("err.nomem");
+                result = EXIT_ERROR;
             } catch (Throwable t) {
                 StringWriter sw = new StringWriter();
                 PrintWriter pw = new PrintWriter(sw);
--- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -18,6 +18,7 @@
 err.no.SourceFile.attribute=no SourceFile attribute
 err.source.file.not.found=source file not found
 err.bad.innerclasses.attribute=bad InnerClasses attribute for {0}
+err.nomem=Insufficient memory. To increase memory use -J-Xmx option.
 
 main.usage.summary=\
 Usage: {0} <options> <classes>\n\
--- a/langtools/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Fri Aug 08 11:36:48 2014 -0700
@@ -24,8 +24,6 @@
  */
 package com.sun.tools.jdeps;
 
-import com.sun.tools.classfile.Dependency.Location;
-import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -33,6 +31,10 @@
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
+import java.util.stream.Collectors;
+
+import com.sun.tools.classfile.Dependency.Location;
+import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 
 /**
  * Dependency Analyzer.
@@ -110,6 +112,13 @@
         return false;
     }
 
+    public Set<String> dependences(Archive source) {
+        ArchiveDeps result = results.get(source);
+        return result.dependencies().stream()
+                     .map(Dep::target)
+                     .collect(Collectors.toSet());
+    }
+
     public interface Visitor {
         /**
          * Visits a recorded dependency from origin to target which can be
--- a/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Fri Aug 08 11:36:48 2014 -0700
@@ -236,6 +236,11 @@
                 task.options.showLabel = true;
             }
         },
+        new HiddenOption(false, "-q", "-quiet") {
+            void process(JdepsTask task, String opt, String arg) {
+                task.options.nowarning = true;
+            }
+        },
         new HiddenOption(true, "-depth") {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
                 try {
@@ -320,7 +325,9 @@
 
         Analyzer analyzer = new Analyzer(options.verbose, new Analyzer.Filter() {
             @Override
-            public boolean accepts(Location origin, Archive originArchive, Location target, Archive targetArchive) {
+            public boolean accepts(Location origin, Archive originArchive,
+                                   Location target, Archive targetArchive)
+            {
                 if (options.findJDKInternals) {
                     // accepts target that is JDK class but not exported
                     return isJDKArchive(targetArchive) &&
@@ -344,6 +351,10 @@
         } else {
             printRawOutput(log, analyzer);
         }
+
+        if (options.findJDKInternals && !options.nowarning) {
+            showReplacements(analyzer);
+        }
         return true;
     }
 
@@ -693,6 +704,7 @@
         boolean apiOnly;
         boolean showLabel;
         boolean findJDKInternals;
+        boolean nowarning;
         // default is to show package-level dependencies
         // and filter references from same package
         Analyzer.Type verbose = PACKAGE;
@@ -709,6 +721,7 @@
     private static class ResourceBundleHelper {
         static final ResourceBundle versionRB;
         static final ResourceBundle bundle;
+        static final ResourceBundle jdkinternals;
 
         static {
             Locale locale = Locale.getDefault();
@@ -722,6 +735,11 @@
             } catch (MissingResourceException e) {
                 throw new InternalError("version.resource.missing");
             }
+            try {
+                jdkinternals = ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdkinternals");
+            } catch (MissingResourceException e) {
+                throw new InternalError("Cannot find jdkinternals resource bundle");
+            }
         }
     }
 
@@ -928,4 +946,50 @@
         }
         return Profile.getProfile(pn);
     }
+
+    /**
+     * Returns the recommended replacement API for the given classname;
+     * or return null if replacement API is not known.
+     */
+    private String replacementFor(String cn) {
+        String name = cn;
+        String value = null;
+        while (value == null && name != null) {
+            try {
+                value = ResourceBundleHelper.jdkinternals.getString(name);
+            } catch (MissingResourceException e) {
+                // go up one subpackage level
+                int i = name.lastIndexOf('.');
+                name = i > 0 ? name.substring(0, i) : null;
+            }
+        }
+        return value;
+    };
+
+    private void showReplacements(Analyzer analyzer) {
+        Map<String,String> jdkinternals = new TreeMap<>();
+        boolean useInternals = false;
+        for (Archive source : sourceLocations) {
+            useInternals = useInternals || analyzer.hasDependences(source);
+            for (String cn : analyzer.dependences(source)) {
+                String repl = replacementFor(cn);
+                if (repl != null) {
+                    jdkinternals.putIfAbsent(cn, repl);
+                }
+            }
+        }
+        if (useInternals) {
+            log.println();
+            warning("warn.replace.useJDKInternals", getMessage("jdeps.wiki.url"));
+        }
+        if (!jdkinternals.isEmpty()) {
+            log.println();
+            log.format("%-40s %s%n", "JDK Internal API", "Suggested Replacement");
+            log.format("%-40s %s%n", "----------------", "---------------------");
+            for (Map.Entry<String,String> e : jdkinternals.entrySet()) {
+                log.format("%-40s %s%n", e.getKey(), e.getValue());
+            }
+        }
+
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -93,5 +93,12 @@
 err.invalid.path=invalid path: {0}
 warn.invalid.arg=Invalid classname or pathname not exist: {0}
 warn.split.package=package {0} defined in {1} {2}
+warn.replace.useJDKInternals=\
+JDK internal APIs are unsupported and private to JDK implementation that are\n\
+subject to be removed or changed incompatibly and could break your application.\n\
+Please modify your code to eliminate dependency on any JDK internal APIs.\n\
+For the most recent update on JDK internal API replacements, please check:\n\
+{0}
 
 artifact.not.found=not found
+jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,22 @@
+// No translation needed
+com.sun.crypto.provider.SunJCE=Use java.security.Security.getProvider(provider-name) @since 1.3
+com.sun.image.codec=Use javax.imageio @since 1.4
+com.sun.org.apache.xml.internal.security=Use java.xml.crypto @since 1.6
+com.sun.org.apache.xml.internal.security.utils.Base64=Use java.util.Base64 @since 1.8
+com.sun.net.ssl=Use javax.net.ssl @since 1.4
+com.sun.net.ssl.internal.ssl.Provider=Use java.security.Security.getProvider(provider-name) @since 1.3
+com.sun.rowset=Use javax.sql.rowset.RowSetProvider @since 1.7
+com.sun.tools.javac.tree=Use com.sun.source @since 1.6
+com.sun.tools.javac=Use javax.tools and javax.lang.model @since 1.6
+sun.awt.image.codec=Use javax.imageio @since 1.4
+sun.misc.BASE64Encoder=Use java.util.Base64 @since 1.8
+sun.misc.BASE64Decoder=Use java.util.Base64 @since 1.8
+sun.misc.Cleaner=Use java.lang.ref.PhantomReference @since 1.2
+sun.misc.Service=Use java.util.ServiceLoader @since 1.6
+sun.security.action=Use java.security.PrivilegedAction @since 1.1
+sun.security.krb5=Use com.sun.security.jgss
+sun.security.provider.PolicyFile=Use java.security.Policy.getInstance("JavaPolicy", new URIParameter(uri)) @since 1.6
+sun.security.provider.Sun=Use java.security.Security.getProvider(provider-name) @since 1.3
+sun.security.util.SecurityConstants=Use appropriate java.security.Permission subclass @since 1.1
+sun.security.x509.X500Name=Use javax.security.auth.x500.X500Principal @since 1.4
+sun.tools.jar=Use java.util.jar or jar tool @since 1.2
--- a/langtools/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -32,7 +32,7 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementScanner6;
+import javax.lang.model.util.ElementScanner9;
 
 /** Utility class that constructs a textual representation
  * of the public api of a class.
@@ -42,7 +42,7 @@
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
  */
-public class PubapiVisitor extends ElementScanner6<Void, Void> {
+public class PubapiVisitor extends ElementScanner9<Void, Void> {
 
     StringBuffer sb;
     // Important that it is 1! Part of protocol over wire, silly yes.
--- a/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -73,8 +73,6 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
- * @see AbstractElementVisitor6
- * @see AbstractElementVisitor7
  * @since 1.6
  */
 public interface ElementVisitor<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -72,8 +72,12 @@
  *
  * @see AbstractAnnotationValueVisitor7
  * @see AbstractAnnotationValueVisitor8
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractAnnotationValueVisitor6<R, P>
     implements AnnotationValueVisitor<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -65,8 +65,10 @@
  *
  * @see AbstractAnnotationValueVisitor6
  * @see AbstractAnnotationValueVisitor8
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {
 
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -65,6 +65,7 @@
  *
  * @see AbstractAnnotationValueVisitor6
  * @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
+
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractAnnotationValueVisitor9() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -74,8 +74,12 @@
  *
  * @see AbstractElementVisitor7
  * @see AbstractElementVisitor8
+ * @see AbstractElementVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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,8 +69,10 @@
  *
  * @see AbstractElementVisitor6
  * @see AbstractElementVisitor8
+ * @see AbstractElementVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractElementVisitor7<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,6 +69,7 @@
  *
  * @see AbstractElementVisitor6
  * @see AbstractElementVisitor7
+ * @see AbstractElementVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
+ * @see AbstractElementVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractElementVisitor9(){
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_6 RELEASE_6}
@@ -70,8 +73,13 @@
  *
  * @see AbstractTypeVisitor7
  * @see AbstractTypeVisitor8
+ * @see AbstractTypeVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
+@SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_7 RELEASE_7}
@@ -66,8 +69,11 @@
  *
  * @see AbstractTypeVisitor6
  * @see AbstractTypeVisitor8
+ * @see AbstractTypeVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
+@SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}
@@ -66,8 +69,10 @@
  *
  * @see AbstractTypeVisitor6
  * @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor9
  * @since 1.8
  */
+@SupportedSourceVersion(RELEASE_8)
 public abstract class AbstractTypeVisitor8<R, P> extends AbstractTypeVisitor7<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.type.*;
+
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the {@link javax.lang.model.SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractTypeVisitor9<R, P> extends AbstractTypeVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractTypeVisitor9() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -88,8 +88,12 @@
  *
  * @see ElementKindVisitor7
  * @see ElementKindVisitor8
+ * @see ElementKindVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class ElementKindVisitor6<R, P>
                   extends SimpleElementVisitor6<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -82,8 +82,10 @@
  *
  * @see ElementKindVisitor6
  * @see ElementKindVisitor8
+ * @see ElementKindVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -82,6 +82,7 @@
  *
  * @see ElementKindVisitor6
  * @see ElementKindVisitor7
+ * @see ElementKindVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of program elements based on their {@linkplain
+ * ElementKind kind} with default behavior appropriate for the {@link
+ * SourceVersion#RELEASE_9 RELEASE_9} source version.  For {@linkplain
+ * Element elements} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java&trade; programming language.  Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @see ElementKindVisitor7
+ * @see ElementKindVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementKindVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected ElementKindVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -90,8 +90,12 @@
  *
  * @see ElementScanner7
  * @see ElementScanner8
+ * @see ElementScanner9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -86,8 +86,10 @@
  *
  * @see ElementScanner6
  * @see ElementScanner8
+ * @see ElementScanner9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -86,6 +86,7 @@
  *
  * @see ElementScanner6
  * @see ElementScanner7
+ * @see ElementScanner9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.  The <tt>visit<i>XYZ</i></tt> methods in this
+ * class scan their component elements by calling {@code scan} on
+ * their {@linkplain Element#getEnclosedElements enclosed elements},
+ * {@linkplain ExecutableElement#getParameters parameters}, etc., as
+ * indicated in the individual method specifications.  A subclass can
+ * control the order elements are visited by overriding the
+ * <tt>visit<i>XYZ</i></tt> methods.  Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling <tt>super.visit<i>XYZ</i></tt>.  In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
+ * methods will yield a preorder traversal, etc.  If the component
+ * elements should be traversed in some other order, instead of
+ * calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementScanner6
+ * @see ElementScanner7
+ * @see ElementScanner8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class ElementScanner9<R, P> extends ElementScanner8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementScanner9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the default value
+     */
+    protected ElementScanner9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -81,8 +81,12 @@
  *
  * @see SimpleAnnotationValueVisitor7
  * @see SimpleAnnotationValueVisitor8
+ * @see SimpleAnnotationValueVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleAnnotationValueVisitor6<R, P>
     extends AbstractAnnotationValueVisitor6<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -72,8 +72,10 @@
  *
  * @see SimpleAnnotationValueVisitor6
  * @see SimpleAnnotationValueVisitor8
+ * @see SimpleAnnotationValueVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -72,6 +72,7 @@
  *
  * @see SimpleAnnotationValueVisitor6
  * @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.  Visit methods call {@link #defaultAction
+ * defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleAnnotationValueVisitor9<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleAnnotationValueVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleAnnotationValueVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -85,8 +85,12 @@
  *
  * @see SimpleElementVisitor7
  * @see SimpleElementVisitor8
+ * @see SimpleElementVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -78,8 +78,10 @@
  *
  * @see SimpleElementVisitor6
  * @see SimpleElementVisitor8
+ * @see SimpleElementVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleElementVisitor7<R, P> extends SimpleElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -34,7 +34,7 @@
  * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
  * source version.
  *
- * Visit methods corresponding to {@code RELEASE_7} and earlier
+ * Visit methods corresponding to {@code RELEASE_8} and earlier
  * language constructs call {@link #defaultAction defaultAction},
  * passing their arguments to {@code defaultAction}'s corresponding
  * parameters.
@@ -77,6 +77,7 @@
  *
  * @see SimpleElementVisitor6
  * @see SimpleElementVisitor7
+ * @see SimpleElementVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_9} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@code Void}
+ *             for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
+ *              for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @see SimpleElementVisitor7
+ * @see SimpleElementVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleElementVisitor9<R, P> extends SimpleElementVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleElementVisitor9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleElementVisitor9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -85,8 +85,12 @@
  *
  * @see SimpleTypeVisitor7
  * @see SimpleTypeVisitor8
+ * @see SimpleTypeVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -78,8 +78,10 @@
  *
  * @see SimpleTypeVisitor6
  * @see SimpleTypeVisitor8
+ * @see SimpleTypeVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,7 +32,7 @@
 
 /**
  * A simple visitor of types with default behavior appropriate for the
- * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
+ * {@link SourceVersion#RELEASE_8 RELEASE_8} source version.
  *
  * Visit methods corresponding to {@code RELEASE_8} and earlier
  * language constructs call {@link #defaultAction defaultAction},
@@ -78,6 +78,7 @@
  *
  * @see SimpleTypeVisitor6
  * @see SimpleTypeVisitor7
+ * @see SimpleTypeVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.type.IntersectionType;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@link SourceVersion#RELEASE_9 RELEASE_9} source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_9} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @see SimpleTypeVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleTypeVisitor9<R, P> extends SimpleTypeVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleTypeVisitor9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleTypeVisitor9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Fri Aug 08 11:36:48 2014 -0700
@@ -85,7 +85,10 @@
  * @see TypeKindVisitor7
  * @see TypeKindVisitor8
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class TypeKindVisitor6<R, P> extends SimpleTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -82,6 +82,7 @@
  * @see TypeKindVisitor8
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor9.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2011, 2014, 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 javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.type.*;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@link SourceVersion#RELEASE_9
+ * RELEASE_9} source version.  For {@linkplain
+ * TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question.  When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @see TypeKindVisitor7
+ * @see TypeKindVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call; uses {@code null}
+     * for the default value.
+     */
+    protected TypeKindVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses to call; uses the argument
+     * for the default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected TypeKindVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -138,7 +138,7 @@
     public SourceVersion getSupportedSourceVersion() {
         /*
          * Return latest source version instead of a fixed version
-         * like RELEASE_8.  To return a fixed version, this class
+         * like RELEASE_9.  To return a fixed version, this class
          * could be annotated with a SupportedSourceVersion
          * annotation.
          *
@@ -192,7 +192,7 @@
         /**
          * Visitor to implement name checks.
          */
-        private class NameCheckScanner extends ElementScanner8<Void, Void> {
+        private class NameCheckScanner extends ElementScanner9<Void, Void> {
             // The visitor could be enhanced to return true/false if
             // there were warnings reported or a count of the number
             // of warnings.  This could be facilitated by using
--- a/langtools/src/share/sample/language/model/CoreReflectionFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/src/share/sample/language/model/CoreReflectionFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
 import java.io.Writer;
 import java.util.*;
 
-import static javax.lang.model.SourceVersion.RELEASE_8;
+import static javax.lang.model.SourceVersion.RELEASE_9;
 import static java.util.Objects.*;
 
 /**
@@ -487,10 +487,10 @@
     /**
      * Base class for concrete visitors of elements backed by core reflection.
      */
-    public static abstract class AbstractReflectionElementVisitor8<R, P>
-        extends AbstractElementVisitor8<R, P>
+    public static abstract class AbstractReflectionElementVisitor9<R, P>
+        extends AbstractElementVisitor9<R, P>
         implements ReflectionElementVisitor<R, P> {
-        protected AbstractReflectionElementVisitor8() {
+        protected AbstractReflectionElementVisitor9() {
             super();
         }
     }
@@ -498,16 +498,16 @@
     /**
      * Base class for simple visitors of elements that are backed by core reflection.
      */
-    @SupportedSourceVersion(value=RELEASE_8)
-    public static abstract class SimpleReflectionElementVisitor8<R, P>
-        extends SimpleElementVisitor8<R, P>
+    @SupportedSourceVersion(value=RELEASE_9)
+    public static abstract class SimpleReflectionElementVisitor9<R, P>
+        extends SimpleElementVisitor9<R, P>
         implements ReflectionElementVisitor<R, P> {
 
-        protected SimpleReflectionElementVisitor8(){
+        protected SimpleReflectionElementVisitor9(){
             super();
         }
 
-        protected SimpleReflectionElementVisitor8(R defaultValue) {
+        protected SimpleReflectionElementVisitor9(R defaultValue) {
             super(defaultValue);
         }
 
@@ -2527,7 +2527,7 @@
                 Constructor<?> printProcCtor = printProcClass.getConstructor(Writer.class, Elements.class);
                 return (ElementVisitor) printProcCtor.newInstance(w, getElements());
             } catch (ReflectiveOperationException | SecurityException e) {
-                return new ElementScanner8<Writer, Void>(w){
+                return new ElementScanner9<Writer, Void>(w){
                     @Override
                     public Writer scan(Element e, Void v) {
                         try {
--- a/langtools/test/com/sun/javadoc/DocRootSlash/overview.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/com/sun/javadoc/DocRootSlash/overview.html	Fri Aug 08 11:36:48 2014 -0700
@@ -58,7 +58,6 @@
 <p>
 Sub-test 33 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
 Sub-test 33 Expect: <A HREF=".../docs1/p2/package-summary.html#package_description">./../docs1/p2/package-summary.html#package_description</A>
-<p>
 
 </BODY>
 </HTML>
--- a/langtools/test/com/sun/javadoc/DocRootSlash/p1/package.html	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/com/sun/javadoc/DocRootSlash/p1/package.html	Fri Aug 08 11:36:48 2014 -0700
@@ -59,7 +59,6 @@
 
 Sub-test 22 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
 Sub-test 22 Expect: <A HREF="..../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
-<p>
 
 </BODY>
 </HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/all/RunCodingRules.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2014, 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 8043643
+ * @summary Run the langtools coding rules over the langtools source code.
+ */
+
+
+import java.io.*;
+import java.nio.file.Files;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.javac.util.Assert;
+
+public class RunCodingRules {
+    public static void main(String... args) throws Exception {
+        new RunCodingRules().run();
+    }
+
+    public void run() throws Exception {
+        File testSrc = new File(System.getProperty("test.src", "."));
+        File targetDir = new File(System.getProperty("test.classes", "."));
+        File sourceDir = null;
+        File crulesDir = null;
+        for (File d = testSrc; d != null; d = d.getParentFile()) {
+            if (new File(d, "TEST.ROOT").exists()) {
+                d = d.getParentFile();
+                File f = new File(d, "src/share/classes");
+                if (f.exists()) {
+                    sourceDir = f;
+                    f = new File(d, "make/tools");
+                    if (f.exists())
+                        crulesDir = f;
+                    break;
+                }
+            }
+        }
+
+        if (sourceDir == null || crulesDir == null) {
+            System.err.println("Warning: sources not found, test skipped.");
+            return ;
+        }
+
+        JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+        StandardJavaFileManager fm = javaCompiler.getStandardFileManager(null, null, null);
+        DiagnosticListener<JavaFileObject> noErrors = diagnostic -> {
+            Assert.check(diagnostic.getKind() != Diagnostic.Kind.ERROR, diagnostic.toString());
+        };
+
+        List<File> crulesFiles = Files.walk(crulesDir.toPath())
+                                      .map(entry -> entry.toFile())
+                                      .filter(entry -> entry.getName().endsWith(".java"))
+                                      .filter(entry -> entry.getParentFile().getName().equals("crules"))
+                                      .collect(Collectors.toList());
+
+        File crulesTarget = new File(targetDir, "crules");
+        crulesTarget.mkdirs();
+        List<String> crulesOptions = Arrays.asList("-d", crulesTarget.getAbsolutePath());
+        javaCompiler.getTask(null, fm, noErrors, crulesOptions, null,
+                fm.getJavaFileObjectsFromFiles(crulesFiles)).call();
+        File registration = new File(crulesTarget, "META-INF/services/com.sun.source.util.Plugin");
+        registration.getParentFile().mkdirs();
+        try (Writer metaInfServices = new FileWriter(registration)) {
+            metaInfServices.write("crules.CodingRulesAnalyzerPlugin\n");
+        }
+
+        List<File> sources = Files.walk(sourceDir.toPath())
+                                  .map(entry -> entry.toFile())
+                                  .filter(entry -> entry.getName().endsWith(".java"))
+                                  .collect(Collectors.toList());
+
+        File sourceTarget = new File(targetDir, "classes");
+        sourceTarget.mkdirs();
+        String processorPath = crulesTarget.getAbsolutePath() + File.pathSeparator +
+                crulesDir.getAbsolutePath();
+        List<String> options = Arrays.asList("-d", sourceTarget.getAbsolutePath(),
+                "-processorpath", processorPath, "-Xplugin:coding_rules");
+        javaCompiler.getTask(null, fm, noErrors, options, null,
+                fm.getJavaFileObjectsFromFiles(sources)).call();
+    }
+}
--- a/langtools/test/tools/javac/6402516/CheckLocalElements.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/6402516/CheckLocalElements.java	Fri Aug 08 11:36:48 2014 -0700
@@ -110,7 +110,7 @@
         return encl == null ? "" : encl.accept(qualNameVisitor, null);
     }
 
-    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor8<String,Void>() {
+    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor9<String,Void>() {
         protected String defaultAction(Element e, Void ignore) {
             return "";
         }
--- a/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,14 +36,26 @@
 import static java.lang.String.format;
 import static java.util.stream.Collectors.*;
 
-
+/**
+ * Base class for LocalVariableTable and LocalVariableTypeTable attributes tests.
+ * To add tests cases you should extend this class.
+ * Then implement {@link #getVariableTables} to get LocalVariableTable or LocalVariableTypeTable attribute.
+ * Then add method with local variables.
+ * Finally, annotate method with information about expected variables and their types
+ * by several {@link LocalVariableTestBase.ExpectedLocals} annotations.
+ * To run test invoke {@link #test()} method.
+ * If there are variables with the same name, set different scopes for them.
+ *
+ * @see #test()
+ */
 public abstract class LocalVariableTestBase extends TestBase {
     public static final int DEFAULT_SCOPE = 0;
     private final ClassFile classFile;
     private final Class<?> clazz;
 
-    protected abstract List<VariableTable> getVariableTables(Code_attribute codeAttribute);
-
+    /**
+     * @param clazz class to test. Must contains annotated methods with expected results.
+     */
     public LocalVariableTestBase(Class<?> clazz) {
         this.clazz = clazz;
         try {
@@ -53,8 +65,12 @@
         }
     }
 
+    protected abstract List<VariableTable> getVariableTables(Code_attribute codeAttribute);
 
-    //info in the LocalVariableTable attribute is compared against expected info stored in annotations
+    /**
+     * Finds expected variables with their type in VariableTable.
+     * Also does consistency checks, like variables from the same scope must point to different indexes.
+     */
     public void test() throws IOException {
         List<java.lang.reflect.Method> testMethods = Stream.of(clazz.getDeclaredMethods())
                 .filter(m -> m.getAnnotationsByType(ExpectedLocals.class).length > 0)
@@ -129,7 +145,7 @@
         }
     }
 
-    private void checkNamesAndTypes(List<LocalVariableTableTest.LocalVariableTable.Entry> entries,
+    private void checkNamesAndTypes(List<VariableTable.Entry> entries,
                                     Map<String, String> expectedLocals2Types) {
         Map<String, List<String>> actualNames2Types = entries.stream()
                 .collect(
@@ -163,7 +179,7 @@
 
     }
 
-    private void checkDoubleAndLongIndexes(Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries,
+    private void checkDoubleAndLongIndexes(Collection<VariableTable.Entry> entries,
                                            Map<String, Integer> scopes, int maxLocals) {
         //check every scope separately
         Map<Object, List<VariableTable.Entry>> entriesByScope = groupByScope(entries, scopes);
@@ -185,7 +201,7 @@
     }
 
     private Map<Object, List<VariableTable.Entry>> groupByScope(
-            Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries, Map<String, Integer> scopes) {
+            Collection<VariableTable.Entry> entries, Map<String, Integer> scopes) {
         return entries.stream().collect(groupingBy(e -> scopes.getOrDefault(e.name() + "&" + e.type(), DEFAULT_SCOPE)));
     }
 
@@ -198,12 +214,15 @@
         }
     }
 
-
+    /**
+     * LocalVariableTable and LocalVariableTypeTable are similar.
+     * VariableTable interface is introduced to test this attributes in the same way without code duplication.
+     */
     interface VariableTable {
 
         int localVariableTableLength();
 
-        List<LocalVariableTableTest.VariableTable.Entry> entries();
+        List<VariableTable.Entry> entries();
 
         int attributeLength();
 
@@ -231,14 +250,23 @@
         }
     }
 
+    /**
+     * Used to store expected results in sources
+     */
     @Retention(RetentionPolicy.RUNTIME)
     @Repeatable(Container.class)
     @interface ExpectedLocals {
+        /**
+         * @return name of a local variable
+         */
         String name();
 
+        /**
+         * @return type of local variable in the internal format.
+         */
         String type();
 
-        //variables from different scopes can share local variable table index and/or name.
+        //variables from different scopes can share the local variable table index and/or name.
         int scope() default DEFAULT_SCOPE;
     }
 
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,18 +30,41 @@
 import java.util.Map;
 import javax.tools.JavaFileObject;
 
+/**
+ * Base class for Source file attribute tests. Checks expected file name for specified classes in the SourceFile attribute.
+ * To add new tests you should extend the SourceFileTestBase class and invoke {@link #test} for static sources
+ * or {@link #compileAndTest} for generated sources. For more information see corresponding methods.
+ *
+ * @see #test
+ * @see #compileAndTest
+ */
 public class SourceFileTestBase extends TestBase {
-
+    /**
+     * Checks expected fileName for the specified class in the SourceFile attribute.
+     *
+     * @param classToTest class to check its SourceFile attribute
+     * @param fileName    expected name of the file from which the test file is compiled.
+     */
     protected void test(Class<?> classToTest, String fileName) throws Exception {
         assertAttributePresent(ClassFile.read(getClassFile(classToTest)), fileName);
     }
 
+    /**
+     * Checks expected fileName for the specified class in the SourceFile attribute.
+     *
+     * @param classToTest class name to check its SourceFile attribute
+     * @param fileName    expected name of the file from which the test file is compiled.
+     */
     protected void test(String classToTest, String fileName) throws Exception {
         assertAttributePresent(ClassFile.read(getClassFile(classToTest + ".class")), fileName);
     }
 
     /**
-     * Compile sourceCode and for all "classesToTest" checks SourceFile attribute.
+     * Compiles sourceCode and for each specified class name checks the SourceFile attribute.
+     * The file name is extracted from source code.
+     *
+     * @param sourceCode    source code to compile
+     * @param classesToTest class names to check their SourceFile attribute.
      */
     protected void compileAndTest(String sourceCode, String... classesToTest) throws Exception {
 
--- a/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,11 +23,14 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.io.PrintStream;
-import java.util.*;
+import java.util.List;
+import java.util.Objects;
 import java.util.function.Function;
 import java.util.stream.Stream;
-import javax.tools.*;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.ToolProvider;
 
 import static java.lang.String.format;
 import static java.lang.System.lineSeparator;
@@ -36,6 +39,11 @@
 import static java.util.stream.Collectors.joining;
 import static java.util.stream.Collectors.toList;
 
+/**
+ * Base class for class file attribute tests.
+ * Contains methods for compiling generated sources in memory,
+ * for reading files from disk and a lot of assert* methods.
+ */
 public class TestBase {
 
     public static final String LINE_SEPARATOR = lineSeparator();
@@ -66,35 +74,48 @@
         }
     }
 
+    /**
+     * Compiles sources in memory.
+     *
+     * @param sources to compile.
+     * @return memory file manager which contains class files and class loader.
+     */
     public InMemoryFileManager compile(String... sources)
             throws IOException, CompilationException {
         return compile(emptyList(), sources);
     }
 
     /**
-     * @param options - compiler options
-     * @param sources
+     * Compiles sources in memory.
+     *
+     * @param options compiler options.
+     * @param sources sources to compile.
      * @return map where key is className, value is corresponding ClassFile.
-     * @throws IOException
      */
-    public InMemoryFileManager compile(List<String> options, String...sources)
+    public InMemoryFileManager compile(List<String> options, String... sources)
             throws IOException, CompilationException {
         return compile(options, ToolBox.JavaSource::new, asList(sources));
     }
 
+    /**
+     * Compiles sources in memory.
+     *
+     * @param sources sources[i][0] - name of file, sources[i][1] - sources.
+     * @return map where key is className, value is corresponding ClassFile.
+     */
     public InMemoryFileManager compile(String[]... sources) throws IOException,
             CompilationException {
         return compile(emptyList(), sources);
     }
 
     /**
-     * @param options -  compiler options
-     * @param sources - sources[i][0] - name of file, sources[i][1] - sources
+     * Compiles sources in memory.
+     *
+     * @param options compiler options
+     * @param sources sources[i][0] - name of file, sources[i][1] - sources.
      * @return map where key is className, value is corresponding ClassFile.
-     * @throws IOException
-     * @throws CompilationException
      */
-    public InMemoryFileManager compile(List<String> options, String[]...sources)
+    public InMemoryFileManager compile(List<String> options, String[]... sources)
             throws IOException, CompilationException {
         return compile(options, src -> new ToolBox.JavaSource(src[0], src[1]), asList(sources));
     }
@@ -142,11 +163,22 @@
         return getClassFile(clazz.getName().replace(".", "/") + ".class");
     }
 
+    /**
+     * Prints message to standard error. New lines are converted to system dependent NL.
+     *
+     * @param message string to print.
+     */
     public void echo(String message) {
         System.err.println(message.replace("\n", LINE_SEPARATOR));
     }
 
-    public void printf(String template, Object...args) {
+    /**
+     * Substitutes args in template and prints result to standard error. New lines are converted to system dependent NL.
+     *
+     * @param template template in standard String.format(...) format.
+     * @param args arguments to substitute in template.
+     */
+    public void printf(String template, Object... args) {
         System.err.printf(template, Stream.of(args)
                 .map(Objects::toString)
                 .map(m -> m.replace("\n", LINE_SEPARATOR))
--- a/langtools/test/tools/javac/generics/5086027/T5086027.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/5086027/T5086027.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     5086027
  * @summary Inner class of generic class cannot extend Throwable
  * @author  Peter von der Ah\u00e9
- * @compile/fail T5086027.java
+ * @compile/fail/ref=T5086027.out -XDrawDiagnostics  T5086027.java
  */
 
 public class T5086027<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/5086027/T5086027.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T5086027.java:10:21: compiler.err.generic.throwable
+1 error
--- a/langtools/test/tools/javac/generics/6227936/Orig.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/6227936/Orig.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2007, 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
+ * @test    /nodynamiccopyright/
  * @bug     6227936
  * @summary Wrong type of inherited method using specialized type parameter
- * @compile/fail Orig.java
+ * @compile/fail/ref=Orig.out -XDrawDiagnostics  Orig.java
  */
 
 class GenericTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6227936/Orig.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Orig.java:27:26: compiler.err.cant.resolve.location.args: kindname.method, someMethod, , , (compiler.misc.location: kindname.class, GenericTest.C, null)
+1 error
--- a/langtools/test/tools/javac/generics/6245699/T6245699b.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/6245699/T6245699b.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6270396 6245699
  * @summary Missing bridge for final method (gives AbstractMethodError at runtime)
- * @compile/fail T6245699b.java
+ * @compile/fail/ref=T6245699b.out -XDrawDiagnostics  T6245699b.java
  */
 
 public class T6245699b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6245699/T6245699b.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6245699b.java:23:23: compiler.err.override.meth: (compiler.misc.cant.override: doIt(), T6245699b.Bar, doIt(), T6245699b.Foo), final
+1 error
--- a/langtools/test/tools/javac/generics/6294779/T6294779c.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/6294779/T6294779c.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2008, 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
+ * @test    /nodynamiccopyright/
  * @bug     6294779
  * @summary Problem with interface inheritance and covariant return types
  * @author  Maurizio Cimadamore
- * @compile/fail T6294779c.java
+ * @compile/fail/ref=T6294779c.out -XDrawDiagnostics  T6294779c.java
  */
 
 public class T6294779c<X> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6294779/T6294779c.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6294779c.java:29:5: compiler.err.types.incompatible.diff.ret: T6294779c.I2, T6294779c.I1, get()
+1 error
--- a/langtools/test/tools/javac/generics/6413682/T6413682.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/6413682/T6413682.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, 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
+ * @test    /nodynamiccopyright/
  * @bug     6413682
  * @summary Compiler confused about implicit type args and arrays
- * @compile/fail T6413682.java
+ * @compile/fail/ref=T6413682.out -XDrawDiagnostics  T6413682.java
  */
 
 public class T6413682 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6413682/T6413682.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6413682.java:11:2: compiler.err.cannot.create.array.with.type.arguments
+1 error
--- a/langtools/test/tools/javac/generics/6495506/T6495506.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/6495506/T6495506.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 2007, 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
+ * @test    /nodynamiccopyright/
  * @bug     6495506
  * @summary Cast inserted by generics can cause IllegalAccessError
  * @compile A.java
- * @compile/fail T6495506.java
+ * @compile/fail/ref=T6495506.out -XDrawDiagnostics  T6495506.java
  */
 
 public class T6495506 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6495506/T6495506.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6495506.java:12:28: compiler.err.report.access: a.A.P, private, a.A
+1 error
--- a/langtools/test/tools/javac/generics/CatchTyparam.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/CatchTyparam.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2004, 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
+ * @test /nodynamiccopyright/
  * @bug 5057445
  * @summary javac allows catching type parameter
  * @author gafter
  *
- * @compile/fail CatchTyparam.java
+ * @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics  CatchTyparam.java
  */
 
 class J {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/CatchTyparam.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,3 @@
+CatchTyparam.java:14:18: compiler.err.type.found.req: (compiler.misc.type.parameter: T), (compiler.misc.type.req.class)
+CatchTyparam.java:15:18: compiler.err.type.found.req: (compiler.misc.type.parameter: U), (compiler.misc.type.req.class)
+2 errors
--- a/langtools/test/tools/javac/generics/inference/4941882/T4941882.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/inference/4941882/T4941882.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     4941882
  * @summary incorrect inference for result of lub(int[], float[])
- * @compile/fail T4941882.java
+ * @compile/fail/ref=T4941882.out -XDrawDiagnostics  T4941882.java
  */
 
 public class T4941882 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4941882/T4941882.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&java.io.Serializable&java.lang.Cloneable, java.lang.Object[],java.lang.Object)
+1 error
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073.java
+ * @compile/fail/ref=T4972073.out -XDrawDiagnostics  T4972073.java
  */
 
 public class T4972073 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,3 @@
+T4972073.java:18:80: compiler.err.repeated.interface
+T4972073.java:24:68: compiler.err.repeated.interface
+2 errors
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073a.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073a.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073a.java
+ * @compile/fail/ref=T4972073a.out -XDrawDiagnostics  T4972073a.java
  */
 
 public class T4972073a {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073a.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T4972073a.java:18:80: compiler.err.repeated.interface
+1 error
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073b.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073b.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073b.java
+ * @compile/fail/ref=T4972073b.out -XDrawDiagnostics  T4972073b.java
  */
 
 public class T4972073b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073b.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T4972073b.java:18:68: compiler.err.repeated.interface
+1 error
--- a/langtools/test/tools/javac/generics/inference/5081782/Neg.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/inference/5081782/Neg.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     5081782
  * @summary type arguments to non-generic methods
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg.java
+ * @compile/fail/ref=Neg.out -XDrawDiagnostics  Neg.java
  */
 
 public class Neg {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/5081782/Neg.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,8 @@
+Neg.java:12:14: compiler.err.cant.resolve.location: kindname.class, Can, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:18: compiler.err.cant.resolve.location: kindname.class, I, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:20: compiler.err.cant.resolve.location: kindname.class, write, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:26: compiler.err.cant.resolve.location: kindname.class, a, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:28: compiler.err.cant.resolve.location: kindname.class, little, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:35: compiler.err.cant.resolve.location: kindname.class, story, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:41: compiler.err.cant.resolve.location: kindname.class, here, , , (compiler.misc.location: kindname.class, Neg, null)
+7 errors
--- a/langtools/test/tools/javac/generics/rawOverride/Fail1.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/rawOverride/Fail1.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * Copyright (c) 2004, 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
+ * @test /nodynamiccopyright/
  * @bug 5073079
  * @summary Allow unchecked override of generified methods in
  * parameterless classes
  * @author Peter von der Ah\u00e9
  *
- * @compile/fail Fail1.java
+ * @compile/fail/ref=Fail1.out -XDrawDiagnostics  Fail1.java
  */
 
 interface MyList<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rawOverride/Fail1.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Fail1.java:21:1: compiler.err.does.not.override.abstract: C, f(MyList), A
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg1.java
+ * @compile/fail/ref=BarNeg1.out -XDrawDiagnostics  BarNeg1.java
  */
 
 class BarNeg1<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg1.java:9:45: compiler.err.generic.array.creation
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg1a.java
+ * @compile/fail/ref=BarNeg1a.out -XDrawDiagnostics  BarNeg1a.java
  */
 
 class BarNeg1a<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg1a.java:9:36: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg2.java
+ * @compile/fail/ref=BarNeg2.out -XDrawDiagnostics  BarNeg2.java
  */
 
 class BarNeg2<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg2.java:9:45: compiler.err.generic.array.creation
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg2a.java
+ * @compile/fail/ref=BarNeg2a.out -XDrawDiagnostics  BarNeg2a.java
  */
 
 class BarNeg2a<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg2a.java:9:60: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5060485/Neg1.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg1.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     5060485
  * @summary The scope of a class type parameter is too wide
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg1.java
+ * @compile/fail/ref=Neg1.out -XDrawDiagnostics  Neg1.java
  */
 
 public class Neg1<X extends Y> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg1.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Neg1.java:9:29: compiler.err.cant.resolve: kindname.class, Y, , 
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5060485/Neg2.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg2.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     5060485
  * @summary The scope of a class type parameter is too wide
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg2.java
+ * @compile/fail/ref=Neg2.out -XDrawDiagnostics  Neg2.java
  */
 
 public class Neg2<X extends X> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg2.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+Neg2.java:9:19: compiler.err.cyclic.inheritance: X
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5061359/T5061359.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, 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
+ * @test    /nodynamiccopyright/
  * @bug     5061359
  * @summary No error for ambiguous member of intersection
- * @compile/fail T5061359.java
+ * @compile/fail/ref=T5061359.out -XDrawDiagnostics  T5061359.java
  */
 
 class Test<T extends Base & Intf> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T5061359.java:11:10: compiler.err.ref.ambiguous: Inner, kindname.class, Base.Inner, Base, kindname.class, Intf.Inner, Intf
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,36 +1,13 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     5061359
  * @summary No error for ambiguous member of intersection
  * @clean   Base Intf
- * @compile/fail T5061359a.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  T5061359a.java
  * @clean   Base Intf T5061359a
- * @compile/fail Base.java Intf.java T5061359a.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  Base.java Intf.java T5061359a.java
  * @clean   Base Intf T5061359a
- * @compile/fail T5061359a.java Base.java Intf.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  T5061359a.java Base.java Intf.java
  */
 
 import java.util.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T5061359a.java:16:30: compiler.err.override.incompatible.ret: (compiler.misc.cant.implement: m1(), Base, m1(), Intf), int, void
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6199146/T6199146.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/6199146/T6199146.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, 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
+ * @test    /nodynamiccopyright/
  * @bug     6199146
  * @summary Javac accepts ambiguous compound type
- * @compile/fail T6199146.java
+ * @compile/fail/ref=T6199146.out -XDrawDiagnostics  T6199146.java
  */
 
 public class T6199146 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6199146/T6199146.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6199146.java:9:25: compiler.err.types.incompatible.diff.ret: T6199146.I2, T6199146.I1, getFoo()
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6486430/T6486430.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6486430
  * @summary Compiler fails to reject access to static member in parameterized type
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6486430.java
+ * @compile/fail/ref=T6486430.out -XDrawDiagnostics  T6486430.java
  */
 
 class T6486430<T extends Number> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6486430.java:10:16: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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
+ * @test    /nodynamiccopyright/
  * @bug     6486430
  * @summary Compiler fails to reject access to static member in parameterized type
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6486430a.java
+ * @compile/fail/ref=T6486430a.out -XDrawDiagnostics  T6486430a.java
  */
 
 class T6486430a<T extends Number> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6486430a.java:10:31: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2008, 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
+ * @test    /nodynamiccopyright/
  * @bug     6762569
  * @summary Javac crashes with AssertionError in Types.containedBy
- * @compile/fail T6762569b.java
+ * @compile/fail/ref=T6762569b.out -XDrawDiagnostics  T6762569b.java
  */
 import java.util.*;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6762569b.java:13:9: compiler.err.cant.apply.symbol: kindname.method, m, T,java.util.List<? super java.util.List<T>>, java.lang.String,java.util.List<compiler.misc.type.captureof: 1, ? super java.util.List<? extends java.lang.Number>>, kindname.class, T6762569b, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number,java.lang.Object)
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/T6450290.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/generics/wildcards/T6450290.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2004, 2008, 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
+ * @test /nodynamiccopyright/
  * @bug 6450290
  * @summary Capture of nested wildcards causes type error
  * @author Maurizio Cimadamore
- * @compile/fail T6450290.java
+ * @compile/fail/ref=T6450290.out -XDrawDiagnostics  T6450290.java
  */
 
 public class T6450290 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/T6450290.out	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+T6450290.java:19:24: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T6450290.Box<T6450290.B,T6450290.B>, T6450290.Box<compiler.misc.type.captureof: 1, ?,compiler.misc.type.captureof: 2, ?>)
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8051958/T8051958.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+/*
+ * @test
+ * @bug 8051958
+ * @summary Cannot assign a value to final variable in lambda
+ * @compile T8051958.java
+ */
+
+class T8051958 {
+    Runnable inst_r = ()-> {
+        final int x;
+        x = 1;
+    };
+
+    Runnable static_r = ()-> {
+        final int x;
+        x = 1;
+    };
+
+    {
+        Runnable inst_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    static {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    void instTest() {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    static void staticTest() {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+}
--- a/langtools/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,7 +28,7 @@
 import static javax.lang.model.SourceVersion.*;
 
 /**
- * An abstract annotation processor tailored to javac regression testing.
+ * An abstract annotation processor tailored to {@code javac} regression testing.
  */
 public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
     private static final Set<String> allAnnotations;
@@ -103,7 +103,7 @@
      */
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
+    public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
 
         /**
          * Constructor for concrete subclasses to call.
@@ -114,7 +114,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor8<R, P> {
+    public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
          */
@@ -124,7 +124,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor8<R, P> {
+    public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
          */
@@ -134,7 +134,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class ElementKindVisitor<R, P> extends ElementKindVisitor8<R, P> {
+    public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -155,7 +155,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class ElementScanner<R, P> extends ElementScanner8<R, P> {
+    public static class ElementScanner<R, P> extends ElementScanner9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -174,7 +174,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
+    public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -195,7 +195,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor8<R, P> {
+    public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -216,7 +216,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor8<R, P> {
+    public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -237,7 +237,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class TypeKindVisitor<R, P> extends TypeKindVisitor8<R, P> {
+    public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}
          * for the default value.
--- a/langtools/test/tools/javac/multicatch/model/ModelChecker.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/multicatch/model/ModelChecker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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,7 +46,6 @@
 import javax.lang.model.type.UnionType;
 import javax.lang.model.type.UnknownTypeException;
 import javax.lang.model.util.SimpleTypeVisitor6;
-import javax.lang.model.util.SimpleTypeVisitor7;
 
 @SupportedAnnotationTypes("Check")
 public class ModelChecker extends JavacTestingAbstractProcessor {
--- a/langtools/test/tools/javac/processing/model/TestSymtabItems.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/processing/model/TestSymtabItems.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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,7 +110,7 @@
 
     int errors;
 
-    class ElemPrinter extends ElementScanner8<Void, Void> {
+    class ElemPrinter extends ElementScanner9<Void, Void> {
         @Override
         public Void visitPackage(PackageElement e, Void p) {
             show("package", e);
@@ -201,7 +201,7 @@
         int indent;
     };
 
-    class TypePrinter extends SimpleTypeVisitor7<Void, Types> {
+    class TypePrinter extends SimpleTypeVisitor9<Void, Types> {
         @Override
         public Void defaultAction(TypeMirror m, Types types) {
             System.err.println(m.getKind() + " " + m + " " + types.asElement(m));
--- a/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java	Fri Aug 08 11:36:48 2014 -0700
@@ -53,7 +53,7 @@
         return true;
     }
 
-    class Scanner extends ElementScanner7<Integer,Void> {
+    class Scanner extends ElementScanner<Integer, Void> {
         @Override
         public Integer visitExecutable(ExecutableElement e, Void p) {
             super.visitExecutable(e, p);
--- a/langtools/test/tools/javac/processing/model/type/InheritedAP.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/processing/model/type/InheritedAP.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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,7 +25,7 @@
  * @test
  * @bug 8024513
  * @library /tools/javac/lib
- * @build InheritedAP
+ * @build JavacTestingAbstractProcessor InheritedAP
  * @compile -cp . -processor InheritedAP -proc:only InheritedAP.java
  * @summary NPE in annotation processing
  */
@@ -40,8 +40,7 @@
 import static javax.lang.model.util.ElementFilter.*;
 
 @SupportedAnnotationTypes("testclass")
-@SupportedSourceVersion(RELEASE_8)
-public class InheritedAP extends AbstractProcessor {
+public class InheritedAP extends JavacTestingAbstractProcessor {
     static Types types;
     public void init(ProcessingEnvironment penv) {super.init(penv);}
     public static Types getTypes() { return types; }
@@ -54,14 +53,14 @@
         types=processingEnv.getTypeUtils();
         for (TypeElement typeElem: typesIn(renv.getRootElements())) {
             if (typeElem.getAnnotation(testclass.class) != null) {
-                new ElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
+                new LocalElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
             }
         }
         return true ;
     }
 }
 
-class SimpleTypeMirrorVisitor extends SimpleTypeVisitor6 <Void, Void> {
+class SimpleTypeMirrorVisitor extends JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> {
     protected Void defaultAction(TypeMirror mirror, Void p ) {
         try {
             System.out.println( "InheritedAP.getTypes().directSupertypes( "+mirror.toString()+" );" );
@@ -72,11 +71,11 @@
     }
 }
 
-class ElementScanner <T extends SimpleTypeVisitor6<Void, Void> >
-                    extends ElementScanner6<Void, Void> {
-    SimpleTypeVisitor6<Void, Void> typeVisitor;
+class LocalElementScanner <T extends JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> >
+                    extends JavacTestingAbstractProcessor.ElementScanner<Void, Void> {
+    JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> typeVisitor;
 
-    public ElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
+    public LocalElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
 
     @Override
     public Void scan(Element e, Void p) {
@@ -86,7 +85,6 @@
         }
         return p;
     }
-
 }
 
 
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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,6 +25,9 @@
  * @test
  * @bug 6877202 6986246
  * @summary Elements.getDocComment() is not getting JavaDocComments
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor TestDocComments
+ * @run main TestDocComments
  */
 
 import com.sun.source.tree.*;
@@ -49,8 +52,7 @@
  */
 
 @SupportedOptions("scan")
-@SupportedAnnotationTypes("*")
-public class TestDocComments extends AbstractProcessor {
+public class TestDocComments extends JavacTestingAbstractProcessor {
     enum CompileKind { API, CMD };
     enum ScanKind { TREE, ELEMENT };
 
@@ -72,7 +74,7 @@
     }
 
     static void test(CompileKind ck, ScanKind sk) throws IOException {
-        String testClasses = System.getProperty("test.classes");
+        String testClasses = System.getProperty("test.class.path");
         String testSrc = System.getProperty("test.src");
         File testDir = new File("test." + ck + "." + sk);
         testDir.mkdirs();
@@ -136,26 +138,15 @@
     // ----- Annotation processor: scan for elements and check doc comments ----
 
     Map<String,String> options;
-    Filer filer;
-    Messager messager;
-    Elements elements;
     Trees trees;
     ScanKind skind;
 
     int round = 0;
 
     @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
-    @Override
     public void init(ProcessingEnvironment pEnv) {
         super.init(pEnv);
         options = pEnv.getOptions();
-        filer = pEnv.getFiler();
-        messager = pEnv.getMessager();
-        elements = pEnv.getElementUtils();
         trees = Trees.instance(processingEnv);
         skind = ScanKind.valueOf(options.get("scan"));
     }
@@ -271,7 +262,7 @@
 
     // ----- Scanners to find elements -----------------------------------------
 
-    class TestElementScanner extends ElementScanner7<Void, Void> {
+    class TestElementScanner extends ElementScanner<Void, Void> {
         @Override
         public Void visitExecutable(ExecutableElement e, Void _) {
             check(e);
@@ -306,5 +297,4 @@
             return super.visitVariable(tree, trees);
         }
     }
-
 }
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java	Fri Aug 08 11:36:48 2014 -0700
@@ -25,8 +25,10 @@
  * @test
  * @bug 8042345
  * @summary getDocComment() fails for doc comments on PackageElement found in package-info.java
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor TestPackageInfoComments
+ * @run main TestPackageInfoComments
  */
-
 import com.sun.source.util.JavacTask;
 
 import java.io.*;
@@ -37,14 +39,13 @@
 import javax.lang.model.util.*;
 import javax.tools.*;
 
-@SupportedAnnotationTypes("*")
-public class TestPackageInfoComments extends AbstractProcessor {
+public class TestPackageInfoComments extends JavacTestingAbstractProcessor {
 
     public static void main(String... args) throws Exception {
         String[] opts = {
             "-implicit:none",
             "-processor", TestPackageInfoComments.class.getName(),
-            "-processorpath", System.getProperty("test.classes")
+            "-processorpath", System.getProperty("test.class.path")
         };
         File[] files = {
             new File(System.getProperty("test.src"), "p/package-info.java")
@@ -68,21 +69,6 @@
 
     // -- Annotation processor: Check all PackageDecl's have a doc comment
 
-    Messager messager;
-    Elements elements;
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
-    @Override
-    public void init(ProcessingEnvironment pEnv) {
-        super.init(pEnv);
-        messager = pEnv.getMessager();
-        elements = pEnv.getElementUtils();
-    }
-
     @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
         for (Element e: roundEnv.getRootElements())
@@ -90,7 +76,7 @@
         return true;
     }
 
-    class TestElementScanner extends ElementScanner7<Void, Void> {
+    class TestElementScanner extends ElementScanner<Void, Void> {
         @Override
         public Void visitPackage(PackageElement e, Void v) {
             if (elements.getDocComment(e) == null)
--- a/langtools/test/tools/javac/tree/NoPrivateTypesExported.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/javac/tree/NoPrivateTypesExported.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -51,8 +51,6 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.WildcardType;
-import javax.lang.model.util.ElementScanner8;
-import javax.lang.model.util.SimpleAnnotationValueVisitor8;
 import javax.tools.Diagnostic.Kind;
 
 public class NoPrivateTypesExported extends JavacTestingAbstractProcessor {
@@ -131,7 +129,7 @@
 
     private void verifyReferredTypesAcceptable(Element rootElement,
                                                final Set<String> acceptable) {
-        new ElementScanner8<Void, Void>() {
+        new ElementScanner<Void, Void>() {
             @Override public Void visitType(TypeElement e, Void p) {
                 verifyTypeAcceptable(e.getSuperclass(), acceptable);
                 verifyTypesAcceptable(e.getInterfaces(), acceptable);
@@ -189,7 +187,7 @@
 
     private void verifyAnnotationValue(AnnotationValue value,
                                        final Set<String> acceptable) {
-        value.accept(new SimpleAnnotationValueVisitor8<Void, Void>() {
+        value.accept(new SimpleAnnotationValueVisitor<Void, Void>() {
             @Override public Void visitType(TypeMirror t, Void p) {
                 verifyTypeAcceptable(t, acceptable);
                 return null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/BadAttributeLength.java	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2014, 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 8047072
+ * @summary javap OOM on fuzzed classfile
+ * @run main BadAttributeLength
+ */
+
+
+import java.io.*;
+
+public class BadAttributeLength {
+
+    public static String source = "public class Test {\n" +
+                                  "    public static void main(String[] args) {}\n" +
+                                  "}";
+
+    public static void main(String[] args) throws Exception {
+        final File sourceFile = new File("Test.java");
+        if (sourceFile.exists()) {
+            if (!sourceFile.delete()) {
+                throw new IOException("Can't override the Test.java file. " +
+                        "Check permissions.");
+            }
+        }
+        try (FileWriter fw = new FileWriter(sourceFile)) {
+            fw.write(source);
+        }
+
+        final String[] javacOpts = {"Test.java"};
+
+        if (com.sun.tools.javac.Main.compile(javacOpts) != 0) {
+            throw new Exception("Can't compile embedded test.");
+        }
+
+        RandomAccessFile raf = new RandomAccessFile("Test.class", "rw");
+        long attPos = getFirstAttributePos(raf);
+        if (attPos < 0) {
+            throw new Exception("The class file contains no attributes at all.");
+        }
+        raf.seek(attPos + 2); // Jump to the attribute length
+        raf.writeInt(Integer.MAX_VALUE - 1);
+        raf.close();
+
+        String[] opts = { "-v", "Test.class" };
+        StringWriter sw = new StringWriter();
+        PrintWriter pout = new PrintWriter(sw);
+
+        com.sun.tools.javap.Main.run(opts, pout);
+        pout.flush();
+
+        if (sw.getBuffer().indexOf("OutOfMemoryError") != -1) {
+            throw new Exception("javap exited with OutOfMemoryError " +
+                    "instead of giving the proper error message.");
+        }
+    }
+
+    private static long getFirstAttributePos(RandomAccessFile cfile) throws Exception {
+        cfile.seek(0);
+        int v1, v2;
+        v1 = cfile.readInt();
+        // System.out.println("Magic: " + String.format("%X", v1));
+
+        v1 = cfile.readUnsignedShort();
+        v2 = cfile.readUnsignedShort();
+        // System.out.println("Version: " + String.format("%d.%d", v1, v2));
+
+        v1 = cfile.readUnsignedShort();
+        // System.out.println("CPool size: " + v1);
+        // Exhaust the constant pool
+        for (; v1 > 1; v1--) {
+            // System.out.print(".");
+            byte tag = cfile.readByte();
+            switch (tag) {
+                case 7  : // Class
+                case 8  : // String
+                    // Data is 2 bytes long
+                    cfile.skipBytes(2);
+                    break;
+                case 3  : // Integer
+                case 4  : // Float
+                case 9  : // FieldRef
+                case 10 : // MethodRef
+                case 11 : // InterfaceMethodRef
+                case 12 : // Name and Type
+                    // Data is 4 bytes long
+                    cfile.skipBytes(4);
+                    break;
+                case 5  : // Long
+                case 6  : // Double
+                    // Data is 8 bytes long
+                    cfile.skipBytes(8);
+                    break;
+                case 1  : // Utf8
+                    v2 = cfile.readUnsignedShort(); // Read buffer size
+                    cfile.skipBytes(v2); // Skip buffer
+                    break;
+                default :
+                    throw new Exception("Unexpected tag in CPool: [" + tag + "] at "
+                            + Long.toHexString(cfile.getFilePointer()));
+            }
+        }
+        // System.out.println();
+
+        cfile.skipBytes(6); // Access flags, this_class and super_class
+        v1 = cfile.readUnsignedShort(); // Number of interfaces
+        // System.out.println("Interfaces: " + v1);
+        cfile.skipBytes(3 * v1); // Each interface_info record is 3 bytes long
+        v1 = cfile.readUnsignedShort(); // Number of fields
+        // System.out.println("Fields: " + v1);
+        // Exhaust the fields table
+        for (; v1 > 0; v1--) {
+            // System.out.print(".");
+            cfile.skipBytes(6); // Skip access_flags, name_index and descriptor_index
+            v2 = cfile.readUnsignedShort(); // Field attributes count
+            if (v2 > 0) {
+                // This field has some attributes - suits our needs
+                // System.out.println();
+                return cfile.getFilePointer();
+            }
+        }
+        // System.out.println();
+        v1 = cfile.readUnsignedShort(); // Number of methods
+        // System.out.println("Methods: " + v1);
+        // Exhaust the methods table
+        for (; v1 > 0; v1--) {
+            // System.out.print(".");
+            cfile.skipBytes(6); // Skip access_flags, name_index and descriptor_index
+            v2 = cfile.readUnsignedShort(); // Method attributes count
+            if (v2 > 0) {
+                // This method got attributes - Ok with us,
+                // return position of the first one
+                // System.out.println();
+                return cfile.getFilePointer();
+            }
+        }
+        // System.out.println();
+        // Class attributes section
+        v1 = cfile.readUnsignedShort(); // Counts of attributes in class
+        if (v1 > 0) {
+            // Class has some attributes, return position of the first one
+            return cfile.getFilePointer();
+        }
+        // Bummer! No attributes in the entire class file. Not fair!
+        return -1L;
+    }
+}
--- a/langtools/test/tools/jdeps/APIDeps.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/langtools/test/tools/jdeps/APIDeps.java	Fri Aug 08 11:36:48 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8015912 8029216 8048063
+ * @bug 8015912 8029216 8048063 8050804
  * @summary Test -apionly and -jdkinternals options
  * @build m.Bar m.Foo m.Gee b.B c.C c.I d.D e.E f.F g.G
  * @run main APIDeps
--- a/make/Javadoc.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/make/Javadoc.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -239,11 +239,15 @@
 
 # Common echo of option
 define OptionOnly # opt
-	$(PRINTF) "%s\n" "$1"
+	if [ "$1" != "" ] ; then \
+		$(PRINTF) "%s\n" "$1"; \
+	fi
 endef
+
 define OptionPair # opt arg
 	$(PRINTF) "%s '%s'\n" "$1" '$2'
 endef
+
 define OptionTrip # opt arg arg
 	$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
 endef
@@ -258,14 +262,7 @@
 $(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
 </font>
 
-# Common javadoc options used by all
-COMMON_JAVADOCFLAGS = \
-    -XDignore.symbol.file=true \
-    -quiet \
-    -use \
-    -keywords \
-    -Xprofilespath $(JDK_TOPDIR)/make/profile-rtjar-includes.txt \
-    $(ADDITIONAL_JAVADOCFLAGS)
+# Common javadoc options used by all bundles
 
 ifdef OPENJDK
   ADDITIONAL_JAVADOCFLAGS = \
@@ -274,6 +271,52 @@
   ADDITIONAL_JAVADOCFLAGS =
 endif
 
+define COMMON_JAVADOCFLAGS
+    $(call OptionOnly,-XDignore.symbol.file=true) ; \
+    $(call OptionOnly,-quiet) ; \
+    $(call OptionOnly,-use) ; \
+    $(call OptionOnly,-keywords) ; \
+    $(call OptionPair,-Xprofilespath,$(JDK_TOPDIR)/make/profile-rtjar-includes.txt) ; \
+    $(call OptionOnly,$(ADDITIONAL_JAVADOCFLAGS))
+endef
+
+# Common javadoc tags used by all bundles
+
+# Java language specification cite
+TAG_JLS = jls:a:See <cite> \
+The Java&trade; Language Specification</cite>:
+
+# Java virtual machine specification cite
+TAG_JVMS = jvms:a:See <cite> \
+The Java&trade; Virtual Machine Specification</cite>:
+
+# In order to get a specific ordering it's necessary to specify the total
+# ordering of tags as the tags are otherwise ordered in order of definition.
+define COMMON_JAVADOCTAGS
+  $(call OptionPair,-tag,beaninfo:X) ; \
+  $(call OptionPair,-tag,revised:X) ; \
+  $(call OptionPair,-tag,since.unbundled:X) ; \
+  $(call OptionPair,-tag,spec:X) ; \
+  $(call OptionPair,-tag,specdefault:X) ; \
+  $(call OptionPair,-tag,Note:X) ; \
+  $(call OptionPair,-tag,ToDo:X) ; \
+  $(call OptionPair,-tag,apiNote:a:API Note:) ; \
+  $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
+  $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
+  $(call OptionPair,-tag,param) ; \
+  $(call OptionPair,-tag,return) ; \
+  $(call OptionPair,-tag,throws) ; \
+  $(call OptionPair,-tag,since) ; \
+  $(call OptionPair,-tag,version) ; \
+  $(call OptionPair,-tag,serialData) ; \
+  $(call OptionPair,-tag,factory) ; \
+  $(call OptionPair,-tag,see) ; \
+  $(call OptionPair,-tag,$(TAG_JVMS)) ; \
+  $(call OptionPair,-tag,$(TAG_JLS))
+endef
+
+
+
 # Draft used for non-fcs documents
 DRAFT_HEADER =
 ifneq ($(MILESTONE), fcs)
@@ -338,10 +381,6 @@
 COREAPI_HEADER = \
 <strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
 
-# Java language specification cite
-TAG_JLS = jls:a:See <cite> \
-The Java&trade; Language Specification</cite>:
-
 # Overview file for core apis
 COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
 
@@ -365,29 +404,11 @@
 # Create file with javadoc options in it
 $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
-	  $(call OptionOnly,-Xdoclint:none) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
+          $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ISO-8859-1) ; \
-	  $(call OptionPair,-tag,beaninfo:X) ; \
-	  $(call OptionPair,-tag,revised:X) ; \
-	  $(call OptionPair,-tag,since.unbundled:X) ; \
-	  $(call OptionPair,-tag,spec:X) ; \
-	  $(call OptionPair,-tag,specdefault:X) ; \
-	  $(call OptionPair,-tag,Note:X) ; \
-	  $(call OptionPair,-tag,ToDo:X) ; \
-	  $(call OptionPair,-tag,apiNote:a:API Note:) ; \
-	  $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
-	  $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
-	  $(call OptionPair,-tag,param) ; \
-	  $(call OptionPair,-tag,return) ; \
-	  $(call OptionPair,-tag,throws) ; \
-	  $(call OptionPair,-tag,since) ; \
-	  $(call OptionPair,-tag,version) ; \
-	  $(call OptionPair,-tag,serialData) ; \
-	  $(call OptionPair,-tag,factory) ; \
-	  $(call OptionPair,-tag,see) ; \
-	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
 	  $(call OptionOnly,-splitIndex) ; \
 	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
 	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \
@@ -441,7 +462,8 @@
 # Create file with javadoc options in it
 $(DOCLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -498,7 +520,8 @@
 # Create file with javadoc options in it
 $(TAGLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -550,7 +573,8 @@
 # Create file with javadoc options in it
 $(DOMAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -613,7 +637,8 @@
 # Create file with javadoc options in it
 $(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -700,7 +725,8 @@
 # Create file with javadoc options in it
 $(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -753,7 +779,8 @@
 # Create file with javadoc options in it
 $(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -806,7 +833,8 @@
 # Create file with javadoc options in it
 $(SMARTCARDIO_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -857,7 +885,8 @@
 # Create file with javadoc options in it
 $(HTTPSERVER_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -917,7 +946,8 @@
 # Create file with javadoc options in it
 $(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -969,7 +999,8 @@
 # Create file with javadoc options in it
 $(ATTACH_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1020,7 +1051,8 @@
 # Create file with javadoc options in it
 $(JCONSOLE_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1073,14 +1105,14 @@
 # Create file with javadoc options in it
 $(TREEAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
 	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
 	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \
-	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
 	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
 	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
@@ -1125,7 +1157,8 @@
 # Create file with javadoc options in it
 $(SCTPAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1176,7 +1209,8 @@
 # Create file with javadoc options in it
 $(JDKNET_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
--- a/make/Jprt.gmk	Fri Aug 08 10:35:05 2014 -0700
+++ b/make/Jprt.gmk	Fri Aug 08 11:36:48 2014 -0700
@@ -46,6 +46,10 @@
   JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
 endif
 
+ifeq ($(SKIP_BOOT_CYCLE), false)
+  jprt_bundle: bootcycle-images
+endif
+
 # This target must be called in the context of a SPEC file
 jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
 	@$(call CheckIfMakeAtEnd)
--- a/make/jprt.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/make/jprt.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -249,7 +249,7 @@
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98,			\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98_nontiered,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-scimark,		\
-    solaris_sparcv9_5.11-product-c2-runThese,				\
+    solaris_sparcv9_5.11-product-c2-runThese8,				\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParNewGC,	\
@@ -273,8 +273,9 @@
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98,			\
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98_nontiered,		\
     solaris_x64_5.11-{product|fastdebug}-c2-scimark,			\
-    solaris_x64_5.11-product-c2-runThese,				\
-    solaris_x64_5.11-product-c2-runThese_Xcomp,				\
+    solaris_x64_5.11-product-c2-runThese8,				\
+    solaris_x64_5.11-product-c2-runThese8_Xcomp_lang,			\
+    solaris_x64_5.11-product-c2-runThese8_Xcomp_vm,			\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParNewGC,		\
@@ -298,9 +299,11 @@
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-jvm98,			\
     linux_i586_2.6-{product|fastdebug}-c2-jvm98_nontiered,		\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-scimark,			\
-    linux_i586_2.6-product-c1-runThese_Xcomp,				\
-    linux_i586_2.6-fastdebug-c1-runThese_Xshare,			\
-    linux_i586_2.6-fastdebug-c2-runThese_Xcomp,				\
+    linux_i586_2.6-product-c1-runThese8_Xcomp_lang,			\
+    linux_i586_2.6-product-c1-runThese8_Xcomp_vm,			\
+    linux_i586_2.6-fastdebug-c1-runThese8_Xshare,			\
+    linux_i586_2.6-fastdebug-c2-runThese8_Xcomp_lang,			\
+    linux_i586_2.6-fastdebug-c2-runThese8_Xcomp_vm,			\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC,	\
@@ -366,9 +369,10 @@
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-jvm98,			\
     windows_i586_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-scimark,		\
-    windows_i586_6.1-product-{c1|c2}-runThese,				\
-    windows_i586_6.1-product-{c1|c2}-runThese_Xcomp,			\
-    windows_i586_6.1-fastdebug-c1-runThese_Xshare,			\
+    windows_i586_6.1-product-{c1|c2}-runThese8,				\
+    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_lang,		\
+    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_vm,		\
+    windows_i586_6.1-fastdebug-c1-runThese8_Xshare,			\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC,	\
@@ -392,8 +396,9 @@
     windows_x64_6.1-{product|fastdebug}-c2-jvm98,			\
     windows_x64_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
     windows_x64_6.1-{product|fastdebug}-c2-scimark,			\
-    windows_x64_6.1-product-c2-runThese,				\
-    windows_x64_6.1-product-c2-runThese_Xcomp,				\
+    windows_x64_6.1-product-c2-runThese8,				\
+    windows_x64_6.1-product-c2-runThese8_Xcomp_lang,			\
+    windows_x64_6.1-product-c2-runThese8_Xcomp_vm,			\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParNewGC,		\
@@ -460,19 +465,23 @@
   windows_i586_6.1-fastdebug-c2-hotspot_internalvmtests,		\
   windows_x64_6.1-fastdebug-c2-hotspot_internalvmtests
 
-my.make.rule.test.targets.hotspot.wbapitests=				\
-  solaris_sparcv9_5.11-{product|fastdebug}-c2-hotspot_wbapitest,	\
-  solaris_x64_5.11-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_i586_2.6-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_x64_2.6-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  windows_i586_6.1-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  windows_x64_6.1-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_i586_2.6-{product|fastdebug}-c1-hotspot_wbapitest,		\
-  windows_i586_6.1-{product|fastdebug}-c1-hotspot_wbapitest
+my.make.rule.test.targets.hotspot.reg.group=					\
+  solaris_sparcv9_5.11-{product|fastdebug}-c2-GROUP,				\
+  solaris_x64_5.11-{product|fastdebug}-c2-GROUP,				\
+  linux_i586_2.6-{product|fastdebug}-c2-GROUP,					\
+  linux_x64_2.6-{product|fastdebug}-c2-GROUP,					\
+  windows_i586_6.1-{product|fastdebug}-c2-GROUP,				\
+  windows_x64_6.1-{product|fastdebug}-c2-GROUP,					\
+  linux_i586_2.6-{product|fastdebug}-c1-GROUP,					\
+  windows_i586_6.1-{product|fastdebug}-c1-GROUP
 
-my.make.rule.test.targets.hotspot=					\
-  ${my.make.rule.test.targets.hotspot.clienttests},			\
-  ${my.make.rule.test.targets.hotspot.servertests},			\
-  ${my.make.rule.test.targets.hotspot.internalvmtests},			\
-  ${my.make.rule.test.targets.hotspot.wbapitests},			\
+my.make.rule.test.targets.hotspot=						\
+  ${my.make.rule.test.targets.hotspot.clienttests},				\
+  ${my.make.rule.test.targets.hotspot.servertests},				\
+  ${my.make.rule.test.targets.hotspot.internalvmtests},				\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_wbapitest},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_serviceability},	\
   ${my.additional.make.rule.test.targets.hotspot}
--- a/nashorn/.hgtags	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/.hgtags	Fri Aug 08 11:36:48 2014 -0700
@@ -257,3 +257,5 @@
 174cf53bce4e93a3d5d880ed7915ce8d0f08bc5e jdk9-b21
 a9d39bcfeb1bb3f7de929c56a2ecbea10a554ca1 jdk9-b22
 aa3fda2d2967847dbd264aa962d624c07fc6c29f jdk9-b23
+49d7a2a66ae6b70fee367e2ceb29d0c20f8be01b jdk9-b24
+b33633fc10c5bffd39d3492ed2602dadd8d44642 jdk9-b25
--- a/nashorn/make/build-nasgen.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/make/build-nasgen.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -36,11 +36,13 @@
                 <pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
                 <pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
                 <pathelement path="${basedir}/build/classes"/>
+                <pathelement location="${dist.dir}/nasgen.jar"/>
+                <pathelement path="${build.dir}/classes"/>
             </classpath>
             <jvmarg value="-Djava.ext.dirs="/>
-            <arg value="${basedir}/build/classes"/>
+            <arg value="${build.dir}/classes"/>
             <arg value="jdk.nashorn.internal.objects"/>
-            <arg value="${basedir}/build/classes"/>
+            <arg value="${build.dir}/classes"/>
         </java>
     </target>
 
--- a/nashorn/make/build.xml	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/make/build.xml	Fri Aug 08 11:36:48 2014 -0700
@@ -304,6 +304,14 @@
 grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
     permission java.security.AllPermission;
 };
+//// in case of absolute path:
+grant codeBase "file:/${nashorn.internal.tests.jar}" {
+    permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${file.reference.testng.jar}" {
+    permission java.security.AllPermission;
+};
 
 grant codeBase "file:/${basedir}/test/script/trusted/*" {
     permission java.security.AllPermission;
@@ -391,7 +399,7 @@
     <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
       <sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
@@ -413,7 +421,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <jvmarg line="${debug.test.jvmargs}"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
@@ -451,7 +459,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="testjfx-test-sys-prop."/>
         <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
@@ -471,7 +479,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="testmarkdown-test-sys-prop."/>
         <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
@@ -490,7 +498,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
       </propertyset>
@@ -510,7 +518,7 @@
     <!-- use just build.test.classes.dir to avoid referring to TestNG -->
     <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <classpath>
           <pathelement path="${run.test.classpath}"/>
       </classpath>
--- a/nashorn/make/project.properties	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/make/project.properties	Fri Aug 08 11:36:48 2014 -0700
@@ -309,7 +309,7 @@
 run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode -XX:TypeProfileLevel=222
 
 # Security manager args - make sure that we run with the nashorn.policy that the build creates
-run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
+run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${build.dir}/nashorn.policy
 
 # VM options for script tests with @fork option
 test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -cp ${run.test.classpath}
--- a/nashorn/src/jdk/internal/dynalink/linker/GuardedInvocation.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/internal/dynalink/linker/GuardedInvocation.java	Fri Aug 08 11:36:48 2014 -0700
@@ -193,7 +193,7 @@
         invocation.getClass(); // NPE check
         this.invocation = invocation;
         this.guard = guard;
-        this.switchPoints = switchPoints;
+        this.switchPoints = switchPoints == null ? null : switchPoints.clone();
         this.exception = exception;
     }
 
--- a/nashorn/src/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Fri Aug 08 11:36:48 2014 -0700
@@ -111,7 +111,7 @@
         private final TypeBasedGuardingDynamicLinker[] linkers;
         private final List<TypeBasedGuardingDynamicLinker>[] singletonLinkers;
 
-        @SuppressWarnings(value={"unchecked", "rawtypes"})
+        @SuppressWarnings({"unchecked", "rawtypes"})
         ClassToLinker(final TypeBasedGuardingDynamicLinker[] linkers) {
             this.linkers = linkers;
             singletonLinkers = new List[linkers.length];
@@ -135,7 +135,6 @@
                         case 1: {
                             list = new LinkedList<>(list);
                         }
-                        //$FALL-THROUGH$
                         default: {
                             list.add(linker);
                         }
--- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java	Fri Aug 08 11:36:48 2014 -0700
@@ -40,6 +40,7 @@
 import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
+
 import javax.script.AbstractScriptEngine;
 import javax.script.Bindings;
 import javax.script.Compilable;
@@ -50,6 +51,7 @@
 import javax.script.ScriptEngineFactory;
 import javax.script.ScriptException;
 import javax.script.SimpleBindings;
+
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.ErrorManager;
@@ -429,7 +431,7 @@
         return evalImpl(script, ctxt, getNashornGlobalFrom(ctxt));
     }
 
-    private Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private static Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         final Global oldGlobal = Context.getGlobal();
         final boolean globalChanged = (oldGlobal != ctxtGlobal);
         try {
@@ -450,7 +452,7 @@
         }
     }
 
-    private Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private static Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         if (script == null) {
             return null;
         }
--- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -314,7 +314,7 @@
         if (!symbol.isScope()) {
             final Type type = identNode.getType();
             if(type == Type.UNDEFINED) {
-                return method.loadUndefined(Type.OBJECT);
+                return method.loadUndefined(resultBounds.widest);
             }
 
             assert symbol.hasSlot() || symbol.isParam();
@@ -1097,7 +1097,11 @@
 
         closeBlockVariables(block);
         lc.releaseSlots();
-        assert !method.isReachable() || (lc.isFunctionBody() ? 0 : lc.getUsedSlotCount()) == method.getFirstTemp();
+        assert !method.isReachable() || (lc.isFunctionBody() ? 0 : lc.getUsedSlotCount()) == method.getFirstTemp() :
+            "reachable="+method.isReachable() +
+            " isFunctionBody=" + lc.isFunctionBody() +
+            " usedSlotCount=" + lc.getUsedSlotCount() +
+            " firstTemp=" + method.getFirstTemp();
 
         return block;
     }
@@ -4738,7 +4742,7 @@
          */
         private void replaceCompileTimeProperty(final Object propertyValue) {
             assert method.peekType().isObject();
-            if(propertyValue instanceof String) {
+            if(propertyValue instanceof String || propertyValue == null) {
                 method.load((String)propertyValue);
             } else if(propertyValue instanceof Integer) {
                 method.load(((Integer)propertyValue).intValue());
--- a/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java	Fri Aug 08 11:36:48 2014 -0700
@@ -43,7 +43,6 @@
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.HashMap;
-import java.util.IdentityHashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -334,15 +333,15 @@
                     sb.append("$restOf");
                 }
                 newUnit = compiler.createCompileUnit(sb.toString(), oldUnit.getWeight());
-                log.info("Creating new compile unit ", oldUnit, " => ", newUnit);
+                log.fine("Creating new compile unit ", oldUnit, " => ", newUnit);
                 map.put(oldUnit, newUnit);
                 assert newUnit != null;
                 newUnits.add(newUnit);
             }
 
-            log.info("Replacing compile units in Compiler...");
+            log.fine("Replacing compile units in Compiler...");
             compiler.replaceCompileUnits(newUnits);
-            log.info("Done");
+            log.fine("Done");
 
             //replace old compile units in function nodes, if any are assigned,
             //for example by running the splitter on this function node in a previous
@@ -564,7 +563,7 @@
                     append(compiler.getCompileUnits().size()).
                     append(" compile unit(s)]");
 
-                log.info(sb.toString());
+                log.fine(sb.toString());
             }
 
             return setStates(fn.setRootClass(null, rootClass), BYTECODE_INSTALLED);
--- a/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Fri Aug 08 11:36:48 2014 -0700
@@ -50,6 +50,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import java.util.logging.Level;
+
 import jdk.internal.dynalink.support.NameCodec;
 import jdk.nashorn.internal.codegen.ClassEmitter.Flag;
 import jdk.nashorn.internal.codegen.types.Type;
@@ -502,7 +503,7 @@
      */
     public FunctionNode compile(final FunctionNode functionNode, final CompilationPhases phases) throws CompilationException {
 
-        log.info("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc()));
+        log.finest("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc()));
         log.indent();
 
         final String name = DebugLogger.quote(functionNode.getName());
@@ -531,7 +532,7 @@
             time += (env.isTimingEnabled() ? phase.getEndTime() - phase.getStartTime() : 0L);
         }
 
-        if(typeInformationFile != null && !phases.isRestOfCompilation()) {
+        if (typeInformationFile != null && !phases.isRestOfCompilation()) {
             OptimisticTypesPersistence.store(typeInformationFile, invalidatedProgramPoints);
         }
 
--- a/nashorn/src/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -1196,9 +1196,7 @@
                 } else if(binaryNode.isOptimisticUndecidedType()) {
                     // At this point, we can assign a static type to the optimistic binary ADD operator as now we know
                     // the types of its operands.
-                    final Type type = Type.widest(binaryNode.lhs().getType(), binaryNode.rhs().getType());
-                    // Use Type.CHARSEQUENCE instead of Type.STRING to avoid conversion of ConsStrings to Strings.
-                    return binaryNode.setType(type.equals(Type.STRING) ? Type.CHARSEQUENCE : type);
+                    return binaryNode.decideType();
                 }
                 return binaryNode;
             }
--- a/nashorn/src/jdk/nashorn/internal/codegen/Lower.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Lower.java	Fri Aug 08 11:36:48 2014 -0700
@@ -34,6 +34,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.ListIterator;
+
 import jdk.nashorn.internal.ir.BaseNode;
 import jdk.nashorn.internal.ir.BinaryNode;
 import jdk.nashorn.internal.ir.Block;
--- a/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Fri Aug 08 11:36:48 2014 -0700
@@ -41,6 +41,7 @@
 import java.util.Date;
 import java.util.Map;
 import java.util.TreeMap;
+
 import jdk.nashorn.internal.codegen.types.Type;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
@@ -111,6 +112,7 @@
             return;
         }
         final File file = ((LocationDescriptor)locationDescriptor).file;
+
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
             @Override
             public Void run() {
@@ -119,7 +121,7 @@
                         out.getChannel().lock(); // lock exclusive
                         final DataOutputStream dout = new DataOutputStream(new BufferedOutputStream(out));
                         dout.writeInt(optimisticTypes.size());
-                        for(Map.Entry<Integer, Type> e: optimisticTypes.entrySet()) {
+                        for(final Map.Entry<Integer, Type> e: optimisticTypes.entrySet()) {
                             dout.writeInt(e.getKey());
                             final byte typeChar;
                             final Type type = e.getValue();
@@ -156,7 +158,6 @@
             return null;
         }
         final File file = ((LocationDescriptor)locationDescriptor).file;
-
         return AccessController.doPrivileged(new PrivilegedAction<Map<Integer, Type>>() {
             @Override
             public Map<Integer, Type> run() {
@@ -229,7 +230,7 @@
                 final String versionDirName;
                 try {
                     versionDirName = getVersionDirName();
-                } catch(Exception e) {
+                } catch(final Exception e) {
                     getLogger().warning("Failed to calculate version dir name", e);
                     return null;
                 }
@@ -306,7 +307,7 @@
 
     private static long getLastModifiedClassFile(final File dir, final long max) {
         long currentMax = max;
-        for(File f: dir.listFiles()) {
+        for(final File f: dir.listFiles()) {
             if(f.getName().endsWith(".class")) {
                 final long lastModified = f.lastModified();
                 if(lastModified > currentMax) {
--- a/nashorn/src/jdk/nashorn/internal/ir/BinaryNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/BinaryNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -183,17 +183,31 @@
         switch (tokenType()) {
         case ADD:
         case ASSIGN_ADD: {
+            // Compare this logic to decideType(Type, Type); it's similar, but it handles the optimistic type
+            // calculation case while this handles the conservative case.
             final Type lhsType = lhs.getType(localVariableTypes);
             final Type rhsType = rhs.getType(localVariableTypes);
             if(lhsType == Type.BOOLEAN && rhsType == Type.BOOLEAN) {
+                // Will always fit in an int, as the value range is [0, 1, 2]. If we didn't treat them specially here,
+                // they'd end up being treated as generic INT operands and their sum would be conservatively considered
+                // to be a LONG in the generic case below; we can do better here.
                 return Type.INT;
+            } else if(isString(lhsType) || isString(rhsType)) {
+                // We can statically figure out that this is a string if either operand is a string. In this case, use
+                // CHARSEQUENCE to prevent it from being proactively flattened.
+                return Type.CHARSEQUENCE;
             }
-            final Type widestOperandType = Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
+            final Type widestOperandType = Type.widest(undefinedToNumber(booleanToInt(lhsType)), undefinedToNumber(booleanToInt(rhsType)));
             if(widestOperandType == Type.INT) {
                 return Type.LONG;
             } else if (widestOperandType.isNumeric()) {
                 return Type.NUMBER;
             }
+            // We pretty much can't know what it will be statically. Must presume OBJECT conservatively, as we can end
+            // up getting either a string or an object when adding something + object, e.g.:
+            // 1 + {} == "1[object Object]", but
+            // 1 + {valueOf: function() { return 2 }} == 3. Also:
+            // 1 + {valueOf: function() { return "2" }} == "12".
             return Type.OBJECT;
         }
         case SHR:
@@ -256,10 +270,18 @@
         }
     }
 
+    private static boolean isString(final Type type) {
+        return type == Type.STRING || type == Type.CHARSEQUENCE;
+    }
+
     private static Type booleanToInt(final Type type) {
         return type == Type.BOOLEAN ? Type.INT : type;
     }
 
+    private static Type undefinedToNumber(final Type type) {
+        return type == Type.UNDEFINED ? Type.NUMBER : type;
+    }
+
     /**
      * Check if this node is an assignment
      *
@@ -527,7 +549,7 @@
 
     private Type getTypeUncached(final Function<Symbol, Type> localVariableTypes) {
         if(type == OPTIMISTIC_UNDECIDED_TYPE) {
-            return Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
+            return decideType(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
         }
         final Type widest = getWidestOperationType(localVariableTypes);
         if(type == null) {
@@ -536,6 +558,32 @@
         return Type.narrowest(widest, Type.widest(type, Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes))));
     }
 
+    private static Type decideType(final Type lhsType, final Type rhsType) {
+        // Compare this to getWidestOperationType() for ADD and ASSIGN_ADD cases. There's some similar logic, but these
+        // are optimistic decisions, meaning that we don't have to treat boolean addition separately (as it'll become
+        // int addition in the general case anyway), and that we also don't conservatively widen sums of ints to
+        // longs, or sums of longs to doubles.
+        if(isString(lhsType) || isString(rhsType)) {
+            return Type.CHARSEQUENCE;
+        }
+        // NOTE: We don't have optimistic object-to-(int, long) conversions. Therefore, if any operand is an Object, we
+        // bail out of optimism here and presume a conservative Object return value, as the object's ToPrimitive() can
+        // end up returning either a number or a string, and their common supertype is Object, for better or worse.
+        final Type widest = Type.widest(undefinedToNumber(booleanToInt(lhsType)), undefinedToNumber(booleanToInt(rhsType)));
+        return widest.isObject() ? Type.OBJECT : widest;
+    }
+
+    /**
+     * If the node is a node representing an add operation and has {@link #isOptimisticUndecidedType() optimistic
+     * undecided type}, decides its type. Should be invoked after its operands types have been finalized.
+     * @return returns a new node similar to this node, but with its type set to the type decided from the type of its
+     * operands.
+     */
+    public BinaryNode decideType() {
+        assert type == OPTIMISTIC_UNDECIDED_TYPE;
+        return setType(decideType(lhs.getType(), rhs.getType()));
+    }
+
     @Override
     public BinaryNode setType(final Type type) {
         if (this.type == type) {
--- a/nashorn/src/jdk/nashorn/internal/ir/Block.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/Block.java	Fri Aug 08 11:36:48 2014 -0700
@@ -149,7 +149,7 @@
     @Override
     public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
         if (visitor.enterBlock(this)) {
-            return visitor.leaveBlock(setStatements(lc, Node.accept(visitor, Statement.class, statements)));
+            return visitor.leaveBlock(setStatements(lc, Node.accept(visitor, statements)));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/CallNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/CallNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,6 +30,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Function;
+
 import jdk.nashorn.internal.codegen.types.Type;
 import jdk.nashorn.internal.ir.annotations.Ignore;
 import jdk.nashorn.internal.ir.annotations.Immutable;
@@ -175,10 +176,10 @@
         if (visitor.enterCallNode(this)) {
             final CallNode newCallNode = (CallNode)visitor.leaveCallNode(
                     setFunction((Expression)function.accept(visitor)).
-                    setArgs(Node.accept(visitor, Expression.class, args)).
+                    setArgs(Node.accept(visitor, args)).
                     setEvalArgs(evalArgs == null ?
                             null :
-                            evalArgs.setArgs(Node.accept(visitor, Expression.class, evalArgs.getArgs()))));
+                            evalArgs.setArgs(Node.accept(visitor, evalArgs.getArgs()))));
             // Theoretically, we'd need to instead pass lc to every setter and do a replacement on each. In practice,
             // setType from TypeOverride can't accept a lc, and we don't necessarily want to go there now.
             if (this != newCallNode) {
--- a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -359,7 +359,7 @@
      * @return a list of parameter nodes, potentially modified from original ones by the visitor.
      */
     public List<IdentNode> visitParameters(final NodeVisitor<? extends LexicalContext> visitor) {
-        return Node.accept(visitor, IdentNode.class, parameters);
+        return Node.accept(visitor, parameters);
     }
 
     /**
--- a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,7 @@
 import java.io.File;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+
 import jdk.nashorn.internal.runtime.Debug;
 import jdk.nashorn.internal.runtime.Source;
 
@@ -652,6 +653,7 @@
             return lnext;
         }
 
+        @SuppressWarnings("unchecked")
         private T findNext() {
             for (int i = index; i >= 0; i--) {
                 final Object node = stack[i];
@@ -660,7 +662,7 @@
                 }
                 if (clazz.isAssignableFrom(node.getClass())) {
                     index = i - 1;
-                    return clazz.cast(node);
+                    return (T)node;
                 }
             }
             return null;
--- a/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -934,7 +934,7 @@
         public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
             if (visitor.enterLiteralNode(this)) {
                 final List<Expression> oldValue = Arrays.asList(value);
-                final List<Expression> newValue = Node.accept(visitor, Expression.class, oldValue);
+                final List<Expression> newValue = Node.accept(visitor, oldValue);
                 return visitor.leaveLiteralNode(oldValue != newValue ? setValue(lc, newValue) : this);
             }
             return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/Node.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/Node.java	Fri Aug 08 11:36:48 2014 -0700
@@ -27,6 +27,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import jdk.nashorn.internal.ir.visitor.NodeVisitor;
 import jdk.nashorn.internal.parser.Token;
 import jdk.nashorn.internal.parser.TokenType;
@@ -232,19 +233,34 @@
     }
 
     //on change, we have to replace the entire list, that's we can't simple do ListIterator.set
-    static <T extends Node> List<T> accept(final NodeVisitor<? extends LexicalContext> visitor, final Class<T> clazz, final List<T> list) {
-        boolean changed = false;
-        final List<T> newList = new ArrayList<>();
-
-        for (final Node node : list) {
-            final T newNode = node == null ? null : clazz.cast(node.accept(visitor));
-            if (newNode != node) {
-                changed = true;
-            }
-            newList.add(newNode);
+    static <T extends Node> List<T> accept(final NodeVisitor<? extends LexicalContext> visitor, final List<T> list) {
+        final int size = list.size();
+        if (size == 0) {
+            return list;
         }
 
-        return changed ? newList : list;
+         List<T> newList = null;
+
+        for (int i = 0; i < size; i++) {
+            final T node = list.get(i);
+            @SuppressWarnings("unchecked")
+            final T newNode = node == null ? null : (T)node.accept(visitor);
+            if (newNode != node) {
+                if (newList == null) {
+                    newList = new ArrayList<>(size);
+                    for (int j = 0; j < i; j++) {
+                        newList.add(list.get(j));
+                    }
+                }
+                newList.add(newNode);
+            } else {
+                if (newList != null) {
+                    newList.add(node);
+                }
+            }
+        }
+
+        return newList == null ? list : newList;
     }
 
     static <T extends LexicalContextNode> T replaceInLexicalContext(final LexicalContext lc, final T oldNode, final T newNode) {
--- a/nashorn/src/jdk/nashorn/internal/ir/ObjectNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/ObjectNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -61,7 +61,7 @@
     @Override
     public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
         if (visitor.enterObjectNode(this)) {
-            return visitor.leaveObjectNode(setElements(Node.accept(visitor, PropertyNode.class, elements)));
+            return visitor.leaveObjectNode(setElements(Node.accept(visitor, elements)));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/SwitchNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/SwitchNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -104,7 +104,7 @@
         if (visitor.enterSwitchNode(this)) {
             return visitor.leaveSwitchNode(
                 setExpression(lc, (Expression)expression.accept(visitor)).
-                setCases(lc, Node.accept(visitor, CaseNode.class, cases), defaultCaseIndex));
+                setCases(lc, Node.accept(visitor, cases), defaultCaseIndex));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/TryNode.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/TryNode.java	Fri Aug 08 11:36:48 2014 -0700
@@ -112,7 +112,7 @@
             return visitor.leaveTryNode(
                 setBody(newBody).
                 setFinallyBody(newFinallyBody).
-                setCatchBlocks(Node.accept(visitor, Block.class, catchBlocks)).
+                setCatchBlocks(Node.accept(visitor, catchBlocks)).
                 setFinallyCatchAll(finallyCatchAll));
         }
 
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/ClassHistogramElement.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/ClassHistogramElement.java	Fri Aug 08 11:36:48 2014 -0700
@@ -30,7 +30,7 @@
 /**
  * Class histogram element for IR / Java object instrumentation
  */
-public class ClassHistogramElement {
+public final class ClassHistogramElement {
     /**
      * Instance comparator
      */
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import jdk.internal.org.objectweb.asm.Attribute;
 import jdk.internal.org.objectweb.asm.Handle;
 import jdk.internal.org.objectweb.asm.Label;
@@ -1082,11 +1083,15 @@
             contents.put(node, sb);
         }
 
+        private static String dottyFriendly(final String name) {
+            return name.replace(':', '_');
+        }
+
         @Override
         public String toString() {
 
             final StringBuilder sb = new StringBuilder();
-            sb.append("digraph " + name + " {");
+            sb.append("digraph " + dottyFriendly(name) + " {");
             sb.append("\n");
             sb.append("\tgraph [fontname=courier]\n");
             sb.append("\tnode [style=filled,color="+COLOR_DEFAULT+",fontname=courier]\n");
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/ObjectSizeCalculator.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/ObjectSizeCalculator.java	Fri Aug 08 11:36:48 2014 -0700
@@ -52,7 +52,7 @@
  * this fact and will report incorrect sizes, as it will presume the default JVM
  * behavior.
  */
-public class ObjectSizeCalculator {
+public final class ObjectSizeCalculator {
 
     /**
      * Describes constant memory overheads for various constructs in a JVM implementation.
--- a/nashorn/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java	Fri Aug 08 11:36:48 2014 -0700
@@ -124,11 +124,13 @@
      * @return return value unmodified
      */
     static Object traceReturn(final DebugLogger logger, final Object value) {
-        final String str = "    return" +
-                (VOID_TAG.equals(value) ?
-                    ";" :
-                    " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
-        logger.log(TRACE_LEVEL, str);
+        if (logger.isEnabled()) {
+            final String str = "    return" +
+                    (VOID_TAG.equals(value) ?
+                        ";" :
+                        " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
+            logger.log(TRACE_LEVEL, str);
+        }
         return value;
     }
 
--- a/nashorn/src/jdk/nashorn/internal/objects/Global.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java	Fri Aug 08 11:36:48 2014 -0700
@@ -46,8 +46,10 @@
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicReference;
+
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
+
 import jdk.internal.dynalink.linker.GuardedInvocation;
 import jdk.internal.dynalink.linker.LinkRequest;
 import jdk.nashorn.api.scripting.ScriptObjectMirror;
@@ -563,6 +565,8 @@
      * Initialize standard builtin objects like "Object", "Array", "Function" etc.
      * as well as our extension builtin objects like "Java", "JSAdapter" as properties
      * of the global scope object.
+     *
+     * @param engine ScriptEngine to initialize
      */
     public void initBuiltinObjects(final ScriptEngine engine) {
         if (this.builtinObject != null) {
@@ -1936,15 +1940,16 @@
     }
 
     private Object printImpl(final boolean newLine, final Object... objects) {
+        @SuppressWarnings("resource")
         final PrintWriter out = scontext != null? new PrintWriter(scontext.getWriter()) : getContext().getEnv().getOut();
         final StringBuilder sb = new StringBuilder();
 
-        for (final Object object : objects) {
+        for (final Object obj : objects) {
             if (sb.length() != 0) {
                 sb.append(' ');
             }
 
-            sb.append(JSType.toString(object));
+            sb.append(JSType.toString(obj));
         }
 
         // Print all at once to ensure thread friendly result.
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java	Fri Aug 08 11:36:48 2014 -0700
@@ -935,7 +935,6 @@
                     }
                     sb.append(' ');
 
-                    //$FALL-THROUGH$
                 case FORMAT_TIME:
                     final TimeZone tz = nd.getTimeZone();
                     final double utcTime = nd.getTime();
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,6 +39,7 @@
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Callable;
+
 import jdk.internal.dynalink.beans.BeansLinker;
 import jdk.internal.dynalink.beans.StaticClass;
 import jdk.internal.dynalink.linker.GuardedInvocation;
@@ -716,7 +717,7 @@
         return target;
     }
 
-    /*
+    /**
      * Binds the source mirror object's properties to the target object. Binding
      * properties allows two-way read/write for the properties of the source object.
      * All inherited, enumerable properties are also bound. This method is used to
@@ -731,7 +732,7 @@
         // make accessor properties using dynamic invoker getters and setters
         final AccessorProperty[] props = new AccessorProperty[keys.size()];
         int idx = 0;
-        for (String name : keys) {
+        for (final String name : keys) {
             final MethodHandle getter = Bootstrap.createDynamicInvoker("dyn:getMethod|getProp|getElem:" + name, MIRROR_GETTER_TYPE);
             final MethodHandle setter = Bootstrap.createDynamicInvoker("dyn:setProp|setElem:" + name, MIRROR_SETTER_TYPE);
             props[idx] = AccessorProperty.create(name, 0, getter, setter);
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Fri Aug 08 11:36:48 2014 -0700
@@ -80,7 +80,8 @@
 
         private static final MethodHandle GET_ELEM = specialCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "getElem", int.class, int.class).methodHandle();
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
-        private static final MethodHandle RINT     = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", double.class, double.class).methodHandle();
+        private static final MethodHandle RINT_D   = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", double.class, double.class).methodHandle();
+        private static final MethodHandle RINT_O   = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", Object.class, Object.class).methodHandle();
         private static final MethodHandle CLAMP_LONG = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "clampLong", long.class, long.class).methodHandle();
 
         private Uint8ClampedArrayData(final ByteBuffer nb, final int start, final int end) {
@@ -109,8 +110,10 @@
         public MethodHandle getElementSetter(final Class<?> elementType) {
             final MethodHandle setter = super.getElementSetter(elementType); //getContinuousElementSetter(getClass(), setElem(), elementType);
             if (setter != null) {
-                if (elementType == double.class) {
-                    return MH.filterArguments(setter, 2, RINT);
+                if (elementType == Object.class) {
+                    return MH.filterArguments(setter, 2, RINT_O);
+                } else if (elementType == double.class) {
+                    return MH.filterArguments(setter, 2, RINT_D);
                 } else if (elementType == long.class) {
                     return MH.filterArguments(setter, 2, CLAMP_LONG);
                 }
@@ -191,6 +194,11 @@
         }
 
         @SuppressWarnings("unused")
+        private static Object rint(final Object rint) {
+            return rint(JSType.toNumber(rint));
+        }
+
+        @SuppressWarnings("unused")
         private static long clampLong(final long l) {
             if(l < 0L) {
                 return 0L;
--- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Fri Aug 08 11:36:48 2014 -0700
@@ -28,7 +28,7 @@
 import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
-import jdk.nashorn.api.scripting.NashornException;
+
 import jdk.nashorn.internal.codegen.CompilerConstants;
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.scripts.JS;
--- a/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Fri Aug 08 11:36:48 2014 -0700
@@ -36,6 +36,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+
 import jdk.internal.dynalink.support.NameCodec;
 import jdk.nashorn.internal.codegen.CompileUnit;
 import jdk.nashorn.internal.codegen.Compiler;
@@ -236,14 +237,14 @@
     /**
      * Initialize transient fields on deserialized instances
      *
-     * @param source source
-     * @param installer code installer
+     * @param src source
+     * @param inst code installer
      */
-    public void initTransients(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
+    public void initTransients(final Source src, final CodeInstaller<ScriptEnvironment> inst) {
         if (this.source == null && this.installer == null) {
-            this.source = source;
-            this.installer = installer;
-        } else if (this.source != source || this.installer != installer) {
+            this.source    = src;
+            this.installer = inst;
+        } else if (this.source != src || this.installer != inst) {
             // Existing values must be same as those passed as parameters
             throw new IllegalArgumentException();
         }
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java	Fri Aug 08 11:36:48 2014 -0700
@@ -3626,7 +3626,6 @@
         return MH.insertArguments(KNOWNFUNCPROPGUARDPROTO, 1, map, getter, depth, func);
     }
 
-    @SuppressWarnings("unused")
     private static ScriptObject getProto(final ScriptObject self, final int depth) {
         ScriptObject proto = self;
         for (int d = 0; d < depth; d++) {
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java	Fri Aug 08 11:36:48 2014 -0700
@@ -484,17 +484,16 @@
             final Object unwrapped = ScriptObjectMirror.unwrap(expression, global);
             if (unwrapped instanceof ScriptObject) {
                 return new WithObject(scope, (ScriptObject)unwrapped);
-            } else {
-                // foreign ScriptObjectMirror
-                ScriptObject exprObj = global.newObject();
-                NativeObject.bindAllProperties(exprObj, (ScriptObjectMirror)expression);
-                return new WithObject(scope, exprObj);
             }
-        } else {
-            final Object wrappedExpr = JSType.toScriptObject(global, expression);
-            if (wrappedExpr instanceof ScriptObject) {
-                return new WithObject(scope, (ScriptObject)wrappedExpr);
-            }
+            // foreign ScriptObjectMirror
+            final ScriptObject exprObj = global.newObject();
+            NativeObject.bindAllProperties(exprObj, (ScriptObjectMirror)expression);
+            return new WithObject(scope, exprObj);
+        }
+
+        final Object wrappedExpr = JSType.toScriptObject(global, expression);
+        if (wrappedExpr instanceof ScriptObject) {
+            return new WithObject(scope, (ScriptObject)wrappedExpr);
         }
 
         throw typeError(global, "cant.apply.with.to.non.scriptobject");
@@ -819,9 +818,8 @@
 
     /** ECMA 11.9.6 The Strict Equality Comparison Algorithm */
     private static boolean strictEquals(final Object x, final Object y) {
-        if(x == y) {
-            return true;
-        }
+        // NOTE: you might be tempted to do a quick x == y comparison. Remember, though, that any Double object having
+        // NaN value is not equal to itself by value even though it is referentially.
 
         final JSType xType = JSType.ofNoFunction(x);
         final JSType yType = JSType.ofNoFunction(y);
--- a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java	Fri Aug 08 11:36:48 2014 -0700
@@ -31,12 +31,13 @@
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
 import java.lang.invoke.SwitchPoint;
-import jdk.nashorn.api.scripting.AbstractJSObject;
-import jdk.nashorn.api.scripting.ScriptObjectMirror;
+
 import jdk.internal.dynalink.CallSiteDescriptor;
 import jdk.internal.dynalink.linker.GuardedInvocation;
 import jdk.internal.dynalink.linker.LinkRequest;
 import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
+import jdk.nashorn.api.scripting.AbstractJSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor;
 import jdk.nashorn.internal.runtime.linker.NashornGuards;
 
@@ -322,6 +323,7 @@
                 // We need to make sure correct 'this' is used for calls with Ident call
                 // expressions. We do so here using an AbstractJSObject instance.
                 return new AbstractJSObject() {
+                    @Override
                     public Object call(final Object thiz, final Object... args) {
                         return mirror.call(withFilterExpression(receiver), args);
                     }
--- a/nashorn/src/jdk/nashorn/internal/runtime/options/Options.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/src/jdk/nashorn/internal/runtime/options/Options.java	Fri Aug 08 11:36:48 2014 -0700
@@ -78,7 +78,10 @@
     /** The options map of enabled options */
     private final TreeMap<String, Option<?>> options;
 
-    /** System property that can be used for command line option propagation */
+    /** System property that can be used to prepend options to the explicitly specified command line. */
+    private static final String NASHORN_ARGS_PREPEND_PROPERTY = "nashorn.args.prepend";
+
+    /** System property that can be used to append options to the explicitly specified command line. */
     private static final String NASHORN_ARGS_PROPERTY = "nashorn.args";
 
     /**
@@ -419,15 +422,9 @@
      */
     public void process(final String[] args) {
         final LinkedList<String> argList = new LinkedList<>();
+        addSystemProperties(NASHORN_ARGS_PREPEND_PROPERTY, argList);
         Collections.addAll(argList, args);
-
-        final String extra = getStringProperty(NASHORN_ARGS_PROPERTY, null);
-        if (extra != null) {
-            final StringTokenizer st = new StringTokenizer(extra);
-            while (st.hasMoreTokens()) {
-                argList.add(st.nextToken());
-            }
-        }
+        addSystemProperties(NASHORN_ARGS_PROPERTY, argList);
 
         while (!argList.isEmpty()) {
             final String arg = argList.remove(0);
@@ -509,6 +506,16 @@
         }
     }
 
+    private static void addSystemProperties(final String sysPropName, final List<String> argList) {
+        final String sysArgs = getStringProperty(sysPropName, null);
+        if (sysArgs != null) {
+            final StringTokenizer st = new StringTokenizer(sysArgs);
+            while (st.hasMoreTokens()) {
+                argList.add(st.nextToken());
+            }
+        }
+    }
+
     private static OptionTemplate getOptionTemplate(final String key) {
         for (final OptionTemplate t : Options.validOptions) {
             if (t.matches(key)) {
--- a/nashorn/test/script/basic/JDK-8030182_2.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/JDK-8030182_2.js	Fri Aug 08 11:36:48 2014 -0700
@@ -41,6 +41,6 @@
 try {
     eval(str);
 } catch (e) {
-    print(e.stack.replace(/\\/g, '/'));
+    print(e.stack.replace(/\\/g, '/').replace(/<eval>@[0-9]+/, '<eval>@<id>'));
 }
 
--- a/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED	Fri Aug 08 11:36:48 2014 -0700
@@ -1,3 +1,3 @@
 ReferenceError: "g" is not defined
-	at <program> (test/script/basic/JDK-8030182_2.js#42:4<eval>@1:-1)
+	at <program> (test/script/basic/JDK-8030182_2.js#42:4<eval>@<id>:-1)
 	at <program> (test/script/basic/JDK-8030182_2.js:42)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8051439.js	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010, 2014, 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-8051439: Wrong type calculated for ADD operator with undefined operand
+ *
+ * @test
+ * @run
+ */
+
+// Test + operator
+function f1() { 
+    var x; 
+    for (var i = 0;i < 3; i++) { 
+        x = x + i; 
+    }
+    x = x + "test"; 
+    return x; 
+} 
+
+// Test += operator
+function f2() { 
+    var x; 
+    for (var i = 0;i < 3; i++) { 
+        x += i; 
+    }
+    x += "test"; 
+    return x; 
+} 
+
+print(f1());
+print(f2());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8051439.js.EXPECTED	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,2 @@
+NaNtest
+NaNtest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-normal.js	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010, 2013, 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.
+ */
+
+/**
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
+ * @test
+ * @runif external.octane
+ * @option -scripting
+ * @option -Dnashorn.typeInfo.disabled=true
+ * @option --class-cache-size=0
+ * @option --persistent-code-cache=false
+ */
+
+var fn  = __DIR__ + 'compile-octane.js';
+var url = "file://" + fn; 
+loadWithNewGlobal(new java.net.URL(url));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-normal.js.EXPECTED	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,30 @@
+Compiling 'box2d'...
+Done.
+Compiling 'code-load'...
+Done.
+Compiling 'crypto'...
+Done.
+Compiling 'deltablue'...
+Done.
+Compiling 'earley-boyer'...
+Done.
+Compiling 'gbemu'... (2 files)
+Done.
+Compiling 'mandreel'...
+Done.
+Compiling 'navier-stokes'...
+Done.
+Compiling 'pdfjs'...
+Done.
+Compiling 'raytrace'...
+Done.
+Compiling 'regexp'...
+Done.
+Compiling 'richards'...
+Done.
+Compiling 'splay'...
+Done.
+Compiling 'typescript'... (3 files)
+Done.
+Compiling 'zlib'... (2 files)
+Done.
--- a/nashorn/test/script/basic/compile-octane-splitter.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/compile-octane-splitter.js	Fri Aug 08 11:36:48 2014 -0700
@@ -22,12 +22,22 @@
  */
 
 /**
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
  * @test
  * @option -Dnashorn.compiler.splitter.threshold=1000
  * @fork
  * @runif external.octane
  * @option -scripting
+ * @option -Dnashorn.typeInfo.disabled=true
+ * @option --class-cache-size=0
+ * @option --persistent-code-cache=false
  */
 
-compile_only = true;
-load(__DIR__ + 'run-octane.js');
+var fn  = __DIR__ + 'compile-octane.js';
+var url = "file://" + fn; 
+loadWithNewGlobal(new java.net.URL(url));
--- a/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED	Fri Aug 08 11:36:48 2014 -0700
@@ -1,15 +1,30 @@
-[box2d] Compiled OK
-[code-load] Compiled OK
-[crypto] Compiled OK
-[deltablue] Compiled OK
-[earley-boyer] Compiled OK
-[gbemu] Compiled OK
-[mandreel] Compiled OK
-[navier-stokes] Compiled OK
-[pdfjs] Compiled OK
-[raytrace] Compiled OK
-[regexp] Compiled OK
-[richards] Compiled OK
-[splay] Compiled OK
-[typescript] Compiled OK
-[zlib] Compiled OK
+Compiling 'box2d'...
+Done.
+Compiling 'code-load'...
+Done.
+Compiling 'crypto'...
+Done.
+Compiling 'deltablue'...
+Done.
+Compiling 'earley-boyer'...
+Done.
+Compiling 'gbemu'... (2 files)
+Done.
+Compiling 'mandreel'...
+Done.
+Compiling 'navier-stokes'...
+Done.
+Compiling 'pdfjs'...
+Done.
+Compiling 'raytrace'...
+Done.
+Compiling 'regexp'...
+Done.
+Compiling 'richards'...
+Done.
+Compiling 'splay'...
+Done.
+Compiling 'typescript'... (3 files)
+Done.
+Compiling 'zlib'... (2 files)
+Done.
--- a/nashorn/test/script/basic/compile-octane.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/compile-octane.js	Fri Aug 08 11:36:48 2014 -0700
@@ -22,10 +22,122 @@
  */
 
 /**
- * @test
- * @runif external.octane
- * @option -scripting
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
+ * This means that if you use this subtest as a compilation test
+ * harness, pass the arguments:
+ *
+ * -scripting -Dnashorn.typeInfo.disabled=true --class-cache-size=0 
+ * --persistent-code-cache=false
+ *
+ * @subtest
  */
 
-compile_only = true;
-load(__DIR__ + 'run-octane.js');
+load(__DIR__ + 'octane-payload.js');
+
+var DEFAULT_ITERS = 1; //default is one iteration through each benchmark
+var iters = DEFAULT_ITERS; 
+var args = [];
+
+if (typeof $ARGS !== 'undefined') {
+    args = $ARGS;
+} else if (typeof arguments !== 'undefined' && arguments.length != 0) {
+    args = arguments;
+}
+
+var onlyTheseTests = [];
+var verbose = false;
+
+for (var i = 0; i < args.length; ) {
+    var arg = args[i];
+    if (arg === '--iterations') {
+	iters = +args[++i];
+    } else if (arg === '--verbose') {
+	verbose = true;
+    } else {
+	onlyTheseTests.push(arg);
+    }
+    i++;
+}
+
+if (isNaN(iters)) {
+    iters = DEFAULT_ITERS;
+}
+
+if (iters != DEFAULT_ITERS) {
+    print("Running " + iters + " iterations of each compilation.");
+}
+
+function print_if_verbose(x) {
+    if (verbose) {
+	print(x);
+    }
+}
+
+function contains(a, obj) {
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] === obj) {
+            return true;
+        }
+    }
+    return false;
+}
+
+var testsCompiled = [];
+
+for (var j in tests) {
+    var test_name = tests[j].name;
+    var files = tests[j].files;
+
+    if (onlyTheseTests.length > 0 && !contains(onlyTheseTests, test_name)) {
+	print_if_verbose("Skipping " + test_name);
+	continue;
+    }
+
+    if (!contains(testsCompiled, test_name)) {
+	testsCompiled.push(test_name);
+    }
+
+    var str = "Compiling '" + test_name + "'...";
+    if (files.length > 1) {
+	str += " (" + files.length + " files)";
+    }
+    if (iters != 1) {
+	str += " (" + iters + " times)";
+    }
+    str + "...";
+    print(str);
+
+    for (var iteration = 0; iteration < iters; iteration++) {
+
+	//get a new global to avoid symbol pollution and reloads of base
+	//in the same namespace
+	var newGlobal = loadWithNewGlobal({script:'this', name:'test'});
+
+	//load base into the new global so we get BenchmarkSuite etc
+	newGlobal.load(base); 
+
+	//load all files in the single benchmark
+	for (var k in files) {	    
+	    var file = files[k];
+	    if (iteration >= 0) { //only display message on first iteration
+		var str2 = "\t";
+		if (iters > 1) {
+		    str2 += " [iteration " + (iteration + 1) + "]";
+		}
+		str2 += " processing file: " + file + "...";
+		print_if_verbose(str2);
+	    }
+	    newGlobal.load("file://" + path + file);
+	}
+    }
+    print("Done.");
+}
+
+if (testsCompiled.length == 0) {
+    print("Error: no tests given to compile");
+}
--- a/nashorn/test/script/basic/compile-octane.js.EXPECTED	Fri Aug 08 10:35:05 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-[box2d] Compiled OK
-[code-load] Compiled OK
-[crypto] Compiled OK
-[deltablue] Compiled OK
-[earley-boyer] Compiled OK
-[gbemu] Compiled OK
-[mandreel] Compiled OK
-[navier-stokes] Compiled OK
-[pdfjs] Compiled OK
-[raytrace] Compiled OK
-[regexp] Compiled OK
-[richards] Compiled OK
-[splay] Compiled OK
-[typescript] Compiled OK
-[zlib] Compiled OK
--- a/nashorn/test/script/basic/hideLocationProperties.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/hideLocationProperties.js	Fri Aug 08 11:36:48 2014 -0700
@@ -46,7 +46,7 @@
     (function() { print(__FILE__) })()
 }
 
-print(__FILE__)
+print(__FILE__.replace(/\\/g, "/"))
 
 var o = { __FILE__: "woot" }
 with(o) { print(__FILE__) }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/octane-payload.js	Fri Aug 08 11:36:48 2014 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2010, 2014, 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.
+ */
+
+/**
+ * @subtest
+ */
+
+function initZlib() {
+    zlib = new BenchmarkSuite('zlib', [152815148], [
+                            new Benchmark('zlib', false, true, 10,
+                                  runZlib, undefined, tearDownZlib, null, 3)]);
+}
+
+var tests = [
+    {name:"box2d",         files:["box2d.js"],                         suite:"Box2DBenchmark"},
+    {name:"code-load",     files:["code-load.js"],                     suite:"CodeLoad"},
+    {name:"crypto",        files:["crypto.js"],                        suite:"Crypto"},
+    {name:"deltablue",     files:["deltablue.js"],                     suite:"DeltaBlue"},
+    {name:"earley-boyer",  files:["earley-boyer.js"],                  suite:"EarleyBoyer"},
+    {name:"gbemu",         files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"},
+    {name:"mandreel",      files:["mandreel.js"],                      suite:"MandreelBenchmark"},
+    {name:"navier-stokes", files:["navier-stokes.js"],                 suite:"NavierStokes"},
+    {name:"pdfjs",         files:["pdfjs.js"],                         suite:"PdfJS"},
+    {name:"raytrace",      files:["raytrace.js"],                      suite:"RayTrace"},
+    {name:"regexp",        files:["regexp.js"],                        suite:"RegExpSuite"},
+    {name:"richards",      files:["richards.js"],                      suite:"Richards"},
+    {name:"splay",         files:["splay.js"],                         suite:"Splay"},
+    {name:"typescript",    files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"},
+    //zlib currently disabled - requires read
+    {name:"zlib",          files:["zlib.js", "zlib-data.js"], suite:"zlib", before:initZlib}
+];
+
+var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
+
+// TODO: why is this path hard coded when it's defined in project properties?
+var path = dir + "../external/octane/";
+var base = path + "base.js";
+
--- a/nashorn/test/script/basic/optimistic_arithmetic_check_type.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/optimistic_arithmetic_check_type.js	Fri Aug 08 11:36:48 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/optimistic_assignment_check_type.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/optimistic_assignment_check_type.js	Fri Aug 08 11:36:48 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/optimistic_check_type.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/optimistic_check_type.js	Fri Aug 08 11:36:48 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/run-octane.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/basic/run-octane.js	Fri Aug 08 11:36:48 2014 -0700
@@ -24,36 +24,8 @@
 /**
  * @subtest
  */
-
-
-function initZlib() {
-    zlib = new BenchmarkSuite('zlib', [152815148], [
-                            new Benchmark('zlib', false, true, 10,
-                                  runZlib, undefined, tearDownZlib, null, 3)]);
-}
-
-var tests = [
-    {name:"box2d",         files:["box2d.js"],                         suite:"Box2DBenchmark"},
-    {name:"code-load",     files:["code-load.js"],                     suite:"CodeLoad"},
-    {name:"crypto",        files:["crypto.js"],                        suite:"Crypto"},
-    {name:"deltablue",     files:["deltablue.js"],                     suite:"DeltaBlue"},
-    {name:"earley-boyer",  files:["earley-boyer.js"],                  suite:"EarleyBoyer"},
-    {name:"gbemu",         files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"},
-    {name:"mandreel",      files:["mandreel.js"],                      suite:"MandreelBenchmark"},
-    {name:"navier-stokes", files:["navier-stokes.js"],                 suite:"NavierStokes"},
-    {name:"pdfjs",         files:["pdfjs.js"],                         suite:"PdfJS"},
-    {name:"raytrace",      files:["raytrace.js"],                      suite:"RayTrace"},
-    {name:"regexp",        files:["regexp.js"],                        suite:"RegExpSuite"},
-    {name:"richards",      files:["richards.js"],                      suite:"Richards"},
-    {name:"splay",         files:["splay.js"],                         suite:"Splay"},
-    {name:"typescript",    files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"},
-    //zlib currently disabled - requires read
-    {name:"zlib",          files:["zlib.js", "zlib-data.js"], suite:"zlib", before:initZlib}
-];
-var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
-
-// TODO: why is this path hard coded when it's defined in project properties?
-var path = dir + "../external/octane/";
+var payload = __DIR__ + "octane-payload.js";
+load(payload);
 
 var runtime = undefined;
 var verbose = false;
--- a/nashorn/test/script/nosecurity/JDK-8050964.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/nosecurity/JDK-8050964.js	Fri Aug 08 11:36:48 2014 -0700
@@ -46,8 +46,11 @@
     nashornJar = new File(".", nashornJar);
 }
 
+var javahome = System.getProperty("java.home");
+var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
+
 // run jdep on nashorn.jar - only summary but print profile info
-`jdeps -s -P ${nashornJar.absolutePath}`
+`${jdepsPath} -s -P ${nashornJar.absolutePath}`
 
 // check for "(compact1)" in output from jdep tool
 if (! /(compact1)/.test($OUT)) {
--- a/nashorn/test/script/trusted/event_queue.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/trusted/event_queue.js	Fri Aug 08 11:36:48 2014 -0700
@@ -29,6 +29,7 @@
  * @fork
  * @option -Dnashorn.debug=true
  * @option --log=recompile:quiet
+ * @option --optimistic-types=true
  */
 
 print(Debug);
--- a/nashorn/test/script/trusted/optimistic_recompilation.js	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/script/trusted/optimistic_recompilation.js	Fri Aug 08 11:36:48 2014 -0700
@@ -28,6 +28,7 @@
  * @fork
  * @option -Dnashorn.debug=true
  * @option --log=recompile:quiet
+ * @option --optimistic-types=true
  */
 
 var forName       = java.lang.Class["forName(String)"];
--- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Fri Aug 08 11:36:48 2014 -0700
@@ -607,6 +607,14 @@
         assertEquals(res, "hello");
     }
 
+    // @bug 8054223: Nashorn: AssertionError when use __DIR__ and ScriptEngine.eval()
+    @Test
+    public void check__DIR__Test() throws ScriptException {
+        final ScriptEngineManager m = new ScriptEngineManager();
+        final ScriptEngine e = m.getEngineByName("nashorn");
+        e.eval("__DIR__");
+    }
+
     // @bug 8050432:javax.script.filename variable should not be enumerable
     // with nashorn engine's ENGINE_SCOPE bindings
     @Test
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java	Fri Aug 08 10:35:05 2014 -0700
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java	Fri Aug 08 11:36:48 2014 -0700
@@ -39,7 +39,8 @@
 public abstract class TestHelper {
 
     public static final String TEST_ROOT   = "test";
-    public static final String BUILD_ROOT  = "build/test";
+    public static final String BUILD_ROOT =
+        System.getProperty("build.dir", "build") + File.separator + "test";
     public static final String TEST_PREFIX = TEST_ROOT + File.separator;
 
     private TestHelper() {