diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 210d53be658..3ea07501477 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -325,17 +325,6 @@ jobs: bootjdk-platform: linux-x64 runs-on: ubuntu-22.04 - test-macos-x64: - name: macos-x64 - needs: - - build-macos-x64 - uses: ./.github/workflows/test.yml - with: - platform: macos-x64 - bootjdk-platform: macos-x64 - runs-on: macos-13 - xcode-toolset-version: '14.3.1' - test-macos-aarch64: name: macos-aarch64 needs: diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index d3a354fb570..306593270a3 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -898,6 +898,22 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], FLAGS_SETUP_BRANCH_PROTECTION + if test "x$FLAGS_CPU" = xriscv64; then + AC_MSG_CHECKING([if RVV/vector sigcontext supported]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], + [ + return (int)sizeof(struct __riscv_v_ext_state); + ])], + [ + AC_MSG_RESULT([yes]) + ], + [ + $1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -DNO_RVV_SIGCONTEXT" + AC_MSG_RESULT([no]) + ] + ) + fi + # EXPORT to API CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \ $TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \ diff --git a/src/java.base/aix/native/libjava/ProcessHandleImpl_aix.c b/src/java.base/aix/native/libjava/ProcessHandleImpl_aix.c index 3568af24ce4..d2c63d31308 100644 --- a/src/java.base/aix/native/libjava/ProcessHandleImpl_aix.c +++ b/src/java.base/aix/native/libjava/ProcessHandleImpl_aix.c @@ -162,7 +162,24 @@ jint os_getChildren(JNIEnv *env, jlong jpid, jlongArray jarray, } pid_t os_getParentPidAndTimings(JNIEnv *env, pid_t pid, jlong *total, jlong *start) { - return unix_getParentPidAndTimings(env, pid, total, start); + pid_t the_pid = pid; + struct procentry64 ProcessBuffer; + + if (getprocs64(&ProcessBuffer, sizeof(ProcessBuffer), NULL, sizeof(struct fdsinfo64), &the_pid, 1) <= 0) { + return -1; + } + + // Validate the pid before returning the info + if (kill(pid, 0) < 0) { + return -1; + } + + *total = ((ProcessBuffer.pi_ru.ru_utime.tv_sec + ProcessBuffer.pi_ru.ru_stime.tv_sec) * 1000000000L) + + ((ProcessBuffer.pi_ru.ru_utime.tv_usec + ProcessBuffer.pi_ru.ru_stime.tv_usec)); + + *start = ProcessBuffer.pi_start * (jlong)1000; + + return (pid_t) ProcessBuffer.pi_ppid; } void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) { diff --git a/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java b/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java index 4ba7cd3b175..cdab2081181 100644 --- a/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java +++ b/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, 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 @@ -42,12 +42,12 @@ public class EnumConstantNotPresentException extends RuntimeException { private static final long serialVersionUID = -6046998521960521108L; /** - * The type of the missing enum constant. + * @serial The type of the missing enum constant. */ private Class enumType; /** - * The name of the missing enum constant. + * @serial The name of the missing enum constant. */ private String constantName; diff --git a/src/java.base/share/classes/java/lang/StackTraceElement.java b/src/java.base/share/classes/java/lang/StackTraceElement.java index ed8d47a4e50..70219a7f6ec 100644 --- a/src/java.base/share/classes/java/lang/StackTraceElement.java +++ b/src/java.base/share/classes/java/lang/StackTraceElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -64,35 +64,35 @@ public final class StackTraceElement implements java.io.Serializable { // Normally initialized by VM /** - * The name of the class loader. + * @serial The name of the class loader. */ private String classLoaderName; /** - * The module name. + * @serial The module name. */ private String moduleName; /** - * The module version. + * @serial The module version. */ private String moduleVersion; /** - * The declaring class. + * @serial The declaring class. */ private String declaringClass; /** - * The method name. + * @serial The method name. */ private String methodName; /** - * The source file name. + * @serial The source file name. */ private String fileName; /** - * The source line number. + * @serial The source line number. */ private int lineNumber; /** - * Control to show full or partial module, package, and class names. + * @serial Control to show full or partial module, package, and class names. */ private byte format = 0; // Default to show all diff --git a/src/java.base/share/classes/java/lang/TypeNotPresentException.java b/src/java.base/share/classes/java/lang/TypeNotPresentException.java index c5a899ef285..5ba43efbc09 100644 --- a/src/java.base/share/classes/java/lang/TypeNotPresentException.java +++ b/src/java.base/share/classes/java/lang/TypeNotPresentException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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,7 +48,7 @@ public class TypeNotPresentException extends RuntimeException { private static final long serialVersionUID = -5101214195716534496L; /** - * The type name or the name of a type variable. + * @serial The type name or the name of a type variable. */ private String typeName; diff --git a/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java b/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java index 6a9ea51d10b..83054044b60 100644 --- a/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java +++ b/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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,7 +48,7 @@ public class AnnotationTypeMismatchException extends RuntimeException { private final transient Method element; /** - * The (erroneous) type of data found in the annotation. This string + * @serial The (erroneous) type of data found in the annotation. This string * may, but is not required to, contain the value as well. The exact * format of the string is unspecified. */ diff --git a/src/java.base/share/classes/java/lang/annotation/IncompleteAnnotationException.java b/src/java.base/share/classes/java/lang/annotation/IncompleteAnnotationException.java index 921d4b92fcd..02f2638c370 100644 --- a/src/java.base/share/classes/java/lang/annotation/IncompleteAnnotationException.java +++ b/src/java.base/share/classes/java/lang/annotation/IncompleteAnnotationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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,11 +43,11 @@ public class IncompleteAnnotationException extends RuntimeException { private static final long serialVersionUID = 8445097402741811912L; /** - * The annotation interface. + * @serial The annotation interface. */ private Class annotationType; /** - * The element name. + * @serial The element name. */ private String elementName; diff --git a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java index 3767bf23388..3ffe3c9a9f2 100644 --- a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java +++ b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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,43 +65,43 @@ public final class SerializedLambda implements Serializable { @java.io.Serial private static final long serialVersionUID = 8025925345765570181L; /** - * The capturing class. + * @serial The capturing class. */ private final Class capturingClass; /** - * The functional interface class. + * @serial The functional interface class. */ private final String functionalInterfaceClass; /** - * The functional interface method name. + * @serial The functional interface method name. */ private final String functionalInterfaceMethodName; /** - * The functional interface method signature. + * @serial The functional interface method signature. */ private final String functionalInterfaceMethodSignature; /** - * The implementation class. + * @serial The implementation class. */ private final String implClass; /** - * The implementation method name. + * @serial The implementation method name. */ private final String implMethodName; /** - * The implementation method signature. + * @serial The implementation method signature. */ private final String implMethodSignature; /** - * The implementation method kind. + * @serial The implementation method kind. */ private final int implMethodKind; /** - * The instantiated method type. + * @serial The instantiated method type. */ private final String instantiatedMethodType; /** - * The captured arguments. + * @serial The captured arguments. */ @SuppressWarnings("serial") // Not statically typed as Serializable private final Object[] capturedArgs; diff --git a/src/java.base/share/classes/java/net/HttpRetryException.java b/src/java.base/share/classes/java/net/HttpRetryException.java index fefeb9bb687..6d41ac3b563 100644 --- a/src/java.base/share/classes/java/net/HttpRetryException.java +++ b/src/java.base/share/classes/java/net/HttpRetryException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, 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,12 +40,12 @@ public class HttpRetryException extends IOException { private static final long serialVersionUID = -9186022286469111381L; /** - * The response code. + * @serial The response code. */ private final int responseCode; /** - * The URL to be redirected to. + * @serial The URL to be redirected to. */ private String location; diff --git a/src/java.base/share/classes/java/net/URISyntaxException.java b/src/java.base/share/classes/java/net/URISyntaxException.java index 3b9889cd1b4..c0b0cbdd234 100644 --- a/src/java.base/share/classes/java/net/URISyntaxException.java +++ b/src/java.base/share/classes/java/net/URISyntaxException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -42,12 +42,12 @@ public class URISyntaxException private static final long serialVersionUID = 2137979680897488891L; /** - * The input string. + * @serial The input string. */ private final String input; /** - * The index at which the parse error occurred, + * @serial The index at which the parse error occurred, * or {@code -1} if the index is not known. */ private final int index; diff --git a/src/java.base/share/classes/java/net/URLPermission.java b/src/java.base/share/classes/java/net/URLPermission.java index d48f784ff84..daf3e99a6a0 100644 --- a/src/java.base/share/classes/java/net/URLPermission.java +++ b/src/java.base/share/classes/java/net/URLPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, 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 @@ -168,7 +168,7 @@ public final class URLPermission extends Permission { // serialized field /** - * The actions string + * @serial The actions string */ private String actions; diff --git a/src/java.base/share/classes/java/nio/charset/MalformedInputException.java b/src/java.base/share/classes/java/nio/charset/MalformedInputException.java index c36f81f9153..a4e7f31fc2c 100644 --- a/src/java.base/share/classes/java/nio/charset/MalformedInputException.java +++ b/src/java.base/share/classes/java/nio/charset/MalformedInputException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -42,7 +42,7 @@ public class MalformedInputException private static final long serialVersionUID = -3438823399834806194L; /** - * The length of the input. + * @serial The length of the input. */ private int inputLength; diff --git a/src/java.base/share/classes/java/nio/charset/UnmappableCharacterException.java b/src/java.base/share/classes/java/nio/charset/UnmappableCharacterException.java index 857c519974d..8f79a232f03 100644 --- a/src/java.base/share/classes/java/nio/charset/UnmappableCharacterException.java +++ b/src/java.base/share/classes/java/nio/charset/UnmappableCharacterException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, 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 @@ -42,7 +42,7 @@ public class UnmappableCharacterException private static final long serialVersionUID = -7026962371537706123L; /** - * The length of the input character (or byte) sequence. + * @serial The length of the input character (or byte) sequence. */ private int inputLength; diff --git a/src/java.base/share/classes/java/nio/file/FileSystemException.java b/src/java.base/share/classes/java/nio/file/FileSystemException.java index a03a2708ce6..43887756b15 100644 --- a/src/java.base/share/classes/java/nio/file/FileSystemException.java +++ b/src/java.base/share/classes/java/nio/file/FileSystemException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, 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,12 +41,12 @@ public class FileSystemException static final long serialVersionUID = -3055425747967319812L; /** - * String identifying the file or {@code null} if not known. + * @serial String identifying the file or {@code null} if not known. */ private final String file; /** - * String identifying the other file or {@code null} if there isn't + * @serial String identifying the other file or {@code null} if there isn't * another file or if not known. */ private final String other; diff --git a/src/java.base/share/classes/java/nio/file/InvalidPathException.java b/src/java.base/share/classes/java/nio/file/InvalidPathException.java index bb28b61b83b..495d087a39d 100644 --- a/src/java.base/share/classes/java/nio/file/InvalidPathException.java +++ b/src/java.base/share/classes/java/nio/file/InvalidPathException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, 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,12 +40,12 @@ public class InvalidPathException static final long serialVersionUID = 4355821422286746137L; /** - * The input string. + * @serial The input string. */ private String input; /** - * The index of the input string at which the error occurred or + * @serial The index of the input string at which the error occurred or * {@code -1} if not known. */ private int index; diff --git a/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java b/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java index 209453cdaad..9baca303ef0 100644 --- a/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java +++ b/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, 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,7 +41,7 @@ public class UserPrincipalNotFoundException static final long serialVersionUID = -5369283889045833024L; /** - * The user principal name. + * @serial The user principal name. */ private final String name; diff --git a/src/java.base/share/classes/java/security/AccessControlException.java b/src/java.base/share/classes/java/security/AccessControlException.java index 4d46cd6887e..d423d95513d 100644 --- a/src/java.base/share/classes/java/security/AccessControlException.java +++ b/src/java.base/share/classes/java/security/AccessControlException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -45,7 +45,7 @@ public class AccessControlException extends SecurityException { private static final long serialVersionUID = 5138225684096988535L; /** - * The permission that caused the exception to be thrown. + * @serial The permission that caused the exception to be thrown. */ private Permission perm; diff --git a/src/java.base/share/classes/java/security/AlgorithmParameters.java b/src/java.base/share/classes/java/security/AlgorithmParameters.java index 1fdb47077cf..7747d642c20 100644 --- a/src/java.base/share/classes/java/security/AlgorithmParameters.java +++ b/src/java.base/share/classes/java/security/AlgorithmParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2024, 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,12 +48,19 @@ * obtained via a call to {@code getEncoded}. * *

Every implementation of the Java platform is required to support the - * following standard {@code AlgorithmParameters} algorithms: + * following standard {@code AlgorithmParameters} algorithms. For the "EC" + * algorithm, implementations must support the curves in parentheses. For the + * "RSASSA-PSS" algorithm, implementations must support the parameters in + * parentheses. *

* These algorithms are described in the diff --git a/src/java.base/share/classes/java/security/AllPermission.java b/src/java.base/share/classes/java/security/AllPermission.java index 15a4f78123f..23c55085ec3 100644 --- a/src/java.base/share/classes/java/security/AllPermission.java +++ b/src/java.base/share/classes/java/security/AllPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, 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 @@ -151,7 +151,7 @@ final class AllPermissionCollection private static final long serialVersionUID = -4023755556366636806L; /** - * True if any {@code AllPermissionCollection} objects have been added. + * @serial True if any {@code AllPermissionCollection} objects have been added. */ private boolean all_allowed; diff --git a/src/java.base/share/classes/java/security/GuardedObject.java b/src/java.base/share/classes/java/security/GuardedObject.java index 2c9d1a345dc..fedb0eeae1d 100644 --- a/src/java.base/share/classes/java/security/GuardedObject.java +++ b/src/java.base/share/classes/java/security/GuardedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -55,13 +55,13 @@ public class GuardedObject implements java.io.Serializable { private static final long serialVersionUID = -5240450096227834308L; /** - * The object we are guarding. + * @serial The object we are guarding. */ @SuppressWarnings("serial") // Not statically typed as Serializable private final Object object; /** - * The guard object. + * @serial The guard object. */ @SuppressWarnings("serial") // Not statically typed as Serializable private final Guard guard; diff --git a/src/java.base/share/classes/java/security/KeyFactory.java b/src/java.base/share/classes/java/security/KeyFactory.java index 5a9394d283b..7c51faf6aa2 100644 --- a/src/java.base/share/classes/java/security/KeyFactory.java +++ b/src/java.base/share/classes/java/security/KeyFactory.java @@ -72,7 +72,10 @@ * * These algorithms are described in the diff --git a/src/java.base/share/classes/java/security/KeyPair.java b/src/java.base/share/classes/java/security/KeyPair.java index 61c1121bdee..cc648a677dd 100644 --- a/src/java.base/share/classes/java/security/KeyPair.java +++ b/src/java.base/share/classes/java/security/KeyPair.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, 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 @@ -42,10 +42,10 @@ public final class KeyPair implements java.io.Serializable { @java.io.Serial private static final long serialVersionUID = -7565189502268009837L; - /** The private key. */ + /** @serial The private key. */ private final PrivateKey privateKey; - /** The public key. */ + /** @serial The public key. */ private final PublicKey publicKey; /** diff --git a/src/java.base/share/classes/java/security/KeyPairGenerator.java b/src/java.base/share/classes/java/security/KeyPairGenerator.java index 31c3d8d382f..3583248f81e 100644 --- a/src/java.base/share/classes/java/security/KeyPairGenerator.java +++ b/src/java.base/share/classes/java/security/KeyPairGenerator.java @@ -113,12 +113,16 @@ * supply their own implementations of key pair generators. * *

Every implementation of the Java platform is required to support the - * following standard {@code KeyPairGenerator} algorithms and keysizes in - * parentheses: + * following standard {@code KeyPairGenerator} algorithms. For the "EC" + * algorithm, implementations must support the curves in parentheses. For other + * algorithms, implementations must support the key sizes in parentheses. *

* These algorithms are described in the
diff --git a/src/java.base/share/classes/java/security/MessageDigest.java b/src/java.base/share/classes/java/security/MessageDigest.java index 46455e184b0..f83c4ed6d3b 100644 --- a/src/java.base/share/classes/java/security/MessageDigest.java +++ b/src/java.base/share/classes/java/security/MessageDigest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2024, 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 @@ -87,6 +87,7 @@ * * These algorithms are described in the diff --git a/src/java.base/share/classes/java/security/Permission.java b/src/java.base/share/classes/java/security/Permission.java index 71bad14e395..e066bc0e591 100644 --- a/src/java.base/share/classes/java/security/Permission.java +++ b/src/java.base/share/classes/java/security/Permission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -69,7 +69,7 @@ public abstract class Permission implements Guard, java.io.Serializable { private static final long serialVersionUID = -5636570222231596674L; /** - * The permission name. + * @serial The permission name. */ private final String name; diff --git a/src/java.base/share/classes/java/security/PermissionCollection.java b/src/java.base/share/classes/java/security/PermissionCollection.java index d287a685059..3718744c349 100644 --- a/src/java.base/share/classes/java/security/PermissionCollection.java +++ b/src/java.base/share/classes/java/security/PermissionCollection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -103,7 +103,7 @@ public abstract class PermissionCollection implements java.io.Serializable { private static final long serialVersionUID = -6727011328946861783L; /** - * Whether this permission collection is read-only. + * @serial Whether this permission collection is read-only. *

* If set, the {@code add} method will throw an exception. */ diff --git a/src/java.base/share/classes/java/security/Permissions.java b/src/java.base/share/classes/java/security/Permissions.java index 3bdeac6f929..ecb18aca8bb 100644 --- a/src/java.base/share/classes/java/security/Permissions.java +++ b/src/java.base/share/classes/java/security/Permissions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -92,6 +92,7 @@ public final class Permissions extends PermissionCollection // checked private transient boolean hasUnresolved = false; + /** @serial */ // optimization. keep track of the AllPermission collection // - package private for ProtectionDomain optimization PermissionCollection allPermission; diff --git a/src/java.base/share/classes/java/security/Signature.java b/src/java.base/share/classes/java/security/Signature.java index 482db8d4015..006188aac61 100644 --- a/src/java.base/share/classes/java/security/Signature.java +++ b/src/java.base/share/classes/java/security/Signature.java @@ -100,12 +100,20 @@ * supply their own implementations of digital signature algorithms. * *

Every implementation of the Java platform is required to support the - * following standard {@code Signature} algorithms: + * following standard {@code Signature} algorithms. For the "RSASSA-PSS" + * algorithm, implementations must support the parameters in parentheses. For + * the "SHA256withECDSA" and "SHA384withECDSA" algorithms, implementations must + * support the curves in parentheses. *

* These algorithms are described in the
diff --git a/src/java.base/share/classes/java/security/SignedObject.java b/src/java.base/share/classes/java/security/SignedObject.java index f65300fc808..d1b203c3aea 100644 --- a/src/java.base/share/classes/java/security/SignedObject.java +++ b/src/java.base/share/classes/java/security/SignedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -122,18 +122,18 @@ public final class SignedObject implements Serializable { private static final long serialVersionUID = 720502720485447167L; /** - * The original content is "deep copied" in its serialized format + * @serial The original content is "deep copied" in its serialized format * and stored in a byte array. */ private byte[] content; /** - * The signature field is stored as a byte array. + * @serial The signature field is stored as a byte array. */ private byte[] signature; /** - * The algorithm used to sign the object. + * @serial The algorithm used to sign the object. */ private String thealgorithm; diff --git a/src/java.base/share/classes/java/security/cert/CertPath.java b/src/java.base/share/classes/java/security/cert/CertPath.java index 80e68d1c598..ffbbf0291b1 100644 --- a/src/java.base/share/classes/java/security/cert/CertPath.java +++ b/src/java.base/share/classes/java/security/cert/CertPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -301,9 +301,9 @@ protected static class CertPathRep implements Serializable { @java.io.Serial private static final long serialVersionUID = 3015633072427920915L; - /** The type of {@code Certificate}s in the {@code CertPath}. */ + /** @serial The type of {@code Certificate}s in the {@code CertPath}. */ private final String type; - /** The encoded form of the {@code CertPath}. */ + /** @serial The encoded form of the {@code CertPath}. */ private final byte[] data; /** diff --git a/src/java.base/share/classes/java/security/cert/Certificate.java b/src/java.base/share/classes/java/security/cert/Certificate.java index 1e212f644b3..618026c894d 100644 --- a/src/java.base/share/classes/java/security/cert/Certificate.java +++ b/src/java.base/share/classes/java/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -244,10 +244,10 @@ protected static class CertificateRep implements java.io.Serializable { @java.io.Serial private static final long serialVersionUID = -8563758940495660020L; - /** The standard name of the certificate type. */ + /** @serial The standard name of the certificate type. */ private final String type; - /** The certificate data. */ + /** @serial The certificate data. */ private final byte[] data; /** diff --git a/src/java.base/share/classes/java/text/DateFormat.java b/src/java.base/share/classes/java/text/DateFormat.java index e29b3f0509f..af756289086 100644 --- a/src/java.base/share/classes/java/text/DateFormat.java +++ b/src/java.base/share/classes/java/text/DateFormat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, 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 @@ -953,7 +953,7 @@ public static class Field extends Format.Field { private static final Field[] calendarToFieldMapping = new Field[Calendar.FIELD_COUNT]; - /** Calendar field. */ + /** @serial Calendar field. */ private int calendarField; /** diff --git a/src/java.base/share/classes/java/time/Duration.java b/src/java.base/share/classes/java/time/Duration.java index 402ecba7728..d640121f32d 100644 --- a/src/java.base/share/classes/java/time/Duration.java +++ b/src/java.base/share/classes/java/time/Duration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -158,11 +158,11 @@ private static class Lazy { } /** - * The number of seconds in the duration. + * @serial The number of seconds in the duration. */ private final long seconds; /** - * The number of nanoseconds in the duration, expressed as a fraction of the + * @serial The number of nanoseconds in the duration, expressed as a fraction of the * number of seconds. This is always positive, and never exceeds 999,999,999. */ private final int nanos; diff --git a/src/java.base/share/classes/java/time/Instant.java b/src/java.base/share/classes/java/time/Instant.java index 05358cc4f3c..82ff18c1421 100644 --- a/src/java.base/share/classes/java/time/Instant.java +++ b/src/java.base/share/classes/java/time/Instant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -252,11 +252,11 @@ public final class Instant private static final long serialVersionUID = -665713676816604388L; /** - * The number of seconds from the epoch of 1970-01-01T00:00:00Z. + * @serial The number of seconds from the epoch of 1970-01-01T00:00:00Z. */ private final long seconds; /** - * The number of nanoseconds, later along the time-line, from the seconds field. + * @serial The number of nanoseconds, later along the time-line, from the seconds field. * This is always positive, and never exceeds 999,999,999. */ private final int nanos; diff --git a/src/java.base/share/classes/java/time/LocalDate.java b/src/java.base/share/classes/java/time/LocalDate.java index 2d71fb1ceca..caf6ccd6641 100644 --- a/src/java.base/share/classes/java/time/LocalDate.java +++ b/src/java.base/share/classes/java/time/LocalDate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -174,15 +174,15 @@ public final class LocalDate static final long DAYS_0000_TO_1970 = (DAYS_PER_CYCLE * 5L) - (30L * 365L + 7L); /** - * The year. + * @serial The year. */ private final int year; /** - * The month-of-year. + * @serial The month-of-year. */ private final short month; /** - * The day-of-month. + * @serial The day-of-month. */ private final short day; diff --git a/src/java.base/share/classes/java/time/LocalDateTime.java b/src/java.base/share/classes/java/time/LocalDateTime.java index cea9123258c..f8c814957dc 100644 --- a/src/java.base/share/classes/java/time/LocalDateTime.java +++ b/src/java.base/share/classes/java/time/LocalDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -158,11 +158,11 @@ public final class LocalDateTime private static final long serialVersionUID = 6207766400415563566L; /** - * The date part. + * @serial The date part. */ private final LocalDate date; /** - * The time part. + * @serial The time part. */ private final LocalTime time; diff --git a/src/java.base/share/classes/java/time/LocalTime.java b/src/java.base/share/classes/java/time/LocalTime.java index f28f8d3c599..06f408350ca 100644 --- a/src/java.base/share/classes/java/time/LocalTime.java +++ b/src/java.base/share/classes/java/time/LocalTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -228,19 +228,19 @@ public final class LocalTime private static final long serialVersionUID = 6414437269572265201L; /** - * The hour. + * @serial The hour. */ private final byte hour; /** - * The minute. + * @serial The minute. */ private final byte minute; /** - * The second. + * @serial The second. */ private final byte second; /** - * The nanosecond. + * @serial The nanosecond. */ private final int nano; diff --git a/src/java.base/share/classes/java/time/MonthDay.java b/src/java.base/share/classes/java/time/MonthDay.java index acb3087a5e5..1de4fa84d3e 100644 --- a/src/java.base/share/classes/java/time/MonthDay.java +++ b/src/java.base/share/classes/java/time/MonthDay.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -144,11 +144,11 @@ public final class MonthDay .toFormatter(); /** - * The month-of-year, not null. + * @serial The month-of-year, not null. */ private final int month; /** - * The day-of-month. + * @serial The day-of-month. */ private final int day; diff --git a/src/java.base/share/classes/java/time/OffsetDateTime.java b/src/java.base/share/classes/java/time/OffsetDateTime.java index fd8355e36cd..6f7005b9fa4 100644 --- a/src/java.base/share/classes/java/time/OffsetDateTime.java +++ b/src/java.base/share/classes/java/time/OffsetDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -190,11 +190,11 @@ private static int compareInstant(OffsetDateTime datetime1, OffsetDateTime datet private static final long serialVersionUID = 2287754244819255394L; /** - * The local date-time. + * @serial The local date-time. */ private final LocalDateTime dateTime; /** - * The offset from UTC/Greenwich. + * @serial The offset from UTC/Greenwich. */ private final ZoneOffset offset; diff --git a/src/java.base/share/classes/java/time/OffsetTime.java b/src/java.base/share/classes/java/time/OffsetTime.java index 1f6feb4180f..ad9781e2459 100644 --- a/src/java.base/share/classes/java/time/OffsetTime.java +++ b/src/java.base/share/classes/java/time/OffsetTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -143,11 +143,11 @@ public final class OffsetTime private static final long serialVersionUID = 7264499704384272492L; /** - * The local date-time. + * @serial The local date-time. */ private final LocalTime time; /** - * The offset from UTC/Greenwich. + * @serial The offset from UTC/Greenwich. */ private final ZoneOffset offset; diff --git a/src/java.base/share/classes/java/time/Period.java b/src/java.base/share/classes/java/time/Period.java index 40cad4cac59..5ee80710edb 100644 --- a/src/java.base/share/classes/java/time/Period.java +++ b/src/java.base/share/classes/java/time/Period.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -155,15 +155,15 @@ public final class Period private static final List SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS); /** - * The number of years. + * @serial The number of years. */ private final int years; /** - * The number of months. + * @serial The number of months. */ private final int months; /** - * The number of days. + * @serial The number of days. */ private final int days; diff --git a/src/java.base/share/classes/java/time/Year.java b/src/java.base/share/classes/java/time/Year.java index cdcaa390320..97264ab8c1c 100644 --- a/src/java.base/share/classes/java/time/Year.java +++ b/src/java.base/share/classes/java/time/Year.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -159,7 +159,7 @@ public final class Year .toFormatter(); /** - * The year being represented. + * @serial The year being represented. */ private final int year; diff --git a/src/java.base/share/classes/java/time/YearMonth.java b/src/java.base/share/classes/java/time/YearMonth.java index 201c01a2193..8ad1172811f 100644 --- a/src/java.base/share/classes/java/time/YearMonth.java +++ b/src/java.base/share/classes/java/time/YearMonth.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -147,11 +147,11 @@ public final class YearMonth .toFormatter(); /** - * The year. + * @serial The year. */ private final int year; /** - * The month-of-year, not null. + * @serial The month-of-year, not null. */ private final int month; diff --git a/src/java.base/share/classes/java/time/ZoneOffset.java b/src/java.base/share/classes/java/time/ZoneOffset.java index 520a0e0b9a1..48f2a2ded22 100644 --- a/src/java.base/share/classes/java/time/ZoneOffset.java +++ b/src/java.base/share/classes/java/time/ZoneOffset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -163,7 +163,7 @@ public final class ZoneOffset public static final ZoneOffset MAX = ZoneOffset.ofTotalSeconds(MAX_SECONDS); /** - * The total offset in seconds. + * @serial The total offset in seconds. */ private final int totalSeconds; /** diff --git a/src/java.base/share/classes/java/time/ZonedDateTime.java b/src/java.base/share/classes/java/time/ZonedDateTime.java index b1426efc914..135d1a16ae7 100644 --- a/src/java.base/share/classes/java/time/ZonedDateTime.java +++ b/src/java.base/share/classes/java/time/ZonedDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -172,15 +172,15 @@ public final class ZonedDateTime private static final long serialVersionUID = -6260982410461394882L; /** - * The local date-time. + * @serial The local date-time. */ private final LocalDateTime dateTime; /** - * The offset from UTC/Greenwich. + * @serial The offset from UTC/Greenwich. */ private final ZoneOffset offset; /** - * The time-zone. + * @serial The time-zone. */ private final ZoneId zone; diff --git a/src/java.base/share/classes/java/time/format/DateTimeParseException.java b/src/java.base/share/classes/java/time/format/DateTimeParseException.java index e9dd56b02ff..4bf69fdeb12 100644 --- a/src/java.base/share/classes/java/time/format/DateTimeParseException.java +++ b/src/java.base/share/classes/java/time/format/DateTimeParseException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -82,11 +82,11 @@ public class DateTimeParseException extends DateTimeException { private static final long serialVersionUID = 4304633501674722597L; /** - * The text that was being parsed. + * @serial The text that was being parsed. */ private final String parsedString; /** - * The error index in the text. + * @serial The error index in the text. */ private final int errorIndex; diff --git a/src/java.base/share/classes/java/time/temporal/ValueRange.java b/src/java.base/share/classes/java/time/temporal/ValueRange.java index 78a13420877..442cf0a2509 100644 --- a/src/java.base/share/classes/java/time/temporal/ValueRange.java +++ b/src/java.base/share/classes/java/time/temporal/ValueRange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -96,19 +96,19 @@ public final class ValueRange implements Serializable { private static final long serialVersionUID = -7317881728594519368L; /** - * The smallest minimum value. + * @serial The smallest minimum value. */ private final long minSmallest; /** - * The largest minimum value. + * @serial The largest minimum value. */ private final long minLargest; /** - * The smallest maximum value. + * @serial The smallest maximum value. */ private final long maxSmallest; /** - * The largest maximum value. + * @serial The largest maximum value. */ private final long maxLargest; diff --git a/src/java.base/share/classes/java/time/temporal/WeekFields.java b/src/java.base/share/classes/java/time/temporal/WeekFields.java index 9b687017a36..bbad365553d 100644 --- a/src/java.base/share/classes/java/time/temporal/WeekFields.java +++ b/src/java.base/share/classes/java/time/temporal/WeekFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -247,11 +247,11 @@ public final class WeekFields implements Serializable { private static final long serialVersionUID = -1177360819670808121L; /** - * The first day-of-week. + * @serial The first day-of-week. */ private final DayOfWeek firstDayOfWeek; /** - * The minimal number of days in the first week. + * @serial The minimal number of days in the first week. */ private final int minimalDays; /** diff --git a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java index f5d27a0cae0..1e358b9295d 100644 --- a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java +++ b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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,19 +104,19 @@ public final class ZoneOffsetTransition */ private static final long serialVersionUID = -6946044323557704546L; /** - * The transition epoch-second. + * @serial The transition epoch-second. */ private final long epochSecond; /** - * The local transition date-time at the transition. + * @serial The local transition date-time at the transition. */ private final LocalDateTime transition; /** - * The offset before transition. + * @serial The offset before transition. */ private final ZoneOffset offsetBefore; /** - * The offset after transition. + * @serial The offset after transition. */ private final ZoneOffset offsetAfter; diff --git a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java index 8eb232075fe..129aae8c27f 100644 --- a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java +++ b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -105,12 +105,12 @@ public final class ZoneOffsetTransitionRule implements Serializable { private static final long serialVersionUID = 6889046316657758795L; /** - * The month of the month-day of the first day of the cutover week. + * @serial The month of the month-day of the first day of the cutover week. * The actual date will be adjusted by the dowChange field. */ private final Month month; /** - * The day-of-month of the month-day of the cutover week. + * @serial The day-of-month of the month-day of the cutover week. * If positive, it is the start of the week where the cutover can occur. * If negative, it represents the end of the week where cutover can occur. * The value is the number of days from the end of the month, such that @@ -119,31 +119,31 @@ public final class ZoneOffsetTransitionRule implements Serializable { */ private final byte dom; /** - * The cutover day-of-week, null to retain the day-of-month. + * @serial The cutover day-of-week, null to retain the day-of-month. */ private final DayOfWeek dow; /** - * The cutover time in the 'before' offset. + * @serial The cutover time in the 'before' offset. */ private final LocalTime time; /** - * Whether the cutover time is midnight at the end of day. + * @serial Whether the cutover time is midnight at the end of day. */ private final boolean timeEndOfDay; /** - * The definition of how the local time should be interpreted. + * @serial The definition of how the local time should be interpreted. */ private final TimeDefinition timeDefinition; /** - * The standard offset at the cutover. + * @serial The standard offset at the cutover. */ private final ZoneOffset standardOffset; /** - * The offset before the cutover. + * @serial The offset before the cutover. */ private final ZoneOffset offsetBefore; /** - * The offset after the cutover. + * @serial The offset after the cutover. */ private final ZoneOffset offsetAfter; diff --git a/src/java.base/share/classes/java/time/zone/ZoneRules.java b/src/java.base/share/classes/java/time/zone/ZoneRules.java index 5945e801f15..788c080fc17 100644 --- a/src/java.base/share/classes/java/time/zone/ZoneRules.java +++ b/src/java.base/share/classes/java/time/zone/ZoneRules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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,29 +118,29 @@ public final class ZoneRules implements Serializable { private static final int LAST_CACHED_YEAR = 2100; /** - * The transitions between standard offsets (epoch seconds), sorted. + * @serial The transitions between standard offsets (epoch seconds), sorted. */ private final long[] standardTransitions; /** - * The standard offsets. + * @serial The standard offsets. */ private final ZoneOffset[] standardOffsets; /** - * The transitions between instants (epoch seconds), sorted. + * @serial The transitions between instants (epoch seconds), sorted. */ private final long[] savingsInstantTransitions; /** - * The transitions between local date-times, sorted. + * @serial The transitions between local date-times, sorted. * This is a paired array, where the first entry is the start of the transition * and the second entry is the end of the transition. */ private final LocalDateTime[] savingsLocalTransitions; /** - * The wall offsets. + * @serial The wall offsets. */ private final ZoneOffset[] wallOffsets; /** - * The last rule. + * @serial The last rule. */ private final ZoneOffsetTransitionRule[] lastRules; /** diff --git a/src/java.base/share/classes/java/util/AbstractMap.java b/src/java.base/share/classes/java/util/AbstractMap.java index c5ea53e17db..7c0b4d9dd1b 100644 --- a/src/java.base/share/classes/java/util/AbstractMap.java +++ b/src/java.base/share/classes/java/util/AbstractMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -587,8 +587,10 @@ public static class SimpleEntry @java.io.Serial private static final long serialVersionUID = -8499721149061103585L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final K key; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private V value; @@ -733,8 +735,10 @@ public static class SimpleImmutableEntry @java.io.Serial private static final long serialVersionUID = 7138329143949025153L; + /** @serial */ @SuppressWarnings("serial") // Not statically typed as Serializable private final K key; + /** @serial */ @SuppressWarnings("serial") // Not statically typed as Serializable private final V value; diff --git a/src/java.base/share/classes/java/util/Arrays.java b/src/java.base/share/classes/java/util/Arrays.java index 80fa81e004c..7de84e76d08 100644 --- a/src/java.base/share/classes/java/util/Arrays.java +++ b/src/java.base/share/classes/java/util/Arrays.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -4220,6 +4220,7 @@ private static class ArrayList extends AbstractList { @java.io.Serial private static final long serialVersionUID = -2764017481108945198L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final E[] a; diff --git a/src/java.base/share/classes/java/util/Collections.java b/src/java.base/share/classes/java/util/Collections.java index 4ec5756f712..2afb94af114 100644 --- a/src/java.base/share/classes/java/util/Collections.java +++ b/src/java.base/share/classes/java/util/Collections.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -1054,6 +1054,7 @@ static class UnmodifiableCollection implements Collection, Serializable { @java.io.Serial private static final long serialVersionUID = 1820017752578914078L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Collection c; @@ -1337,6 +1338,7 @@ static class UnmodifiableSortedSet implements SortedSet, Serializable { @java.io.Serial private static final long serialVersionUID = -4929149591599911165L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedSet ss; @@ -1419,7 +1421,7 @@ public EmptyNavigableSet() { new EmptyNavigableSet<>(); /** - * The instance we are protecting. + * @serial The instance we are protecting. */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableSet ns; @@ -1488,6 +1490,7 @@ static class UnmodifiableList extends UnmodifiableCollection @java.io.Serial private static final long serialVersionUID = -283967356065247728L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final List list; @@ -1641,6 +1644,7 @@ private static class UnmodifiableMap implements Map, Serializable { @java.io.Serial private static final long serialVersionUID = -1034234728574286014L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Map m; @@ -2068,6 +2072,7 @@ static class UnmodifiableSortedMap @java.io.Serial private static final long serialVersionUID = -8806743815996713206L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedMap sm; @@ -2149,7 +2154,7 @@ public NavigableSet navigableKeySet() new EmptyNavigableMap<>(); /** - * The instance we wrap and protect. + * @serial The instance we wrap and protect. */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableMap nm; @@ -2283,8 +2288,10 @@ static class SynchronizedCollection implements Collection, Serializable { @java.io.Serial private static final long serialVersionUID = 3053995032091335093L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Collection c; // Backing Collection + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Object mutex; // Object on which to synchronize @@ -2487,6 +2494,7 @@ static class SynchronizedSortedSet @java.io.Serial private static final long serialVersionUID = 8695801310862127406L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedSet ss; @@ -2583,6 +2591,7 @@ static class SynchronizedNavigableSet @java.io.Serial private static final long serialVersionUID = -5505529816273629798L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableSet ns; @@ -2694,6 +2703,7 @@ static class SynchronizedList @java.io.Serial private static final long serialVersionUID = -7754090372962971524L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final List list; @@ -2862,8 +2872,10 @@ private static class SynchronizedMap @java.io.Serial private static final long serialVersionUID = 1978198479659022715L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final Map m; // Backing Map + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Object mutex; // Object on which to synchronize @@ -3061,6 +3073,7 @@ static class SynchronizedSortedMap @java.io.Serial private static final long serialVersionUID = -8798146769416483793L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedMap sm; @@ -3165,6 +3178,7 @@ static class SynchronizedNavigableMap @java.io.Serial private static final long serialVersionUID = 699392247599746807L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableMap nm; @@ -3345,8 +3359,10 @@ static class CheckedCollection implements Collection, Serializable { @java.io.Serial private static final long serialVersionUID = 1578914078182001775L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Collection c; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Class type; @@ -3403,6 +3419,7 @@ public void forEachRemaining(Consumer action) { public boolean add(E e) { return c.add(typeCheck(e)); } + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private E[] zeroLengthElementArray; // Lazily initialized @@ -3497,6 +3514,7 @@ static class CheckedQueue { @java.io.Serial private static final long serialVersionUID = 1433151992604707767L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Queue queue; @@ -3602,6 +3620,7 @@ static class CheckedSortedSet extends CheckedSet @java.io.Serial private static final long serialVersionUID = 1599911165492914959L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedSet ss; @@ -3667,6 +3686,7 @@ static class CheckedNavigableSet extends CheckedSortedSet @java.io.Serial private static final long serialVersionUID = -5429120189805438922L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableSet ns; @@ -3751,6 +3771,7 @@ static class CheckedList { @java.io.Serial private static final long serialVersionUID = 65247728283967356L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final List list; @@ -3901,10 +3922,13 @@ private static class CheckedMap @java.io.Serial private static final long serialVersionUID = 5742860141034234728L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final Map m; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Class keyType; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Class valueType; @@ -4301,6 +4325,7 @@ static class CheckedSortedMap extends CheckedMap @java.io.Serial private static final long serialVersionUID = 1599671320688067438L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final SortedMap sm; @@ -4377,6 +4402,7 @@ static class CheckedNavigableMap extends CheckedSortedMap @java.io.Serial private static final long serialVersionUID = -4852462692372534096L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final NavigableMap nm; @@ -5108,6 +5134,7 @@ private static class SingletonSet @java.io.Serial private static final long serialVersionUID = 3193687207550431679L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final E element; @@ -5163,6 +5190,7 @@ private static class SingletonList @java.io.Serial private static final long serialVersionUID = 3093736618740652951L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final E element; @@ -5233,8 +5261,10 @@ private static class SingletonMap @java.io.Serial private static final long serialVersionUID = -6979724477215052911L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final K k; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final V v; @@ -5373,7 +5403,9 @@ private static class CopiesList @java.io.Serial private static final long serialVersionUID = 2739099268398711800L; + /** @serial */ final int n; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final E element; @@ -5914,6 +5946,7 @@ public static Set newSetFromMap(Map map) { private static class SetFromMap extends AbstractSet implements Set, Serializable { + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final Map m; // The backing map private transient Set s; // Its keySet @@ -6088,6 +6121,7 @@ static class AsLIFOQueue extends AbstractQueue implements Queue, Serializable { @java.io.Serial private static final long serialVersionUID = 1802017725587941708L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final Deque q; AsLIFOQueue(Deque q) { this.q = q; } diff --git a/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java b/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java index ebeb3d5c44c..e84cd9d52e6 100644 --- a/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java +++ b/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class DuplicateFormatFlagsException extends IllegalFormatExcep @java.io.Serial private static final long serialVersionUID = 18890531L; + /** @serial */ private String flags; /** diff --git a/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java b/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java index cca7b3eb553..77d52c5e2ba 100644 --- a/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java +++ b/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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,8 +40,10 @@ public non-sealed class FormatFlagsConversionMismatchException @java.io.Serial private static final long serialVersionUID = 19120414L; + /** @serial */ private String f; + /** @serial */ private char c; /** diff --git a/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java b/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java index 2f1803d220e..c928cd0a3d4 100644 --- a/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java +++ b/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class IllegalFormatCodePointException extends IllegalFormatExc @java.io.Serial private static final long serialVersionUID = 19080630L; + /** @serial */ private int c; /** diff --git a/src/java.base/share/classes/java/util/IllegalFormatConversionException.java b/src/java.base/share/classes/java/util/IllegalFormatConversionException.java index 67237f63cdf..3f2b4512dc6 100644 --- a/src/java.base/share/classes/java/util/IllegalFormatConversionException.java +++ b/src/java.base/share/classes/java/util/IllegalFormatConversionException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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,7 +40,9 @@ public non-sealed class IllegalFormatConversionException extends IllegalFormatEx @java.io.Serial private static final long serialVersionUID = 17000126L; + /** @serial */ private char c; + /** @serial */ private Class arg; /** diff --git a/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java b/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java index 408fa1efa5c..c0770b7153c 100644 --- a/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java +++ b/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class IllegalFormatFlagsException extends IllegalFormatExcepti @java.io.Serial private static final long serialVersionUID = 790824L; + /** @serial */ private String flags; /** diff --git a/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java b/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java index 4527953790c..dbfb712683f 100644 --- a/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java +++ b/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class IllegalFormatPrecisionException extends IllegalFormatExc @java.io.Serial private static final long serialVersionUID = 18711008L; + /** @serial */ private int p; /** diff --git a/src/java.base/share/classes/java/util/IllegalFormatWidthException.java b/src/java.base/share/classes/java/util/IllegalFormatWidthException.java index df8d59b9e81..f22bc61a091 100644 --- a/src/java.base/share/classes/java/util/IllegalFormatWidthException.java +++ b/src/java.base/share/classes/java/util/IllegalFormatWidthException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class IllegalFormatWidthException extends IllegalFormatExcepti @java.io.Serial private static final long serialVersionUID = 16660902L; + /** @serial */ private int w; /** diff --git a/src/java.base/share/classes/java/util/IllformedLocaleException.java b/src/java.base/share/classes/java/util/IllformedLocaleException.java index 47febaae018..f4cafe0a943 100644 --- a/src/java.base/share/classes/java/util/IllformedLocaleException.java +++ b/src/java.base/share/classes/java/util/IllformedLocaleException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, 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 IllformedLocaleException extends RuntimeException { @java.io.Serial private static final long serialVersionUID = -5245986824925681401L; + /** @serial */ private int _errIdx = -1; /** diff --git a/src/java.base/share/classes/java/util/MissingFormatArgumentException.java b/src/java.base/share/classes/java/util/MissingFormatArgumentException.java index 6363566216b..42d15559415 100644 --- a/src/java.base/share/classes/java/util/MissingFormatArgumentException.java +++ b/src/java.base/share/classes/java/util/MissingFormatArgumentException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class MissingFormatArgumentException extends IllegalFormatExce @java.io.Serial private static final long serialVersionUID = 19190115L; + /** @serial */ private String s; /** diff --git a/src/java.base/share/classes/java/util/MissingFormatWidthException.java b/src/java.base/share/classes/java/util/MissingFormatWidthException.java index b553a3876ac..47f787a0c7b 100644 --- a/src/java.base/share/classes/java/util/MissingFormatWidthException.java +++ b/src/java.base/share/classes/java/util/MissingFormatWidthException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class MissingFormatWidthException extends IllegalFormatExcepti @java.io.Serial private static final long serialVersionUID = 15560123L; + /** @serial */ private String s; /** diff --git a/src/java.base/share/classes/java/util/PriorityQueue.java b/src/java.base/share/classes/java/util/PriorityQueue.java index 332effeb44b..bacce5ef97e 100644 --- a/src/java.base/share/classes/java/util/PriorityQueue.java +++ b/src/java.base/share/classes/java/util/PriorityQueue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -103,12 +103,12 @@ public class PriorityQueue extends AbstractQueue transient Object[] queue; // non-private to simplify nested class access /** - * The number of elements in the priority queue. + * @serial The number of elements in the priority queue. */ int size; /** - * The comparator, or null if priority queue uses elements' + * @serial The comparator, or null if priority queue uses elements' * natural ordering. */ @SuppressWarnings("serial") // Conditionally serializable diff --git a/src/java.base/share/classes/java/util/TreeMap.java b/src/java.base/share/classes/java/util/TreeMap.java index 1e61136bee4..ab565f371a9 100644 --- a/src/java.base/share/classes/java/util/TreeMap.java +++ b/src/java.base/share/classes/java/util/TreeMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -1656,12 +1656,12 @@ abstract static class NavigableSubMap extends AbstractMap @java.io.Serial private static final long serialVersionUID = -2102997345730753016L; /** - * The backing map. + * @serial The backing map. */ final TreeMap m; /** - * Endpoints are represented as triples (fromStart, lo, + * @serial Endpoints are represented as triples (fromStart, lo, * loInclusive) and (toEnd, hi, hiInclusive). If fromStart is * true, then the low (absolute) bound is the start of the * backing map, and the other values are ignored. Otherwise, @@ -1670,9 +1670,12 @@ abstract static class NavigableSubMap extends AbstractMap */ @SuppressWarnings("serial") // Conditionally serializable final K lo; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable final K hi; + /** @serial */ final boolean fromStart, toEnd; + /** @serial */ final boolean loInclusive, hiInclusive; NavigableSubMap(TreeMap m, @@ -2288,6 +2291,7 @@ static final class DescendingSubMap extends NavigableSubMap { super(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive); } + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final Comparator reverseComparator = Collections.reverseOrder(m.comparator); @@ -2376,9 +2380,12 @@ private class SubMap extends AbstractMap implements SortedMap, java.io.Serializable { @java.io.Serial private static final long serialVersionUID = -6520786458950516097L; + /** @serial */ private boolean fromStart = false, toEnd = false; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private K fromKey; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private K toKey; @java.io.Serial diff --git a/src/java.base/share/classes/java/util/UUID.java b/src/java.base/share/classes/java/util/UUID.java index e334f7263e4..db0dbe28802 100644 --- a/src/java.base/share/classes/java/util/UUID.java +++ b/src/java.base/share/classes/java/util/UUID.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -83,17 +83,13 @@ public final class UUID implements java.io.Serializable, Comparable { @java.io.Serial private static final long serialVersionUID = -4856846361193249489L; - /* - * The most significant 64 bits of this UUID. - * - * @serial + /** + * @serial The most significant 64 bits of this UUID. */ private final long mostSigBits; - /* - * The least significant 64 bits of this UUID. - * - * @serial + /** + * @serial The least significant 64 bits of this UUID. */ private final long leastSigBits; diff --git a/src/java.base/share/classes/java/util/UnknownFormatConversionException.java b/src/java.base/share/classes/java/util/UnknownFormatConversionException.java index 13d428e0b60..992d9106644 100644 --- a/src/java.base/share/classes/java/util/UnknownFormatConversionException.java +++ b/src/java.base/share/classes/java/util/UnknownFormatConversionException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class UnknownFormatConversionException extends IllegalFormatEx @java.io.Serial private static final long serialVersionUID = 19060418L; + /** @serial */ private String s; /** diff --git a/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java b/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java index 93eaf85b389..bcd228b7d0f 100644 --- a/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java +++ b/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ public non-sealed class UnknownFormatFlagsException extends IllegalFormatExcepti @java.io.Serial private static final long serialVersionUID = 19370506L; + /** @serial */ private String flags; /** diff --git a/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java b/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java index b16f3459601..854bf927464 100644 --- a/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java +++ b/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java @@ -100,17 +100,17 @@ public class ArrayBlockingQueue extends AbstractQueue */ private static final long serialVersionUID = -817911632652898426L; - /** The queued items */ + /** @serial The queued items */ @SuppressWarnings("serial") // Conditionally serializable final Object[] items; - /** items index for next take, poll, peek or remove */ + /** @serial items index for next take, poll, peek or remove */ int takeIndex; - /** items index for next put, offer, or add */ + /** @serial items index for next put, offer, or add */ int putIndex; - /** Number of elements in the queue */ + /** @serial Number of elements in the queue */ int count; /* @@ -118,14 +118,14 @@ public class ArrayBlockingQueue extends AbstractQueue * found in any textbook. */ - /** Main lock guarding all access */ + /** @serial Main lock guarding all access */ final ReentrantLock lock; - /** Condition for waiting takes */ + /** @serial Condition for waiting takes */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notEmpty; - /** Condition for waiting puts */ + /** @serial Condition for waiting puts */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notFull; diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java index 6447e6d8a4e..07933870bd1 100644 --- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java +++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java @@ -4624,6 +4624,7 @@ public final boolean retainAll(Collection c) { public static final class KeySetView extends CollectionView implements Set, java.io.Serializable { private static final long serialVersionUID = 7249069246763182397L; + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final V value; KeySetView(ConcurrentHashMap map, V value) { // non-public diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java index 6a60a2397ce..bcfdd997102 100644 --- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java +++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java @@ -2401,19 +2401,19 @@ static final class SubMap extends AbstractMap implements ConcurrentNavigableMap, Serializable { private static final long serialVersionUID = -7647078645895051609L; - /** Underlying map */ + /** @serial Underlying map */ final ConcurrentSkipListMap m; - /** lower bound key, or null if from start */ + /** @serial lower bound key, or null if from start */ @SuppressWarnings("serial") // Conditionally serializable private final K lo; - /** upper bound key, or null if to end */ + /** @serial upper bound key, or null if to end */ @SuppressWarnings("serial") // Conditionally serializable private final K hi; - /** inclusion flag for lo */ + /** @serial inclusion flag for lo */ private final boolean loInclusive; - /** inclusion flag for hi */ + /** @serial inclusion flag for hi */ private final boolean hiInclusive; - /** direction */ + /** @serial direction */ final boolean isDescending; // Lazily initialized view holders diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java index 0bcb7978e90..649eaa563c7 100644 --- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java +++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java @@ -99,7 +99,7 @@ public class ConcurrentSkipListSet private static final long serialVersionUID = -2479143111061671589L; /** - * The underlying map. Uses Boolean.TRUE as value for each + * @serial The underlying map. Uses Boolean.TRUE as value for each * element. This field is declared final for the sake of thread * safety, which entails some ugliness in clone(). */ diff --git a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java index ab48a44c97a..cef1682b0b1 100644 --- a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java +++ b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java @@ -99,6 +99,7 @@ public class CopyOnWriteArraySet extends AbstractSet implements java.io.Serializable { private static final long serialVersionUID = 5457747651344034263L; + /** @serial */ private final CopyOnWriteArrayList al; /** diff --git a/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java b/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java index 7884a131ffb..3ca7a5ab9c9 100644 --- a/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java +++ b/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java @@ -427,9 +427,9 @@ public abstract class CountedCompleter extends ForkJoinTask { private static final long serialVersionUID = 5232453752276485070L; - /** This task's completer, or null if none */ + /** @serial This task's completer, or null if none */ final CountedCompleter completer; - /** The number of pending tasks until completion */ + /** @serial The number of pending tasks until completion */ volatile int pending; /** diff --git a/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java b/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java index 7c1e974aafa..6062a0f6455 100644 --- a/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java +++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java @@ -278,6 +278,7 @@ final boolean casNext(Aux c, Aux v) { // used only in cancellation static final int UNCOMPENSATE = 1 << 16; // helpJoin sentinel // Fields + /** @serial */ volatile int status; // accessed directly by pool and workers private transient volatile Aux aux; // either waiters or thrown Exception diff --git a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java index 7b6523021dc..b22786a09f6 100644 --- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java +++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java @@ -152,17 +152,17 @@ static final class Node { /** Number of items in the deque */ private transient int count; - /** Maximum number of items in the deque */ + /** @serial Maximum number of items in the deque */ private final int capacity; - /** Main lock guarding all access */ + /** @serial Main lock guarding all access */ final ReentrantLock lock = new ReentrantLock(); - /** Condition for waiting takes */ + /** @serial Condition for waiting takes */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notEmpty = lock.newCondition(); - /** Condition for waiting puts */ + /** @serial Condition for waiting puts */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notFull = lock.newCondition(); diff --git a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java index a67be9a987d..4f627d0ff5e 100644 --- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java +++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java @@ -134,10 +134,10 @@ static class Node { Node(E x) { item = x; } } - /** The capacity bound, or Integer.MAX_VALUE if none */ + /** @serial The capacity bound, or Integer.MAX_VALUE if none */ private final int capacity; - /** Current number of elements */ + /** @serial Current number of elements */ private final AtomicInteger count = new AtomicInteger(); /** @@ -152,17 +152,17 @@ static class Node { */ private transient Node last; - /** Lock held by take, poll, etc */ + /** @serial Lock held by take, poll, etc */ private final ReentrantLock takeLock = new ReentrantLock(); - /** Wait queue for waiting takes */ + /** @serial Wait queue for waiting takes */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notEmpty = takeLock.newCondition(); - /** Lock held by put, offer, etc */ + /** @serial Lock held by put, offer, etc */ private final ReentrantLock putLock = new ReentrantLock(); - /** Wait queue for waiting puts */ + /** @serial Wait queue for waiting puts */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notFull = putLock.newCondition(); diff --git a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java index f51e356736d..ebaecaa525d 100644 --- a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java +++ b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java @@ -160,12 +160,12 @@ public class PriorityBlockingQueue extends AbstractQueue private transient Comparator comparator; /** - * Lock used for all public operations. + * @serial Lock used for all public operations. */ private final ReentrantLock lock = new ReentrantLock(); /** - * Condition for blocking when empty. + * @serial Condition for blocking when empty. */ @SuppressWarnings("serial") // Classes implementing Condition may be serializable. private final Condition notEmpty = lock.newCondition(); @@ -176,7 +176,7 @@ public class PriorityBlockingQueue extends AbstractQueue private transient volatile int allocationSpinLock; /** - * A plain PriorityQueue used only for serialization, + * @serial A plain PriorityQueue used only for serialization, * to maintain compatibility with previous versions * of this class. Non-null only during serialization/deserialization. */ diff --git a/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java b/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java index e143760bbc7..4760234c25e 100644 --- a/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java +++ b/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java @@ -84,7 +84,7 @@ public abstract class RecursiveTask extends ForkJoinTask { public RecursiveTask() {} /** - * The result of the computation. + * @serial The result of the computation. */ @SuppressWarnings("serial") // Conditionally serializable V result; diff --git a/src/java.base/share/classes/java/util/concurrent/Semaphore.java b/src/java.base/share/classes/java/util/concurrent/Semaphore.java index 5c299659d6a..0e7a9ccc0b3 100644 --- a/src/java.base/share/classes/java/util/concurrent/Semaphore.java +++ b/src/java.base/share/classes/java/util/concurrent/Semaphore.java @@ -161,7 +161,7 @@ */ public class Semaphore implements java.io.Serializable { private static final long serialVersionUID = -3222578661600680210L; - /** All mechanics via AbstractQueuedSynchronizer subclass */ + /** @serial All mechanics via AbstractQueuedSynchronizer subclass */ private final Sync sync; /** diff --git a/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java b/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java index f5a2ce4d9b4..49efe5d5c2c 100644 --- a/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java +++ b/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java @@ -555,8 +555,11 @@ static class LifoWaitQueue extends WaitQueue { static class FifoWaitQueue extends WaitQueue { private static final long serialVersionUID = -3623113410248163686L; } + /** @serial */ private ReentrantLock qlock; + /** @serial */ private WaitQueue waitingProducers; + /** @serial */ private WaitQueue waitingConsumers; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java index fb171e9c1d9..0cae4266b42 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java @@ -55,6 +55,7 @@ public class AtomicBoolean implements java.io.Serializable { private static final VarHandle VALUE = MhUtil.findVarHandle( MethodHandles.lookup(), "value", int.class); + /** @serial */ private volatile int value; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java index 4ebd758ccc7..90b4791f05a 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java @@ -63,6 +63,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { private static final long VALUE = U.objectFieldOffset(AtomicInteger.class, "value"); + /** @serial */ private volatile int value; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java index 7e253ead335..3757f30372f 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java @@ -51,6 +51,7 @@ public class AtomicIntegerArray implements java.io.Serializable { private static final long serialVersionUID = 2862133569453604235L; private static final VarHandle AA = MethodHandles.arrayElementVarHandle(int[].class); + /** @serial */ private final int[] array; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java index d0e50b0fda8..81c60305a2a 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java @@ -63,6 +63,7 @@ public class AtomicLong extends Number implements java.io.Serializable { private static final long VALUE = U.objectFieldOffset(AtomicLong.class, "value"); + /** @serial */ private volatile long value; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java index 2145c795799..1486b309640 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java @@ -51,6 +51,7 @@ public class AtomicLongArray implements java.io.Serializable { private static final long serialVersionUID = -2308431214976778248L; private static final VarHandle AA = MethodHandles.arrayElementVarHandle(long[].class); + /** @serial */ private final long[] array; /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java index 1d7268609d7..27df942134c 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java @@ -55,6 +55,7 @@ public class AtomicReference implements java.io.Serializable { private static final VarHandle VALUE = MhUtil.findVarHandle( MethodHandles.lookup(), "value", Object.class); + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private volatile V value; diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java index dbec6b81dd9..ff4e9fa7355 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java @@ -55,6 +55,7 @@ public class AtomicReferenceArray implements java.io.Serializable { private static final long serialVersionUID = -6209656149925076980L; private static final VarHandle AA = MethodHandles.arrayElementVarHandle(Object[].class); + /** @serial */ @SuppressWarnings("serial") // Conditionally serializable private final Object[] array; // must have exact type Object[] diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java b/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java index eb837a0fd29..47da669acce 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java @@ -84,8 +84,10 @@ public class DoubleAccumulator extends Striped64 implements Serializable { private static final long serialVersionUID = 7249069246863182397L; + /** @serial */ @SuppressWarnings("serial") // Not statically typed as Serializable private final DoubleBinaryOperator function; + /** @serial */ private final long identity; // use long representation /** diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java b/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java index 0d48a686cf2..20e69a5f0ce 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java @@ -82,8 +82,10 @@ public class LongAccumulator extends Striped64 implements Serializable { private static final long serialVersionUID = 7249069246863182397L; + /** @serial */ @SuppressWarnings("serial") // Not statically typed as Serializable private final LongBinaryOperator function; + /** @serial */ private final long identity; /** diff --git a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java index 95ac1b2e46f..bdb81f3cb60 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java @@ -152,7 +152,7 @@ public final boolean block() { private transient volatile Node tail; /** - * The synchronization state. + * @serial The synchronization state. */ private volatile long state; diff --git a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java index 6794bab3110..5d899ffb0c5 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java @@ -532,7 +532,7 @@ public final boolean block() { private transient volatile Node tail; /** - * The synchronization state. + * @serial The synchronization state. */ private volatile int state; diff --git a/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java b/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java index 3378ce3983a..d0ad4cae428 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java @@ -108,7 +108,7 @@ */ public class ReentrantLock implements Lock, java.io.Serializable { private static final long serialVersionUID = 7373984872572414699L; - /** Synchronizer providing all implementation mechanics */ + /** @serial Synchronizer providing all implementation mechanics */ private final Sync sync; /** diff --git a/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java b/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java index 517708e70f3..cc9b75a7e37 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java @@ -217,11 +217,11 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializable { private static final long serialVersionUID = -6992448646407690164L; - /** Inner class providing readlock */ + /** @serial Inner class providing readlock */ private final ReentrantReadWriteLock.ReadLock readerLock; - /** Inner class providing writelock */ + /** @serial Inner class providing writelock */ private final ReentrantReadWriteLock.WriteLock writerLock; - /** Performs all synchronization mechanics */ + /** @serial Performs all synchronization mechanics */ final Sync sync; /** @@ -713,6 +713,7 @@ final boolean readerShouldBlock() { */ public static class ReadLock implements Lock, java.io.Serializable { private static final long serialVersionUID = -5992448646407690164L; + /** @serial */ private final Sync sync; /** @@ -927,6 +928,7 @@ public String toString() { */ public static class WriteLock implements Lock, java.io.Serializable { private static final long serialVersionUID = -4992448646407690164L; + /** @serial */ private final Sync sync; /** diff --git a/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java b/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java index 2b5da62f5bd..578a97754df 100644 --- a/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java +++ b/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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,8 +38,11 @@ public class PatternSyntaxException @java.io.Serial private static final long serialVersionUID = -3864639126226059218L; + /** @serial */ private final String desc; + /** @serial */ private final String pattern; + /** @serial */ private final int index; /** diff --git a/src/java.base/share/classes/javax/crypto/Cipher.java b/src/java.base/share/classes/javax/crypto/Cipher.java index 2cfdcf55823..8187f863b5c 100644 --- a/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/src/java.base/share/classes/javax/crypto/Cipher.java @@ -148,7 +148,8 @@ *
  • {@code AES/CBC/PKCS5Padding} (128)
  • *
  • {@code AES/ECB/NoPadding} (128)
  • *
  • {@code AES/ECB/PKCS5Padding} (128)
  • - *
  • {@code AES/GCM/NoPadding} (128)
  • + *
  • {@code AES/GCM/NoPadding} (128, 256)
  • + *
  • {@code ChaCha20-Poly1305}
  • *
  • {@code DESede/CBC/NoPadding} (168)
  • *
  • {@code DESede/CBC/PKCS5Padding} (168)
  • *
  • {@code DESede/ECB/NoPadding} (168)
  • diff --git a/src/java.base/share/classes/javax/crypto/KeyAgreement.java b/src/java.base/share/classes/javax/crypto/KeyAgreement.java index 8a055b6d809..5e2ceb185aa 100644 --- a/src/java.base/share/classes/javax/crypto/KeyAgreement.java +++ b/src/java.base/share/classes/javax/crypto/KeyAgreement.java @@ -57,11 +57,14 @@ * specific or as specified by the standard key agreement algorithm. * *

    Every implementation of the Java platform is required to support the - * following standard {@code KeyAgreement} algorithm: + * following standard {@code KeyAgreement} algorithms. For the "ECDH" + * algorithm, implementations must support the curves in parentheses. *

      *
    • {@code DiffieHellman}
    • + *
    • {@code ECDH} (secp256r1, secp384r1)
    • + *
    • {@code X25519}
    • *
    - * This algorithm is described in the
    * KeyAgreement section of the * Java Security Standard Algorithm Names Specification. diff --git a/src/java.base/share/classes/javax/crypto/KeyGenerator.java b/src/java.base/share/classes/javax/crypto/KeyGenerator.java index 0826bf2adb5..ad112e6ffeb 100644 --- a/src/java.base/share/classes/javax/crypto/KeyGenerator.java +++ b/src/java.base/share/classes/javax/crypto/KeyGenerator.java @@ -96,7 +96,8 @@ * following standard {@code KeyGenerator} algorithms with the keysizes in * parentheses: *