Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8244342: Compilation warnings about unexpected serialization related …
Browse files Browse the repository at this point in the history
…method signatures

Reviewed-by: lancea, naoto, rriggs
  • Loading branch information
JoeWang-Java committed May 18, 2020
1 parent fd28aad commit 3eaf944
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 50 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -68,7 +68,7 @@
* @author G. Todd Millerj
* @author Jochen Cordes <Jochen.Cordes@t-online.de>
* @author Santiago Pericas-Geertsen
* @LastModified: Nov 2017
* @LastModified: May 2020
*/
public final class TemplatesImpl implements Templates, Serializable {
static final long serialVersionUID = 673094361519270707L;
Expand Down Expand Up @@ -295,7 +295,7 @@ private void readObject(ObjectInputStream is)
* then we want it to get serialized
*/
private void writeObject(ObjectOutputStream os)
throws IOException, ClassNotFoundException {
throws IOException {
if (_auxClasses != null) {
//throw with the same message as when Hashtable was used for compatibility.
throw new NotSerializableException(
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -98,7 +98,7 @@
* @author Kohsuke Kawaguchi
* @author Joseph Fialli
* @see XMLGregorianCalendar#add(Duration)
* @LastModified: June 2018
* @LastModified: May 2020
*/
class DurationImpl
extends Duration
Expand Down Expand Up @@ -1857,7 +1857,7 @@ private static long getCalendarTimeInMillis(Calendar cal) {
* An object that encapsulates the string
* returned by <code>this.toString()</code>.
*/
private Object writeReplace() throws IOException {
private Object writeReplace() {
return new DurationStream(this.toString());
}

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -45,7 +45,7 @@
* the case where the LocPathIterator is "owned" by a UnionPathIterator,
* in which case the UnionPathIterator will cache the nodes.</p>
* @xsl.usage advanced
* @LastModified: Nov 2017
* @LastModified: May 2020
*/
public abstract class LocPathIterator extends PredicatedNodeTest
implements Cloneable, DTMIterator, java.io.Serializable, PathComponent
Expand Down Expand Up @@ -134,17 +134,10 @@ public int getAnalysisBits()
* @throws javax.xml.transform.TransformerException
*/
private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException, javax.xml.transform.TransformerException
throws java.io.IOException, ClassNotFoundException
{
try
{
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}
catch (ClassNotFoundException cnfe)
{
throw new javax.xml.transform.TransformerException(cnfe);
}
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -34,7 +34,7 @@
import java.util.List;

/**
* @LastModified: Oct 2017
* @LastModified: May 2020
*/
public abstract class PredicatedNodeTest extends NodeTest implements SubContextList
{
Expand Down Expand Up @@ -67,26 +67,19 @@ public abstract class PredicatedNodeTest extends NodeTest implements SubContextL
* @throws javax.xml.transform.TransformerException
*/
private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException, javax.xml.transform.TransformerException
throws java.io.IOException, ClassNotFoundException
{
try
{
stream.defaultReadObject();
m_predicateIndex = -1;
stream.defaultReadObject();
m_predicateIndex = -1;

/**
* Initialize to the declared value.
* As noted at declaration, this variable is used only for clones for getLastPos,
* it should have been excluded from serialization. For compatibility, we'll
* keep it as is but initializing to the declared value.
*/
m_predCount = -1;
resetProximityPositions();
}
catch (ClassNotFoundException cnfe)
{
throw new javax.xml.transform.TransformerException(cnfe);
}
/**
* Initialize to the declared value.
* As noted at declaration, this variable is used only for clones for getLastPos,
* it should have been excluded from serialization. For compatibility, we'll
* keep it as is but initializing to the declared value.
*/
m_predCount = -1;
resetProximityPositions();
}

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -39,7 +39,7 @@
* As each node is iterated via nextNode(), the node is also stored
* in the NodeVector, so that previousNode() can easily be done.
* @xsl.usage advanced
* @LastModified: Oct 2017
* @LastModified: May 2020
*/
public class UnionPathIterator extends LocPathIterator
implements Cloneable, DTMIterator, java.io.Serializable, PathComponent
Expand Down Expand Up @@ -258,17 +258,10 @@ public int getAnalysisBits()
* @throws javax.xml.transform.TransformerException
*/
private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException, javax.xml.transform.TransformerException
throws java.io.IOException, ClassNotFoundException
{
try
{
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}
catch (ClassNotFoundException cnfe)
{
throw new javax.xml.transform.TransformerException(cnfe);
}
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}

/**
Expand Down

0 comments on commit 3eaf944

Please sign in to comment.