src/java.base/share/classes/java/io/ObjectInputStream.java
changeset 47425 96179f26139e
parent 47423 4fc2a4a29f3d
child 48436 45a9a7a49379
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Mon Aug 14 15:32:25 2017 +0530
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Sep 14 22:57:36 2017 +0200
@@ -44,7 +44,6 @@
 
 import static java.io.ObjectStreamClass.processQueue;
 
-import jdk.internal.misc.ObjectStreamClassValidator;
 import jdk.internal.misc.SharedSecrets;
 import jdk.internal.misc.Unsafe;
 import sun.reflect.misc.ReflectUtil;
@@ -1767,9 +1766,6 @@
                 throw new StreamCorruptedException(
                     String.format("invalid type code: %02X", tc));
         }
-        if (descriptor != null) {
-            validateDescriptor(descriptor);
-        }
         return descriptor;
     }
 
@@ -4013,20 +4009,4 @@
         SharedSecrets.setJavaObjectInputStreamAccess(ObjectInputStream::checkArray);
     }
 
-    private void validateDescriptor(ObjectStreamClass descriptor) {
-        ObjectStreamClassValidator validating = validator;
-        if (validating != null) {
-            validating.validateDescriptor(descriptor);
-        }
-    }
-
-    // controlled access to ObjectStreamClassValidator
-    private volatile ObjectStreamClassValidator validator;
-
-    private static void setValidator(ObjectInputStream ois, ObjectStreamClassValidator validator) {
-        ois.validator = validator;
-    }
-    static {
-        SharedSecrets.setJavaObjectInputStreamAccess(ObjectInputStream::setValidator);
-    }
 }