# HG changeset patch # User darcy # Date 1569471998 25200 # Node ID e23e560afbcbe6f461c152a850ab7bc36b46edc2 # Parent 894a3d15c3449b152e12fce60e20ba6d0712cf1f 8231414: Mark various instance fields of javac internal types as transient Reviewed-by: jjg diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Wed Sep 25 21:26:38 2019 -0700 @@ -112,7 +112,7 @@ } final String code; - final Object[] args; + final transient Object[] args; } /** diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java Wed Sep 25 21:26:38 2019 -0700 @@ -2345,14 +2345,14 @@ public static class CompletionFailure extends RuntimeException { private static final long serialVersionUID = 0; - public final DeferredCompletionFailureHandler dcfh; - public Symbol sym; + public final transient DeferredCompletionFailureHandler dcfh; + public transient Symbol sym; /** A diagnostic object describing the failure */ - private JCDiagnostic diag; + private transient JCDiagnostic diag; - private Supplier diagSupplier; + private transient Supplier diagSupplier; public CompletionFailure(Symbol sym, Supplier diagSupplier, DeferredCompletionFailureHandler dcfh) { this.dcfh = dcfh; diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Wed Sep 25 21:26:38 2019 -0700 @@ -639,7 +639,7 @@ public static class FunctionDescriptorLookupError extends RuntimeException { private static final long serialVersionUID = 0; - JCDiagnostic diagnostic; + transient JCDiagnostic diagnostic; FunctionDescriptorLookupError() { this.diagnostic = null; @@ -5002,7 +5002,7 @@ public static class InvalidSignatureException extends RuntimeException { private static final long serialVersionUID = 0; - private final Type type; + private final transient Type type; InvalidSignatureException(Type type) { this.type = type; diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Wed Sep 25 21:26:38 2019 -0700 @@ -443,7 +443,7 @@ private static class BreakAttr extends RuntimeException { static final long serialVersionUID = -6924771130405446405L; - private Env env; + private transient Env env; private BreakAttr(Env env) { this.env = env; } diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java Wed Sep 25 21:26:38 2019 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -77,7 +77,7 @@ private static final long serialVersionUID = 1812267524140424433L; - protected Context context; + protected transient Context context; public CompileStates(Context context) { this.context = context; diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Wed Sep 25 21:26:38 2019 -0700 @@ -137,7 +137,7 @@ public static class InferenceException extends InapplicableMethodException { private static final long serialVersionUID = 0; - List messages = List.nil(); + transient List messages = List.nil(); InferenceException() { super(null); @@ -1321,7 +1321,7 @@ public static class NodeNotFoundException extends RuntimeException { private static final long serialVersionUID = 0; - InferenceGraph graph; + transient InferenceGraph graph; public NodeNotFoundException(InferenceGraph graph) { this.graph = graph; diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Sep 25 21:26:38 2019 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -1387,7 +1387,7 @@ public static class InapplicableMethodException extends RuntimeException { private static final long serialVersionUID = 0; - JCDiagnostic diagnostic; + transient JCDiagnostic diagnostic; InapplicableMethodException(JCDiagnostic diag) { this.diagnostic = diag; diff -r 894a3d15c344 -r e23e560afbcb src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java Thu Sep 26 04:20:19 2019 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java Wed Sep 25 21:26:38 2019 -0700 @@ -280,7 +280,7 @@ private static final long serialVersionUID = 0; private boolean expandJarClassPaths = false; - private final Set canonicalValues = new HashSet<>(); + private final transient Set canonicalValues = new HashSet<>(); public SearchPath expandJarClassPaths(boolean x) { expandJarClassPaths = x; @@ -290,7 +290,7 @@ /** * What to use when path element is the empty string */ - private Path emptyPathDefault = null; + private transient Path emptyPathDefault = null; public SearchPath emptyPathDefault(Path x) { emptyPathDefault = x;