src/java.base/share/classes/sun/security/util/ObjectIdentifier.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 47418 6993f9f1ff83
child 58679 9c3209ff7550
--- a/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java	Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * 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,12 +91,14 @@
      * the 4th case, non-huge OID is still supportable in old versions, while
      * huge OID is not.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 8697030238860181294L;
 
     /**
      * Changed to Object
      * @serial
      */
+    @SuppressWarnings("serial") // Not statically typed as Serializable
     private Object      components   = null;          // path from root
     /**
      * @serial
@@ -106,6 +108,7 @@
     // Is the components field calculated?
     private transient boolean   componentsCalculated = false;
 
+    @java.io.Serial
     private void readObject(ObjectInputStream is)
             throws IOException, ClassNotFoundException {
         is.defaultReadObject();
@@ -119,6 +122,7 @@
         }
     }
 
+    @java.io.Serial
     private void writeObject(ObjectOutputStream os)
             throws IOException {
         if (!componentsCalculated) {
@@ -135,6 +139,7 @@
     }
 
     static class HugeOidNotSupportedByOldJDK implements Serializable {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
         static HugeOidNotSupportedByOldJDK theOne = new HugeOidNotSupportedByOldJDK();
     }