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
|
@ -41,6 +41,7 @@ import java.security.PrivilegedAction;
|
|||
* @since 1.5
|
||||
*/
|
||||
class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 6182022883658399397L;
|
||||
private final Class<? extends Annotation> type;
|
||||
private final Map<String, Object> memberValues;
|
||||
|
@ -603,6 +604,7 @@ class AnnotationInvocationHandler implements InvocationHandler, Serializable {
|
|||
return Arrays.hashCode((Object[]) value);
|
||||
}
|
||||
|
||||
@java.io.Serial
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws java.io.IOException, ClassNotFoundException {
|
||||
ObjectInputStream.GetField fields = s.readFields();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2016, 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
|
||||
|
@ -34,6 +34,7 @@ import java.lang.reflect.Method;
|
|||
* @since 1.5
|
||||
*/
|
||||
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7844069490309503934L;
|
||||
private Method member;
|
||||
private final String foundType;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2016, 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
|
||||
|
@ -32,6 +32,7 @@ package sun.reflect.annotation;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class EnumConstantNotPresentExceptionProxy extends ExceptionProxy {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -604662101303187330L;
|
||||
final Class<? extends Enum<?>> enumType;
|
||||
final String constName;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2014, 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 sun.reflect.annotation;
|
|||
* @since 1.5
|
||||
*/
|
||||
public abstract class ExceptionProxy implements java.io.Serializable {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 7241930048386631401L;
|
||||
protected abstract RuntimeException generateException();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2016, 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
|
||||
|
@ -33,6 +33,7 @@ import java.lang.annotation.*;
|
|||
* @since 1.5
|
||||
*/
|
||||
public class TypeNotPresentExceptionProxy extends ExceptionProxy {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = 5565925172427947573L;
|
||||
final String typeName;
|
||||
final Throwable cause;
|
||||
|
|
|
@ -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
|
||||
|
@ -27,5 +27,6 @@ package sun.reflect.generics.reflectiveObjects;
|
|||
|
||||
/** Temporary class used to indicate missing functionality */
|
||||
public class NotImplementedException extends RuntimeException {
|
||||
@java.io.Serial
|
||||
private static final long serialVersionUID = -9177857708926624790L;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue