diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java index 26f68dfee..0aafccbe2 100644 --- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java +++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java @@ -52,7 +52,8 @@ public class RuntimeConfigurable implements Serializable { private String elementTag = null; /** List of child element wrappers. */ - private List children = null; + // picking ArrayList rather than List as arrayList is Serializable + private ArrayList children = null; /** The element to configure. It is only used during * maybeConfigure. @@ -589,7 +590,7 @@ public class RuntimeConfigurable implements Serializable { // Children (this is a shadow of UnknownElement#children) if (r.children != null) { - List newChildren = new ArrayList(); + ArrayList newChildren = new ArrayList(); newChildren.addAll(r.children); if (children != null) { newChildren.addAll(children); diff --git a/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java b/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java index 21d48f204..291d494d7 100644 --- a/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java +++ b/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java @@ -28,8 +28,8 @@ import java.util.zip.ZipException; public class UnsupportedZipFeatureException extends ZipException { private final Feature reason; - private final ZipEntry entry; - private static final long serialVersionUID = 4430521921766595597L; + private transient final ZipEntry entry; + private static final long serialVersionUID = 20161221L; /** * Creates an exception. @@ -61,7 +61,7 @@ public class UnsupportedZipFeatureException extends ZipException { /** * ZIP Features that may or may not be supported. */ - public static class Feature { + public static class Feature implements java.io.Serializable { /** * The entry is encrypted. */ @@ -86,4 +86,4 @@ public class UnsupportedZipFeatureException extends ZipException { return name; } } -} \ No newline at end of file +}