JDK 14 RFR of JDK-8232448: Suppress warnings on non-serializable non-transient instance fields in jdk.jdi
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Thu Oct 17 07:31:19 UTC 2019
Hi Joe,
Looks good.
Thanks,
Serguei
On 10/16/19 23:15, Joe Darcy wrote:
> Hello,
>
> Please review a serial warning update of three exceptions types in the
> jdk.jdi module.
>
> JDK-8232448: Suppress warnings on non-serializable non-transient
> instance fields in jdk.jdi
> http://cr.openjdk.java.net/~darcy/8232448.0/
>
> These exception classes are generally not written to explicitly
> content with the possible complications of serialization.
>
> Patch below.
>
> Thanks,
>
> -Joe
>
> diff -r 4113f16d5109
> src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java
> --- a/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java
> Wed Oct 16 18:47:11 2019 -0700
> +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java
> Wed Oct 16 23:04:26 2019 -0700
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights
> reserved.
> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> *
> * This code is free software; you can redistribute it and/or modify it
> @@ -36,6 +36,7 @@
>
> private static final long serialVersionUID = 6066780907971918568L;
>
> + @SuppressWarnings("serial") // Not statically typed as Serializable
> ObjectReference exception;
>
> public InvocationException(ObjectReference exception) {
> diff -r 4113f16d5109
> src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
> ---
> a/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
> Wed Oct 16 18:47:11 2019 -0700
> +++
> b/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
> Wed Oct 16 23:04:26 2019 -0700
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights
> reserved.
> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> *
> * This code is free software; you can redistribute it and/or modify it
> @@ -40,6 +40,7 @@
>
> private static final long serialVersionUID = -3042212603611350941L;
>
> + @SuppressWarnings("serial") // Conditionally serializable
> List<String> names;
>
> /**
> diff -r 4113f16d5109
> src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java
> ---
> a/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java
> Wed Oct 16 18:47:11 2019 -0700
> +++
> b/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java
> Wed Oct 16 23:04:26 2019 -0700
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights
> reserved.
> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> *
> * This code is free software; you can redistribute it and/or modify it
> @@ -38,6 +38,7 @@
>
> private static final long serialVersionUID = 6408644824640801020L;
>
> + @SuppressWarnings("serial") // Not statically typed as Serializable
> Process process;
>
> public VMStartException(Process process) {
>
More information about the serviceability-dev
mailing list