mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8229997: Apply java.io.Serial annotations in java.base
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
6d064a747e
commit
9d764ee48e
315 changed files with 880 additions and 254 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -37,6 +37,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class AbstractMethodError extends IncompatibleClassChangeError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -1654391082989018462L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class ArithmeticException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 2256477558314496007L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -32,6 +32,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5116101128118950844L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class ArrayStoreException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4522193890499838241L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
|
@ -41,6 +41,7 @@ package java.lang;
|
|||
* @since 1.4
|
||||
*/
|
||||
public class AssertionError extends Error {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5013299493970297370L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -73,6 +73,7 @@ public final class Boolean implements java.io.Serializable,
|
|||
private final boolean value;
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3665804199014368530L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 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
|
||||
|
@ -40,6 +40,7 @@ package java.lang;
|
|||
* @since 1.7
|
||||
*/
|
||||
public class BootstrapMethodError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 292L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -561,5 +561,6 @@ public final class Byte extends Number implements Comparable<Byte> {
|
|||
public static final int BYTES = SIZE / Byte.SIZE;
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -7183698231559129828L;
|
||||
}
|
||||
|
|
|
@ -8293,6 +8293,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
|||
private final char value;
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3786198910865385080L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3421,6 +3421,7 @@ public final class Class<T> implements java.io.Serializable,
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.1 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3206093459760846163L;
|
||||
|
||||
|
||||
|
@ -3440,6 +3441,7 @@ public final class Class<T> implements java.io.Serializable,
|
|||
*
|
||||
* @see java.io.ObjectStreamClass
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields =
|
||||
new ObjectStreamField[0];
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class ClassCastException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -9223365651070458532L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class ClassCircularityError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 1054362542914539689L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class ClassFormatError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8420114879011949195L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -59,6 +59,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
/**
|
||||
* use serialVersionUID from JDK 1.1.X for interoperability
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 9176873029745254542L;
|
||||
|
||||
/**
|
||||
|
@ -111,6 +112,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
*
|
||||
* @serialField ex Throwable
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("ex", Throwable.class)
|
||||
};
|
||||
|
@ -124,6 +126,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
* in the older implementation and ClassNotFoundException::cause
|
||||
* was set to null.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
|
||||
ObjectInputStream.GetField fields = s.readFields();
|
||||
Throwable exception = (Throwable) fields.get("ex", null);
|
||||
|
@ -136,6 +139,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
* To maintain compatibility with older implementation, write a serial
|
||||
* "ex" field with the cause as the value.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
ObjectOutputStream.PutField fields = out.putFields();
|
||||
fields.put("ex", super.getCause());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -43,6 +43,7 @@ package java.lang;
|
|||
|
||||
public
|
||||
class CloneNotSupportedException extends Exception {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 5195511250079656443L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1102,5 +1102,6 @@ public final class Double extends Number
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -9172774392245257468L;
|
||||
}
|
||||
|
|
|
@ -275,11 +275,13 @@ public abstract class Enum<E extends Enum<E>>
|
|||
/**
|
||||
* prevent default deserialization
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream in) throws IOException,
|
||||
ClassNotFoundException {
|
||||
throw new InvalidObjectException("can't deserialize enum");
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void readObjectNoData() throws ObjectStreamException {
|
||||
throw new InvalidObjectException("can't deserialize enum");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
|
@ -38,6 +38,7 @@ package java.lang;
|
|||
*/
|
||||
@SuppressWarnings("rawtypes") /* rawtypes are part of the public api */
|
||||
public class EnumConstantNotPresentException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6046998521960521108L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -47,6 +47,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class Error extends Throwable {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 4980196508277280342L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -43,6 +43,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class Exception extends Throwable {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -3387516993124229948L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2000, 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
|
||||
|
@ -50,6 +50,7 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
/**
|
||||
* Use serialVersionUID from JDK 1.1.X for interoperability
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 1521711792217232256L;
|
||||
|
||||
/**
|
||||
|
@ -109,6 +110,7 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
*
|
||||
* @serialField exception Throwable
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("exception", Throwable.class)
|
||||
};
|
||||
|
@ -122,6 +124,7 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
* field in the older implementation and ExceptionInInitializerError::cause
|
||||
* was set to null.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
|
||||
ObjectInputStream.GetField fields = s.readFields();
|
||||
Throwable exception = (Throwable) fields.get("exception", null);
|
||||
|
@ -134,6 +137,7 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
* To maintain compatibility with older implementation, write a serial
|
||||
* "exception" field with the cause as the value.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
ObjectOutputStream.PutField fields = out.putFields();
|
||||
fields.put("exception", super.getCause());
|
||||
|
|
|
@ -1014,5 +1014,6 @@ public final class Float extends Number
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -2671257302660747028L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -37,6 +37,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class IllegalAccessError extends IncompatibleClassChangeError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8988904074992417891L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -90,5 +90,6 @@ class IllegalArgumentException extends RuntimeException {
|
|||
super(cause);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5365630128856068164L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
|
@ -72,5 +72,6 @@ public class IllegalCallerException extends RuntimeException {
|
|||
super(cause);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -2349421918363102232L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -40,6 +40,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class IllegalMonitorStateException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3713306369498869069L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2003, 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
|
||||
|
@ -93,5 +93,6 @@ class IllegalStateException extends RuntimeException {
|
|||
super(cause);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -1848914673093119416L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -37,6 +37,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class IllegalThreadStateException extends IllegalArgumentException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -7626246362397460174L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class IncompatibleClassChangeError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4914975503642802119L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class IndexOutOfBoundsException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 234122996006267687L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -40,6 +40,7 @@ package java.lang;
|
|||
|
||||
public
|
||||
class InstantiationError extends IncompatibleClassChangeError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4885810657349421204L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -44,6 +44,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class InstantiationException extends ReflectiveOperationException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8441929162975509110L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1857,5 +1857,6 @@ public final class Integer extends Number
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
@Native private static final long serialVersionUID = 1360826667806852920L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -48,6 +48,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class InterruptedException extends Exception {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6700697376100628473L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
* @spec JPMS
|
||||
*/
|
||||
public class LayerInstantiationException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -906239691613568347L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -36,6 +36,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class LinkageError extends Error {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 3579600108157160122L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2000,5 +2000,6 @@ public final class Long extends Number
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
@Native private static final long serialVersionUID = 4290774380558885855L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NegativeArraySizeException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8960118058596991861L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -40,6 +40,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NoClassDefFoundError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 9095859863287012458L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -38,6 +38,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NoSuchFieldError extends IncompatibleClassChangeError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3456430195886129035L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2008, 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
|
||||
|
@ -32,6 +32,7 @@ package java.lang;
|
|||
* @since 1.1
|
||||
*/
|
||||
public class NoSuchFieldException extends ReflectiveOperationException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6143714805279938260L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NoSuchMethodError extends IncompatibleClassChangeError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3765521442372831335L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NoSuchMethodException extends ReflectiveOperationException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 5034388446362600923L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -51,6 +51,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NullPointerException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 5162710183389028792L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -119,5 +119,6 @@ public abstract class Number implements java.io.Serializable {
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -8742448824652078965L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -36,6 +36,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class NumberFormatException extends IllegalArgumentException {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -2848938806368998894L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class OutOfMemoryError extends VirtualMachineError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8228564086184010517L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
* @since 1.7
|
||||
*/
|
||||
public class ReflectiveOperationException extends Exception {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 123456789L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -41,6 +41,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class RuntimeException extends Exception {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -7034897190745766939L;
|
||||
|
||||
/** Constructs a new runtime exception with {@code null} as its
|
||||
|
|
|
@ -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
|
||||
|
@ -400,6 +400,7 @@ import java.lang.module.ModuleFinder;
|
|||
|
||||
public final class RuntimePermission extends BasicPermission {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7399184964622342223L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -33,6 +33,7 @@ package java.lang;
|
|||
*/
|
||||
public class SecurityException extends RuntimeException {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6878364983674394167L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -579,5 +579,6 @@ public final class Short extends Number implements Comparable<Short> {
|
|||
}
|
||||
|
||||
/** use serialVersionUID from JDK 1.1. for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7515723908773894738L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class StackOverflowError extends VirtualMachineError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8609175038441759607L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
|
@ -555,5 +555,6 @@ public final class StackTraceElement implements java.io.Serializable {
|
|||
private static native void initStackTraceElement(StackTraceElement element,
|
||||
StackFrameInfo sfi);
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6992337162326171013L;
|
||||
}
|
||||
|
|
|
@ -172,6 +172,7 @@ public final class String
|
|||
private boolean hashIsZero; // Default to false;
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6849794470754667710L;
|
||||
|
||||
/**
|
||||
|
@ -224,6 +225,7 @@ public final class String
|
|||
* <a href="{@docRoot}/../specs/serialization/protocol.html#stream-elements">
|
||||
* Object Serialization Specification, Section 6.2, "Stream Elements"</a>
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields =
|
||||
new ObjectStreamField[0];
|
||||
|
||||
|
@ -1235,6 +1237,7 @@ public final class String
|
|||
private static class CaseInsensitiveComparator
|
||||
implements Comparator<String>, java.io.Serializable {
|
||||
// use serialVersionUID from JDK 1.2.2 for interoperability
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8575799808933029326L;
|
||||
|
||||
public int compare(String s1, String s2) {
|
||||
|
@ -1250,6 +1253,7 @@ public final class String
|
|||
}
|
||||
|
||||
/** Replaces the de-serialized object. */
|
||||
@java.io.Serial
|
||||
private Object readResolve() { return CASE_INSENSITIVE_ORDER; }
|
||||
}
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
private transient String toStringCache;
|
||||
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 3388685877147921107L;
|
||||
|
||||
/**
|
||||
|
@ -723,6 +724,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* A flag indicating whether the backing array is shared.
|
||||
* The value is ignored upon deserialization.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields =
|
||||
{
|
||||
new java.io.ObjectStreamField("value", char[].class),
|
||||
|
@ -734,6 +736,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* readObject is called to restore the state of the StringBuffer from
|
||||
* a stream.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private synchronized void writeObject(java.io.ObjectOutputStream s)
|
||||
throws java.io.IOException {
|
||||
java.io.ObjectOutputStream.PutField fields = s.putFields();
|
||||
|
@ -753,6 +756,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
|
|||
* readObject is called to restore the state of the StringBuffer 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();
|
||||
|
|
|
@ -88,6 +88,7 @@ public final class StringBuilder
|
|||
{
|
||||
|
||||
/** use serialVersionUID for interoperability */
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 4383685877147921099L;
|
||||
|
||||
/**
|
||||
|
@ -458,6 +459,7 @@ public final class StringBuilder
|
|||
* characters currently stored in the string builder, in which
|
||||
* case extra characters are ignored.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(java.io.ObjectOutputStream s)
|
||||
throws java.io.IOException {
|
||||
s.defaultWriteObject();
|
||||
|
@ -475,6 +477,7 @@ public final class StringBuilder
|
|||
* readObject is called to restore the state of the StringBuffer from
|
||||
* a stream.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws java.io.IOException, ClassNotFoundException {
|
||||
s.defaultReadObject();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -6762910422159637258L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -47,5 +47,6 @@ package java.lang;
|
|||
*/
|
||||
|
||||
public class ThreadDeath extends Error {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4417128565033088268L;
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ import java.util.*;
|
|||
*/
|
||||
public class Throwable implements Serializable {
|
||||
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -3042686055658047285L;
|
||||
|
||||
/**
|
||||
|
@ -901,6 +902,7 @@ public class Throwable implements Serializable {
|
|||
* cause} field can hold; both {@code null} and {@code this} are
|
||||
* valid values for the field.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException {
|
||||
s.defaultReadObject(); // read in all fields
|
||||
|
@ -989,6 +991,7 @@ public class Throwable implements Serializable {
|
|||
* form as a one-element array whose element is equal to {@code
|
||||
* new StackTraceElement("", "", null, Integer.MIN_VALUE)}.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private synchronized void writeObject(ObjectOutputStream s)
|
||||
throws IOException {
|
||||
// Ensure that the stackTrace field is initialized to a
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -44,6 +44,7 @@ package java.lang;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class TypeNotPresentException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5101214195716534496L;
|
||||
|
||||
private String typeName;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class UnknownError extends VirtualMachineError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 2524784860676771849L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class UnsatisfiedLinkError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4019343241616879428L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class UnsupportedClassVersionError extends ClassFormatError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -7123279212883497373L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -90,5 +90,6 @@ public class UnsupportedOperationException extends RuntimeException {
|
|||
super(cause);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -1242599979055084673L;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang;
|
|||
*/
|
||||
public
|
||||
class VerifyError extends LinkageError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7001962396098498785L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang;
|
|||
* @since 1.0
|
||||
*/
|
||||
public abstract class VirtualMachineError extends Error {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 4161983926571568670L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
|
@ -37,6 +37,7 @@ package java.lang.annotation;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class AnnotationFormatError extends Error {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -4256701562333669892L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -39,6 +39,7 @@ import java.lang.reflect.Method;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class AnnotationTypeMismatchException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8125925355765570191L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -39,6 +39,7 @@ package java.lang.annotation;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class IncompleteAnnotationException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8445097402741811912L;
|
||||
|
||||
private Class<? extends Annotation> annotationType;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
|
@ -31,6 +31,7 @@ package java.lang.invoke;
|
|||
* @since 1.8
|
||||
*/
|
||||
public class LambdaConversionException extends Exception {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 292L + 8L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 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
|
||||
|
@ -104,6 +104,7 @@ class MethodType
|
|||
implements Constable,
|
||||
TypeDescriptor.OfMethod<Class<?>, MethodType>,
|
||||
java.io.Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 292L; // {rtype, {ptype...}}
|
||||
|
||||
// The rtype and ptypes fields define the structural identity of the method type:
|
||||
|
@ -1229,6 +1230,7 @@ class MethodType
|
|||
/**
|
||||
* There are no serializable fields for {@code MethodType}.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields = { };
|
||||
|
||||
/**
|
||||
|
@ -1251,6 +1253,7 @@ s.writeObject(this.parameterArray());
|
|||
* @param s the stream to write the object to
|
||||
* @throws java.io.IOException if there is a problem writing the object
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
|
||||
s.defaultWriteObject(); // requires serialPersistentFields to be an empty array
|
||||
s.writeObject(returnType());
|
||||
|
@ -1270,6 +1273,7 @@ s.writeObject(this.parameterArray());
|
|||
* @see #readResolve
|
||||
* @see #writeObject
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
|
||||
// Assign temporary defaults in case this object escapes
|
||||
MethodType_init(void.class, NO_PTYPES);
|
||||
|
@ -1309,6 +1313,7 @@ s.writeObject(this.parameterArray());
|
|||
* after serialization.
|
||||
* @return the fully initialized {@code MethodType} object
|
||||
*/
|
||||
@java.io.Serial
|
||||
private Object readResolve() {
|
||||
// Do not use a trusted path for deserialization:
|
||||
// return makeImpl(rtype, ptypes, true);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
|
@ -65,6 +65,7 @@ import java.util.Objects;
|
|||
* @since 1.8
|
||||
*/
|
||||
public final class SerializedLambda implements Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 8025925345765570181L;
|
||||
private final Class<?> capturingClass;
|
||||
private final String functionalInterfaceClass;
|
||||
|
@ -225,6 +226,7 @@ public final class SerializedLambda implements Serializable {
|
|||
return capturedArgs[i];
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
try {
|
||||
Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
|
@ -32,6 +32,7 @@ package java.lang.invoke;
|
|||
* @since 9
|
||||
*/
|
||||
public class StringConcatException extends Exception {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 292L + 9L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 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
|
||||
|
@ -41,6 +41,7 @@ package java.lang.invoke;
|
|||
* @since 1.7
|
||||
*/
|
||||
public class WrongMethodTypeException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 292L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
|
@ -37,6 +37,7 @@ package java.lang.module;
|
|||
*/
|
||||
|
||||
public class FindException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5817081036963388391L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang.module;
|
|||
* @spec JPMS
|
||||
*/
|
||||
public class InvalidModuleDescriptorException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 4863390386809347380L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang.module;
|
|||
* @spec JPMS
|
||||
*/
|
||||
public class ResolutionException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -1031186845316729450L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang.reflect;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class GenericSignatureFormatError extends ClassFormatError {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6709919147137911034L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
|
@ -34,6 +34,7 @@ package java.lang.reflect;
|
|||
*/
|
||||
|
||||
public class InaccessibleObjectException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 4158786093378140901L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2004, 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
|
||||
|
@ -44,6 +44,7 @@ public class InvocationTargetException extends ReflectiveOperationException {
|
|||
/**
|
||||
* Use serialVersionUID from JDK 1.1.X for interoperability
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 4085088731926701167L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -35,6 +35,7 @@ package java.lang.reflect;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class MalformedParameterizedTypeException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -5696557788586220964L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 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
|
||||
|
@ -53,6 +53,7 @@ public class MalformedParametersException extends RuntimeException {
|
|||
/**
|
||||
* Version for serialization.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 20130919L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -283,6 +283,7 @@ import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC;
|
|||
* @spec JPMS
|
||||
*/
|
||||
public class Proxy implements java.io.Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -2222568056686623797L;
|
||||
|
||||
/** parameter types of a proxy class constructor */
|
||||
|
|
|
@ -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
|
||||
|
@ -79,6 +79,7 @@ package java.lang.reflect;
|
|||
public final
|
||||
class ReflectPermission extends java.security.BasicPermission {
|
||||
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7412737110241507485L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
|
@ -62,6 +62,7 @@ import jdk.internal.access.SharedSecrets;
|
|||
* @since 1.3
|
||||
*/
|
||||
public class UndeclaredThrowableException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 330127114055056639L;
|
||||
|
||||
/**
|
||||
|
@ -108,6 +109,7 @@ public class UndeclaredThrowableException extends RuntimeException {
|
|||
*
|
||||
* @serialField undeclaredThrowable Throwable
|
||||
*/
|
||||
@java.io.Serial
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("undeclaredThrowable", Throwable.class)
|
||||
};
|
||||
|
@ -117,6 +119,7 @@ public class UndeclaredThrowableException extends RuntimeException {
|
|||
* and initialize the cause properly when deserializing from an older
|
||||
* version.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
|
||||
ObjectInputStream.GetField fields = s.readFields();
|
||||
Throwable exception = (Throwable) fields.get("undeclaredThrowable", null);
|
||||
|
@ -129,6 +132,7 @@ public class UndeclaredThrowableException extends RuntimeException {
|
|||
* To maintain compatibility with older implementation, write a serial
|
||||
* "ex" field with the cause as the value.
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
ObjectOutputStream.PutField fields = out.putFields();
|
||||
fields.put("undeclaredThrowable", super.getCause());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue