changeset 1409:74bdfe679687 jdk8u112-b16-aarch32-161109

Merge
author snazarki
date Tue, 08 Nov 2016 17:14:31 +0300
parents a50ef9c31e38 8ef3cc2bbc7d
children 544dc06d729f
files .hgtags
diffstat 4 files changed, 112 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Sep 04 20:31:45 2016 +0100
+++ b/.hgtags	Tue Nov 08 17:14:31 2016 +0300
@@ -600,6 +600,9 @@
 8f0466c0dce60b1df3bc01785b01a7f09fa7b564 jdk8u92-b13
 5617f9bec354fb2c60bbb816d175f4cee7d2c56e jdk8u92-b14
 fe88377e18b0c5f3da8e6741e0d5b9bfd45d2648 jdk8u92-b31
+11e4e7e901bc86d14163afbc5d28345e36737344 jdk8u92-b32
+9ed665d319590e0b9997b3703314c6b0341d4362 jdk8u92-b33
+5b5f76caf6e4ffa51f25e64d0d79a3f0913c633e jdk8u92-b34
 073b951904b3ee7c54fb79a169478fa66d925320 jdk8u75-b00
 5b48f7defe40eab668fe554df0afd87d84d60722 jdk8u75-b01
 0015f4a7f0d02a9bb79b7a0c737590f01feaabd4 jdk8u75-b02
@@ -665,3 +668,35 @@
 a7c292080d5ed76ea5e3b123c0dee4c340aa174f jdk8u102-b13
 e55f058f2d3218e8b829c7dd4e43472a337a07dc jdk8u102-b14-aarch32-160812
 329c59a861cf916fd62845f36073a43cb6d476a7 jdk8u-core-final
+56b133772ec1aa4f44f2eee2c4103c645f764935 jdk8u102-b14
+8ba5a41487af9fe72aeb92e790327d12dce0de8c jdk8u102-b31
+52cca1ce8b473ecd751da2350d4b3ef111b5676e jdk8u111-b00
+d123c31c3bc21ccf02ac7368f5476dd9975e15e3 jdk8u111-b01
+981c4d9dab16b3fa7333e5baa5497c299acd5172 jdk8u111-b02
+893adc105044c14abfb54de32a79f2f21981cafa jdk8u111-b03
+ec7b9aafd7e1e9763925e8b794834612bbe0e19b jdk8u111-b04
+3a25f8a752524bad7e78800158c485b890be3982 jdk8u111-b05
+d5dabec41733e59f00dd456f88fb00b3803bed8b jdk8u111-b06
+d8a1e50ce110d18b3ad01ee5c997425bfe90b2a1 jdk8u111-b07
+560812b6d1948df7794f22840e4e3976258b034e jdk8u111-b08
+dbbb2551c63687d9c4a2bb38c42864503cf06465 jdk8u111-b09
+36ccdd95d018368c8a1d70fd40cc8ca3a2c0590f jdk8u111-b10
+dad7b1a59da60d68ff26bf7414b87995fecaaba6 jdk8u111-b11
+a42cdfaa1218a636d2cd0b89a233362cdf32dd4b jdk8u111-b12
+2214875a44e52789acf404b56543f613516ee498 jdk8u111-b13
+7898951ff63c9ea721b8f669b9c749d6c3a2db99 jdk8u111-b14
+b87d82f5c33dfb55bfc81254044f28eea5d7424a jdk8u112-b00
+1f2394102288d9073652064784e31a3f52fc5d4b jdk8u112-b01
+40c934289deefd68915f6519d71a4e315c69117a jdk8u112-b02
+ddb3a8afe0ad50e04d360efa96aee78cb599ea72 jdk8u112-b03
+1d0047d03f04c0c15c7856e0f177b9e15e94a692 jdk8u112-b04
+b6cdfd0b4a9cff1ed1bb43ef7fb21dc4d2dfe7d8 jdk8u112-b06
+9d09ca09ea33e6af774914606f94960e5af4fc9b jdk8u112-b07
+0ac6b67980512ce025a280d42c05156293613dbb jdk8u112-b08
+0d9ae87a0dfe893922b730312d9173ad5dd5f0d6 jdk8u112-b09
+09fb07ae151729154a2dd253d06bdad8955c2685 jdk8u112-b10
+4363b0b339a482ec9eefee11dc5877a618e8c681 jdk8u112-b11
+be34a52805408eb5edaf3d8de4fae47632a757c5 jdk8u112-b12
+4d45315307323fcb9dd84c3f0b0a1dc76f2b3b5f jdk8u112-b13
+18bbb95d097e04ea2b88df8910056fe294da0149 jdk8u112-b14
+30f83ac389f06c38dc0b6f71b1d8344c01436a16 jdk8u112-b15
--- a/LICENSE	Sun Sep 04 20:31:45 2016 +0100
+++ b/LICENSE	Tue Nov 08 17:14:31 2016 +0300
@@ -3,7 +3,7 @@
 Version 2, June 1991
 
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 Everyone is permitted to copy and distribute verbatim copies of this license
 document, but changing it is not allowed.
@@ -287,8 +287,8 @@
     more details.
 
     You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc., 59
-    Temple Place, Suite 330, Boston, MA 02111-1307 USA
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 Also add information on how to contact you by electronic and paper mail.
 
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Sun Sep 04 20:31:45 2016 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Tue Nov 08 17:14:31 2016 +0300
@@ -2230,7 +2230,7 @@
      * REVISIT -- This code doesn't do what the comment says to when
      * getField() is null!
      */
-    private void inputClassFields(Object o, Class cl,
+    private void inputClassFields(Object o, final Class<?> cl,
                                   ObjectStreamField[] fields,
                                   com.sun.org.omg.SendingContext.CodeBase sender)
         throws InvalidClassException, StreamCorruptedException,
@@ -2264,21 +2264,31 @@
                 }
 
                 try {
-                    Class fieldCl = fields[i].getClazz();
+                    Class<?> fieldCl = fields[i].getClazz();
                     if ((objectValue != null)
                             && (!fieldCl.isAssignableFrom(
                                     objectValue.getClass()))) {
                         throw new IllegalArgumentException("Field mismatch");
                     }
-                   Field classField = null;
+                    Field declaredClassField = null;
+                    final String inputStreamFieldName = fields[i].getName();
                     try {
-                        classField = cl.getDeclaredField(fields[i].getName());
-                    } catch (NoSuchFieldException nsfEx) {
-                        throw new IllegalArgumentException(nsfEx);
+                        declaredClassField = getDeclaredField( cl, inputStreamFieldName);
+                    } catch (PrivilegedActionException paEx) {
+                        throw new IllegalArgumentException(
+                            (NoSuchFieldException) paEx.getException());
                     } catch (SecurityException secEx) {
-                        throw new IllegalArgumentException(secEx.getCause());
+                        throw new IllegalArgumentException(secEx);
+                    }  catch (NullPointerException npEx) {
+                        continue;
+                    } catch (NoSuchFieldException e) {
+                        continue;
                     }
-                    Class<?> declaredFieldClass = classField.getType();
+
+                    if (declaredClassField == null) {
+                        continue;
+                    }
+                    Class<?> declaredFieldClass = declaredClassField.getType();
 
                     // check input field type is a declared field type
                     // input field is a subclass of the declared field
@@ -2291,15 +2301,24 @@
                     }
                     bridge.putObject( o, fields[i].getFieldID(), objectValue ) ;
                     // reflective code: fields[i].getField().set( o, objectValue ) ;
-                } catch (IllegalArgumentException e) {
-                    ClassCastException exc = new ClassCastException("Assigning instance of class " +
-                                                 objectValue.getClass().getName() +
-                                                 " to field " +
-                                                 currentClassDesc.getName() +
-                                                 '#' +
-                                                 fields[i].getField().getName());
-                    exc.initCause( e ) ;
-                    throw exc ;
+                } catch (IllegalArgumentException iaEx) {
+                    String objectValueClassName = "null";
+                    String currentClassDescClassName = "null";
+                    String fieldName = "null";
+                    if (objectValue != null) {
+                        objectValueClassName = objectValue.getClass().getName();
+                    }
+                    if (currentClassDesc != null) {
+                        currentClassDescClassName = currentClassDesc.getName();
+                    }
+                    if (fields[i] != null && fields[i].getField() != null) {
+                        fieldName = fields[i].getField().getName();
+                    }
+                    ClassCastException ccEx = new ClassCastException(
+                            "Assigning instance of class " + objectValueClassName
+                                    + " to field " + currentClassDescClassName + '#' + fieldName);
+                    ccEx.initCause( iaEx ) ;
+                    throw ccEx ;
                 }
             } // end : for loop
             }
@@ -2595,9 +2614,9 @@
 
     }
 
-    private static void setObjectField(Object o, Class c, String fieldName, Object v) {
+    private static void setObjectField(Object o, Class<?> c, String fieldName, Object v) {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             Class fieldCl = fld.getType();
             if(v != null && !fieldCl.isInstance(v)) {
                 throw new Exception();
@@ -2617,10 +2636,10 @@
         }
     }
 
-    private static void setBooleanField(Object o, Class c, String fieldName, boolean v)
+    private static void setBooleanField(Object o, Class<?> c, String fieldName, boolean v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Boolean.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putBoolean( o, key, v ) ;
@@ -2640,10 +2659,10 @@
         }
     }
 
-    private static void setByteField(Object o, Class c, String fieldName, byte v)
+    private static void setByteField(Object o, Class<?> c, String fieldName, byte v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Byte.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putByte( o, key, v ) ;
@@ -2663,10 +2682,10 @@
         }
     }
 
-    private static void setCharField(Object o, Class c, String fieldName, char v)
+    private static void setCharField(Object o, Class<?> c, String fieldName, char v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Character.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putChar( o, key, v ) ;
@@ -2686,10 +2705,10 @@
         }
     }
 
-    private static void setShortField(Object o, Class c, String fieldName, short v)
+    private static void setShortField(Object o, Class<?> c, String fieldName, short v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Short.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putShort( o, key, v ) ;
@@ -2709,10 +2728,10 @@
         }
     }
 
-    private static void setIntField(Object o, Class c, String fieldName, int v)
+    private static void setIntField(Object o, final Class<?> c, final String fieldName, int v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Integer.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putInt( o, key, v ) ;
@@ -2732,10 +2751,10 @@
         }
     }
 
-    private static void setLongField(Object o, Class c, String fieldName, long v)
+    private static void setLongField(Object o, Class<?> c, String fieldName, long v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Long.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putLong( o, key, v ) ;
@@ -2755,10 +2774,10 @@
         }
     }
 
-    private static void setFloatField(Object o, Class c, String fieldName, float v)
+    private static void setFloatField(Object o, Class<?> c, String fieldName, float v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField( c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Float.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putFloat( o, key, v ) ;
@@ -2778,10 +2797,10 @@
         }
     }
 
-    private static void setDoubleField(Object o, Class c, String fieldName, double v)
+    private static void setDoubleField(Object o, Class<?> c, String fieldName, double v)
     {
         try {
-            Field fld = c.getDeclaredField( fieldName ) ;
+            Field fld = getDeclaredField(c, fieldName ) ;
             if ((fld != null) && (fld.getType() == Double.TYPE)) {
                 long key = bridge.objectFieldOffset( fld ) ;
                 bridge.putDouble( o, key, v ) ;
@@ -2801,6 +2820,23 @@
         }
     }
 
+
+    private static Field getDeclaredField(final Class<?> c,
+                                           final String fieldName)
+        throws PrivilegedActionException, NoSuchFieldException, SecurityException {
+        if (System.getSecurityManager() == null) {
+            return c.getDeclaredField(fieldName);
+        } else {
+            return AccessController
+                .doPrivileged(new PrivilegedExceptionAction<Field>() {
+                    public Field run()
+                            throws NoSuchFieldException {
+                        return c.getDeclaredField(fieldName);
+                    }
+                });
+        }
+    }
+
     /**
      * This class maintains a map of stream position to
      * an Object currently being deserialized.  It is used
@@ -2811,12 +2847,12 @@
      */
     static class ActiveRecursionManager
     {
-        private Map offsetToObjectMap;
+        private Map<Integer, Object> offsetToObjectMap;
 
         public ActiveRecursionManager() {
             // A hash map is unsynchronized and allows
             // null values
-            offsetToObjectMap = new HashMap();
+            offsetToObjectMap = new HashMap<>();
         }
 
         // Called right after allocating a new object.
--- a/src/share/classes/javax/rmi/CORBA/Util.java	Sun Sep 04 20:31:45 2016 +0100
+++ b/src/share/classes/javax/rmi/CORBA/Util.java	Tue Nov 08 17:14:31 2016 +0300
@@ -414,7 +414,7 @@
                 // set to allow the loading of the Util delegate
                 // which provides access to custom ValueHandler
                 sm.checkPermission(new SerializablePermission(
-                        "enableCustomValueHanlder"));
+                        "enableCustomValueHandler"));
             }
         }
     }