8058304: Non-serializable fields in serializable classes
Reviewed-by: lagergren, sundar
This commit is contained in:
parent
1e000f777d
commit
9afdb7964c
@ -54,6 +54,7 @@ import static jdk.nashorn.internal.parser.TokenType.SEMICOLON;
|
||||
import static jdk.nashorn.internal.parser.TokenType.TERNARY;
|
||||
import static jdk.nashorn.internal.parser.TokenType.WHILE;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -2977,11 +2978,13 @@ loop:
|
||||
* Encapsulates part of the state of the parser, enough to reconstruct the state of both parser and lexer
|
||||
* for resuming parsing after skipping a function body.
|
||||
*/
|
||||
private static class ParserState {
|
||||
private static class ParserState implements Serializable {
|
||||
private final int position;
|
||||
private final int line;
|
||||
private final int linePosition;
|
||||
|
||||
private static final long serialVersionUID = -2382565130754093694L;
|
||||
|
||||
ParserState(final int position, final int line, final int linePosition) {
|
||||
this.position = position;
|
||||
this.line = line;
|
||||
|
@ -119,7 +119,7 @@ public class AccessorProperty extends Property {
|
||||
* produce different boun method handles wrapping the same access mechanism
|
||||
* depending on callsite
|
||||
*/
|
||||
private MethodHandle[] GETTER_CACHE = new MethodHandle[NOOF_TYPES];
|
||||
private transient MethodHandle[] GETTER_CACHE = new MethodHandle[NOOF_TYPES];
|
||||
|
||||
/**
|
||||
* Create a new accessor property. Factory method used by nasgen generated code.
|
||||
|
@ -101,7 +101,7 @@ public abstract class Property implements Serializable {
|
||||
private final int slot;
|
||||
|
||||
/** SwitchPoint that is invalidated when property is changed, optional */
|
||||
protected SwitchPoint changeCallback;
|
||||
protected transient SwitchPoint changeCallback;
|
||||
|
||||
private static final long serialVersionUID = 2099814273074501176L;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user