Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274405: Suppress warnings on non-serializable non-transient instance fields in javac and javadoc #5728

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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 static DocTreePath getPath(DocTreePath path, DocTree target) {

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 static TreePath getPath(TreePath path, Tree target) {

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 static Env<AttrContext> scopeFor(List<JCTree> path) {
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 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.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 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 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 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 @@
* 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 enum Mode {
/**
* 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;

/**