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

8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml #5730

Closed
wants to merge 2 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
@@ -29,7 +29,9 @@
*/
public class TypeCheckError extends Exception {
static final long serialVersionUID = 3246224233917854640L;
@SuppressWarnings("serial") // Type of field is not Serializable
ErrorMsg _error = null;
@SuppressWarnings("serial") // Type of field is not Serializable
SyntaxTreeNode _node = null;

public TypeCheckError(SyntaxTreeNode node) {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -132,6 +132,7 @@
//

/** This can either be a String or the first child node. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected Object value = null;

/** Attribute name. */
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -507,6 +507,7 @@ class LEntry implements Serializable {

private static final long serialVersionUID = -8426757059492421631L;
String type;
@SuppressWarnings("serial") // Type of field is not Serializable
EventListener listener;
boolean useCapture;

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -79,6 +79,7 @@
protected final static short HASDEFAULTS = 0x1<<2;

/** Nodes. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected List<Node> nodes;

protected NodeImpl ownerNode; // the node this map belongs to
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -60,16 +60,19 @@ public PSVIAttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
}

/** attribute declaration */
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSAttributeDeclaration fDeclaration = null;

/** type of attribute, simpleType */
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSTypeDefinition fTypeDecl = null;

/** If this attribute was explicitly given a
* value in the original document, this is true; otherwise, it is false */
protected boolean fSpecified = true;

/** Schema value */
@SuppressWarnings("serial") // Type of field is not Serializable
protected ValidatedInfo fValue = new ValidatedInfo();

/** validation attempted: none, partial, full */
@@ -79,9 +82,11 @@ public PSVIAttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN;

/** error codes */
@SuppressWarnings("serial") // Type of field is not Serializable
protected StringList fErrorCodes = null;

/** error messages */
@SuppressWarnings("serial") // Type of field is not Serializable
protected StringList fErrorMessages = null;

/** validation context: could be QName or XPath expression*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -60,9 +60,11 @@ public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
}

/** element declaration */
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSElementDeclaration fDeclaration = null;

/** type of element, could be xsi:type */
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSTypeDefinition fTypeDecl = null;

/** true if clause 3.2 of Element Locally Valid (Element) (3.3.4)
@@ -75,9 +77,11 @@ public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
protected boolean fSpecified = true;

/** Schema value */
@SuppressWarnings("serial") // Type of field is not Serializable
protected ValidatedInfo fValue = new ValidatedInfo();

/** http://www.w3.org/TR/xmlschema-1/#e-notation*/
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSNotationDeclaration fNotation = null;

/** validation attempted: none, partial, full */
@@ -87,15 +91,18 @@ public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
protected short fValidity = ElementPSVI.VALIDITY_NOTKNOWN;

/** error codes */
@SuppressWarnings("serial") // Type of field is not Serializable
protected StringList fErrorCodes = null;

/** error messages */
@SuppressWarnings("serial") // Type of field is not Serializable
protected StringList fErrorMessages = null;

/** validation context: could be QName or XPath expression*/
protected String fValidationContext = null;

/** the schema information property */
@SuppressWarnings("serial") // Type of field is not Serializable
protected XSModel fSchemaInformation = null;

//
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1024,7 +1024,9 @@ class UserDataRecord implements Serializable {
/** Serialization version. */
private static final long serialVersionUID = 3258126977134310455L;

@SuppressWarnings("serial") // Type of field is not Serializable
Object fData;
@SuppressWarnings("serial") // Type of field is not Serializable
UserDataHandler fHandler;
UserDataRecord(Object data, UserDataHandler handler) {
fData = data;
@@ -45,6 +45,7 @@ public class MalformedByteSequenceException extends CharConversionException {
//

/** message formatter **/
@SuppressWarnings("serial") // Type of field is not Serializable
private MessageFormatter fFormatter;

/** locale for error message **/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -132,6 +132,7 @@ private static final class ComplexTypeRecoverableError extends Exception {
private static final long serialVersionUID = 6802729912091130335L;

Object[] errorSubstText=null;
@SuppressWarnings("serial") // Type of field is not Serializable
Element errorElem = null;
ComplexTypeRecoverableError() {
super();
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -43,6 +43,7 @@ public class ObjectPool implements java.io.Serializable

/** Stack of given objects this points to.
* @serial */
@SuppressWarnings("serial") // Type of field is not Serializable
private final List<Object> freeStack;

/**
@@ -41,6 +41,7 @@ public class SAXSourceLocator extends LocatorImpl
/** The SAX Locator object.
* @serial
*/
@SuppressWarnings("serial") // Type of field is not Serializable
Locator m_locator;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -52,6 +52,7 @@ public abstract class Expression implements java.io.Serializable, ExpressionNode
* messages. May be null.
* @serial
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private ExpressionNode m_parent;

/**
@@ -358,6 +358,7 @@ public DTM getDTM(int nodeHandle)
}

/* An instance of the DTMManager. */
@SuppressWarnings("serial") // Type of field is not Serializable
DTMManager m_manager;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,6 +39,7 @@ public class XPathException extends TransformerException

/** The home of the expression that caused the error.
* @serial */
@SuppressWarnings("serial") // Type of field is not Serializable
Object m_styleNode = null;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -463,6 +463,7 @@ public int getLastPos(XPathContext xctxt)
* from multiple documents.
* Never, ever, access this value without going through getDTM(int node).
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private DTM m_dtm;

/**
@@ -587,5 +588,6 @@ public boolean deepEquals(Expression expr)
protected int m_axis = -1;

/** The DTM inner traversal class, that corresponds to the super axis. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMAxisTraverser m_traverser;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,11 +37,13 @@ public final class IteratorPool implements java.io.Serializable
/**
* Type of objects in this pool.
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private final DTMIterator m_orig;

/**
* Stack of given objects this points to.
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private final List<DTMIterator> m_freeStack;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -978,6 +978,7 @@ public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
* clear that this is needed.
* @serial
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private PrefixResolver m_prefixResolver;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -52,6 +52,7 @@ public class MatchPatternIterator extends LocPathIterator
protected int m_superAxis = -1;

/** The DTM inner traversal class, that corresponds to the super axis. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMAxisTraverser m_traverser;

/** DEBUG flag for diagnostic dumps. */
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -58,6 +58,7 @@ public class NodeSequence extends XObject
* <p>
* Multiple NodeSequence objects may share the same cache.
*/
@SuppressWarnings("serial") // Type of field is not Serializable
private IteratorCache m_cache;

/**
@@ -128,6 +129,7 @@ private void markCacheComplete() {
/**
* The functional iterator that fetches nodes.
*/
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMIterator m_iter;

/**
@@ -152,6 +154,7 @@ public final DTMIterator getContainedIter()
* The DTMManager to use if we're using a NodeVector only.
* We may well want to do away with this, and store it in the NodeVector.
*/
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMManager m_dtmMgr;

// ==== Constructors ====
@@ -43,6 +43,7 @@ public class OneStepIterator extends ChildTestIterator
protected int m_axis = -1;

/** The DTM inner traversal class, that corresponds to the super axis. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMAxisIterator m_iterator;

/**
@@ -244,5 +244,6 @@ public boolean isDocOrdered()
}

/** The DTM inner traversal class, that corresponds to the super axis. */
@SuppressWarnings("serial") // Type of field is not Serializable
protected DTMAxisIterator m_iterator;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -64,13 +64,15 @@ public class FuncExtFunction extends Function
* order to allow caching of the method.
* @serial
*/
@SuppressWarnings("serial") // Type of field is not Serializable
Object m_methodKey;

/**
* Array of static expressions which represent the parameters to the
* function.
* @serial
*/
@SuppressWarnings("serial") // Type of field is not Serializable
List<Expression> m_argVec = new ArrayList<>();

/**
@@ -36,6 +36,7 @@
public class XNodeSetForDOM extends XNodeSet
{
static final long serialVersionUID = -8396190713754624640L;
@SuppressWarnings("serial") // Type of field is not Serializable
Object m_origObj;

public XNodeSetForDOM(Node node, DTMManager dtmMgr)