On Tue, 9 Jan 2024 10:42:58 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
>> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java >> line 87: >> >>> 85: } >>> 86: if (cl.isEnum()) { >>> 87: commitEvent(cl, SUID_NAME + " in an enum class is not >>> effective"); >> >> Is there a best practice that can be included in the message? "SUID should >> not be declared"? > > Yes, that's perhaps clearer, will do. Typically in other places in the JDK we use `priviledgedXxx` for naming methods that are simple wrappers that call `xxx` from within a `doPrivileged`. The method is called privileged because it doesn't require the caller to use `doPrivileged`. That is something like: String privilegedGetProperty(String property) { return AccessController.doPrivileged((...) () -> System.getProperty(property)); } See for instance: https://github.com/openjdk/jdk/blob/ee98d262181f5822609674c71c85ad4576ac1632/src/java.base/share/classes/sun/security/action/GetPropertyAction.java#L107 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1446460008