mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8251203: Fix "no comment" warnings in java.base/java.lang and java/io
Reviewed-by: dfuchs, lancea, mchung, naoto
This commit is contained in:
parent
5585e6f63a
commit
afce1f4ebd
19 changed files with 177 additions and 28 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2020, 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
|
||||
|
@ -108,14 +108,14 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
/**
|
||||
* Serializable fields for ExceptionInInitializerError.
|
||||
*
|
||||
* @serialField exception Throwable
|
||||
* @serialField exception Throwable the exception
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("exception", Throwable.class)
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Reconstitutes the ExceptionInInitializerError instance from a stream
|
||||
* and initialize the cause properly when deserializing from an older
|
||||
* version.
|
||||
|
@ -123,6 +123,10 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
* The getException and getCause method returns the private "exception"
|
||||
* field in the older implementation and ExceptionInInitializerError::cause
|
||||
* was set to null.
|
||||
*
|
||||
* @param s the {@code ObjectInputStream} from which data is read
|
||||
* @throws IOException if an I/O error occurs
|
||||
* @throws ClassNotFoundException if a serialized class cannot be loaded
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
|
||||
|
@ -133,9 +137,12 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* To maintain compatibility with older implementation, write a serial
|
||||
* "exception" field with the cause as the value.
|
||||
*
|
||||
* @param out the {@code ObjectOutputStream} to which data is written
|
||||
* @throws IOException if an I/O error occurs
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue