src/java.base/share/classes/java/security/SignedObject.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 47216 71c04702a3d5
child 58679 9c3209ff7550
--- a/src/java.base/share/classes/java/security/SignedObject.java	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/classes/java/security/SignedObject.java	Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -118,6 +118,7 @@
 
 public final class SignedObject implements Serializable {
 
+    @java.io.Serial
     private static final long serialVersionUID = 720502720485447167L;
 
     /*
@@ -139,9 +140,9 @@
      * @param signingKey the private key for signing.
      * @param signingEngine the signature signing engine.
      *
-     * @exception IOException if an error occurs during serialization
-     * @exception InvalidKeyException if the key is invalid.
-     * @exception SignatureException if signing fails.
+     * @throws    IOException if an error occurs during serialization
+     * @throws    InvalidKeyException if the key is invalid.
+     * @throws    SignatureException if signing fails.
      */
     public SignedObject(Serializable object, PrivateKey signingKey,
                         Signature signingEngine)
@@ -167,8 +168,8 @@
      *
      * @return the encapsulated object.
      *
-     * @exception IOException if an error occurs during de-serialization
-     * @exception ClassNotFoundException if an error occurs during
+     * @throws    IOException if an error occurs during de-serialization
+     * @throws    ClassNotFoundException if an error occurs during
      * de-serialization
      */
     public Object getObject()
@@ -211,10 +212,10 @@
      * @param verificationKey the public key for verification.
      * @param verificationEngine the signature verification engine.
      *
-     * @exception SignatureException if signature verification failed (an
+     * @throws    SignatureException if signature verification failed (an
      *     exception prevented the signature verification engine from completing
      *     normally).
-     * @exception InvalidKeyException if the verification key is invalid.
+     * @throws    InvalidKeyException if the verification key is invalid.
      *
      * @return {@code true} if the signature
      * is valid, {@code false} otherwise
@@ -234,8 +235,8 @@
      * @param signingKey the private key for signing.
      * @param signingEngine the signature signing engine.
      *
-     * @exception InvalidKeyException if the key is invalid.
-     * @exception SignatureException if signing fails.
+     * @throws    InvalidKeyException if the key is invalid.
+     * @throws    SignatureException if signing fails.
      */
     private void sign(PrivateKey signingKey, Signature signingEngine)
         throws InvalidKeyException, SignatureException {
@@ -250,6 +251,7 @@
      * readObject is called to restore the state of the SignedObject from
      * a stream.
      */
+    @java.io.Serial
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
             java.io.ObjectInputStream.GetField fields = s.readFields();