changeset 1150:2ab3a824e20d

Merge
author asaha
date Wed, 09 Sep 2015 10:51:24 -0700
parents f0c760a2a888 (current diff) e16af1f86e24 (diff)
children 8bf0523362e3
files .hgtags
diffstat 5 files changed, 105 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Aug 07 11:52:47 2015 -0700
+++ b/.hgtags	Wed Sep 09 10:51:24 2015 -0700
@@ -401,6 +401,11 @@
 4afc048fe6ff7fc3fdbdadd8027549805c426d0d jdk8u45-b15
 e67045c893eaf5e3336c4fd849786fa15b81b601 jdk8u45-b31
 f2aeb52cb7cef1f984661a583baac67402f633a5 jdk8u45-b32
+e26a2620b5d206837fedab74fc84f068c7f47fa2 jdk8u45-b33
+c1399b5a4592414a8b8e6f64be019e8cf1f46074 jdk8u45-b34
+2f010018174e90b8673e5c4a3cdfed0a3c4c2fe2 jdk8u45-b35
+e953ae033f0c530f3588df430589582b6b7108d7 jdk8u45-b36
+883940e19107877d2b8c486b003253d2433fd59d jdk8u45-b37
 72d116eea419824044f8dd4ae9d3a012946f72a4 jdk8u51-b00
 b9638b9fe23876fd2413f336ee1d4e05d409e6a9 jdk8u51-b01
 bc5562ed3c2d69ffbff357e96d9e383479042000 jdk8u51-b02
@@ -418,6 +423,7 @@
 1fbfa02e524872a75e98ee3a80e2472fa7012fde jdk8u51-b14
 d6e1f914c954f98caa31edd0037837830774dfb6 jdk8u51-b15
 3b9b39af6c36216418b78c449dd3af17b865a952 jdk8u51-b16
+5980dad8f264bb5ec3982d64a7c0af86fc5b3d16 jdk8u51-b31
 8bbc2bb414b7e9331c2014c230553d72c9d161c5 jdk8u60-b00
 15ae8298b34beb30f2bd7baa7ff895af2bec13f6 jdk8u60-b01
 a98524c04cbd24bbc3029b21c033abf9108e92b4 jdk8u60-b02
@@ -443,7 +449,37 @@
 3a04901d83880634ecd70c8be992189228ccd746 jdk8u60-b22
 0828bb6521738ad5a7fe11f0aa3495465f002848 jdk8u60-b23
 b0779099d006fcb2a0af493e2a2f828411bfad33 jdk8u60-b24
+c665dd5d32b04c1dbc2cf21a595fe73330849c03 jdk8u60-b25
+7828b9af7733eeaf2cafa8e05e68a2661dc3c7a8 jdk8u60-b26
+be922f27d05991e3099f42988b8ea4ad89809749 jdk8u60-b27
+8e247b5216a5a4623c1bef7331585d78e7c0fb15 jdk8u52-b06
+974e2fd9b5b3cec38cceb35c93bcc3b5bedbe91c jdk8u52-b07
+8e247b5216a5a4623c1bef7331585d78e7c0fb15 jdk8u65-b00
+31ceb15b19bee8e02aa2cf4be5c3f147ad6afb22 jdk8u65-b01
+4c8bc7757f825f9fe0806fa13f0fe85b1a20982a jdk8u65-b02
+7a98523691a9657d4f5ecf8fb71476cecc6d5c4d jdk8u65-b03
+771cf2ce97e332e1ecffe4818d0fbe77f11e28a2 jdk8u65-b04
+5b6ff67eed5f25cc710a53026e706597c9193f56 jdk8u65-b05
+05084f644c07a81e2b246db38917df253f5e2882 jdk8u65-b06
+bc23767d08cf1e2ba8793106882a3ec9b926d9e0 jdk8u65-b07
+cc1eef73fb58c59317a0be13f31ef7a77b46b8e3 jdk8u65-b08
+db639a8f026b01059114cd32d9e44dfad2b55de0 jdk8u65-b09
+98ad80b71e1fb5c3343c33dffd40e9e92e65f087 jdk8u65-b10
+98ad80b71e1fb5c3343c33dffd40e9e92e65f087 jdk8u65-b10
+0000000000000000000000000000000000000000 jdk8u65-b10
+0000000000000000000000000000000000000000 jdk8u65-b10
+6b5f81fcbdde7bca924364448e7d98912992ac2f jdk8u65-b10
+2dcd36bfa8a4e5d789cd86ee24bdc1045bac4e06 jdk8u65-b11
+55f0343bcba5f486f955ffe7b25aac261c0003b4 jdk8u65-b12
+d7ec3a9f57de2e6c403410f7b45aa69171f18892 jdk8u65-b13
 3a04901d83880634ecd70c8be992189228ccd746 jdk8u66-b00
 3717d70ac87f5e5579e540cd990b4e958c5990a4 jdk8u66-b01
 15851994f9f81f6de37b63683c8cd9b19ae90ed1 jdk8u66-b02
+8e9e5c715064a55865975ec3626b17e0439613c7 jdk8u66-b07
+6802a364b568ce4f4398c0fc90ee0f675337a3c2 jdk8u66-b08
+81d11adaf5aa0b37ffabf45fbeb8fa19f13de596 jdk8u66-b09
+12e44aa2069b20ecbff03285dea4681325b9c05f jdk8u66-b10
+ebe5ae51f625a9d3f5e1aac835a416502c71a4a0 jdk8u66-b11
+3acb9f1828c5e9ed64a45c0101d1c59d1e784ee0 jdk8u66-b12
+f71aabee169f8342298e38923848bdb863c0f37a jdk8u66-b13
 81296d52090354da1eb9748d63a29d30bb1230f7 jdk8u72-b00
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Fri Aug 07 11:52:47 2015 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Wed Sep 09 10:51:24 2015 -0700
@@ -567,6 +567,11 @@
                 // XXX I18N, logging needed.
                 throw new NotActiveException("defaultReadObjectDelegate");
 
+            if (!currentClassDesc.forClass().isAssignableFrom(
+                    currentObject.getClass())) {
+                throw new IOException("Object Type mismatch");
+            }
+
             // The array will be null unless fields were retrieved
             // remotely because of a serializable version difference.
             // Bug fix for 4365188.  See the definition of
@@ -1063,6 +1068,9 @@
 
             int spBase = spClass;       // current top of stack
 
+            if (currentClass.getName().equals("java.lang.String")) {
+                return this.readUTF();
+            }
             /* The object's classes should be processed from supertype to subtype
              * Push all the clases of the current object onto a stack.
              * Note that only the serializable classes are represented
@@ -2257,6 +2265,27 @@
 
                 try {
                     Class fieldCl = fields[i].getClazz();
+                    if ((objectValue != null)
+                            && (!fieldCl.isAssignableFrom(
+                                    objectValue.getClass()))) {
+                        throw new IllegalArgumentException("Field mismatch");
+                    }
+                   Field classField = null;
+                    try {
+                        classField = cl.getDeclaredField(fields[i].getName());
+                    } catch (NoSuchFieldException nsfEx) {
+                        throw new IllegalArgumentException(nsfEx);
+                    } catch (SecurityException secEx) {
+                        throw new IllegalArgumentException(secEx.getCause());
+                    }
+                    Class<?> declaredFieldClass = classField.getType();
+
+                    // check input field type is a declared field type
+                    // input field is a subclass of the declared field
+                    if (!declaredFieldClass.isAssignableFrom(fieldCl)) {
+                        throw new IllegalArgumentException(
+                                "Field Type mismatch");
+                    }
                     if (objectValue != null && !fieldCl.isInstance(objectValue)) {
                         throw new IllegalArgumentException();
                     }
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java	Fri Aug 07 11:52:47 2015 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java	Wed Sep 09 10:51:24 2015 -0700
@@ -559,6 +559,10 @@
              * Push all the clases of the current object onto a stack.
              * Remember the stack pointer where this set of classes is being pushed.
              */
+            if (currentClassDesc.forClass().getName().equals("java.lang.String")) {
+                    this.writeUTF((String)obj);
+                    return;
+            }
             int stackMark = classDescStack.size();
             try {
                 ObjectStreamClass next;
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties	Fri Aug 07 11:52:47 2015 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties	Wed Sep 09 10:51:24 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,7 @@
 
 servertool.list=\n\tlist\n
 servertool.list1=lista todos os servidores registrados
-servertool.list2=\n\tId do Servidor\tNome de Classe do Servidor\t\tAplica\u00E7\u00E3o do Servidor\n\t---------\t-----------------\t\t------------------\n
+servertool.list2=\n\tId do Servidor\tNome de Classe do Servidor\t\tAplicativo do Servidor\n\t---------\t-----------------\t\t------------------\n
 servertool.listactive=\n\tlistactive
 servertool.listactive1=lista os servidores atualmente ativos
 servertool.listappnames=\tlistappnames\n
--- a/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java	Fri Aug 07 11:52:47 2015 -0700
+++ b/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java	Wed Sep 09 10:51:24 2015 -0700
@@ -446,6 +446,9 @@
         if (emitPermissionCheck) {
 
             // produce the following generated code for example
+            //
+            // private transient boolean _instantiated = false;
+            //
             // private static Void checkPermission() {
             // SecurityManager sm = System.getSecurityManager();
             // if (sm != null) {
@@ -460,11 +463,21 @@
             //
             // public _XXXXX_Stub() {
             // this(checkPermission());
+            // _instantiated = true;
+            // }
+            //
+            // private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
+            //    checkPermission();
+            //    s.defaultReadObject();
+            //    _instantiated = true;
             // }
             //
             // where XXXXX is the name of the remote interface
 
                 p.pln();
+                p.plnI("private transient boolean _instantiated = false;");
+                p.pln();
+                p.pO();
                 p.plnI("private static Void checkPermission() {");
                 p.plnI("SecurityManager sm = System.getSecurityManager();");
                 p.pln("if (sm != null) {");
@@ -481,13 +494,23 @@
                 p.pO();
 
                 p.pI();
-                p.pln("private " + currentClass + "(Void ignore) {  }");
+                p.plnI("private " + currentClass + "(Void ignore) {  }");
                 p.pln();
-
-                p.plnI("public " + currentClass + "() { ");
+                p.pO();
+
+                p.plnI("public " + currentClass + "() {");
                 p.pln("this(checkPermission());");
+                p.pln("_instantiated = true;");
                 p.pOln("}");
                 p.pln();
+                p.plnI("private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {");
+                p.plnI("checkPermission();");
+                p.pO();
+                p.pln("s.defaultReadObject();");
+                p.pln("_instantiated = true;");
+                p.pOln("}");
+                p.pln();
+                //p.pO();
         }
 
        if (!emitPermissionCheck) {
@@ -894,6 +917,7 @@
         String paramNames[] = method.getArgumentNames();
         Type returnType = method.getReturnType();
         ValueType[] exceptions = getStubExceptions(method,false);
+        boolean hasIOException = false;
 
         addNamesInUse(method);
         addNameInUse("_type_ids");
@@ -921,6 +945,13 @@
         p.plnI(" {");
 
         // Now create the method body...
+        if (emitPermissionCheck) {
+            p.pln("if ((System.getSecurityManager() != null) && (!_instantiated)) {");
+            p.plnI("    throw new java.io.IOError(new java.io.IOException(\"InvalidObject \"));");
+            p.pOln("}");
+            p.pln();
+        }
+
 
         if (localStubs) {
             writeLocalStubMethodBody(p,method,theType);