8274405: Suppress warnings on non-serializable non-transient instance fields in javac and javadoc
Reviewed-by: prappo, jjg
This commit is contained in:
parent
79cebe2c1b
commit
97385d4f16
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2021, 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,6 +64,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
class Result extends Error {
|
||||
static final long serialVersionUID = -5942088234594905625L;
|
||||
@SuppressWarnings("serial") // Type of field is not Serializable
|
||||
DocTreePath path;
|
||||
Result(DocTreePath path) {
|
||||
this.path = path;
|
||||
|
@ -63,6 +63,7 @@ public class TreePath implements Iterable<Tree> {
|
||||
|
||||
class Result extends Error {
|
||||
static final long serialVersionUID = -5942088234594905625L;
|
||||
@SuppressWarnings("serial") // Type of field is not Serializable
|
||||
TreePath path;
|
||||
Result(TreePath path) {
|
||||
this.path = path;
|
||||
|
@ -805,6 +805,7 @@ public class TreeInfo {
|
||||
public static List<JCTree> pathFor(final JCTree node, final JCCompilationUnit unit) {
|
||||
class Result extends Error {
|
||||
static final long serialVersionUID = -5942088234594905625L;
|
||||
@SuppressWarnings("serial") // List not statically Serilizable
|
||||
List<JCTree> path;
|
||||
Result(List<JCTree> path) {
|
||||
this.path = path;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, 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
|
||||
@ -49,6 +49,7 @@ import javax.lang.model.element.Modifier;
|
||||
import com.sun.tools.javac.util.Assert;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class PubApi implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5926627347801986850L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2021, 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
|
||||
@ -29,6 +29,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class PubApiTypeParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8899204612014329162L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,6 +32,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.lang.model.element.Modifier;
|
||||
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class PubMethod implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7813050194553446243L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, 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
|
||||
@ -30,6 +30,7 @@ import java.util.Set;
|
||||
|
||||
import javax.lang.model.element.Modifier;
|
||||
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class PubType implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7423416049253889793L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,6 +31,7 @@ import java.util.Set;
|
||||
|
||||
import javax.lang.model.element.Modifier;
|
||||
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class PubVar implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5806536061153374575L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, 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 @@ import com.sun.tools.sjavac.pubapi.PubApi;
|
||||
* This code and its internal interfaces are subject to change or
|
||||
* deletion without notice.</b>
|
||||
*/
|
||||
@SuppressWarnings("serial") // Types of instance fields are not Serializable
|
||||
public class CompilationSubResult implements Serializable {
|
||||
|
||||
static final long serialVersionUID = 46739181113L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2021, 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
|
||||
@ -57,6 +57,7 @@ public class DocFileIOException extends DocletException {
|
||||
/**
|
||||
* The file that was in use when the exception occurred.
|
||||
*/
|
||||
@SuppressWarnings("serial") // Type of field is not Serializable
|
||||
public final DocFile fileName;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2021, 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
|
||||
@ -46,6 +46,7 @@ public class ResourceIOException extends DocletException {
|
||||
/**
|
||||
* The resource that was in use when the exception occurred.
|
||||
*/
|
||||
@SuppressWarnings("serial") // Type of field is not Serializable
|
||||
public final DocPath resource;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,6 +43,7 @@ class OptionException extends Exception {
|
||||
|
||||
public final Result result;
|
||||
public final String message;
|
||||
@SuppressWarnings("serial") // Type of field is not Serializable
|
||||
public final Runnable m;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user