You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2016/12/21 15:58:05 UTC

[09/11] ant git commit: fix Serializable classes that were in fact not Serializable

fix Serializable classes that were in fact not Serializable


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/60162945
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/60162945
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/60162945

Branch: refs/heads/1.9.x
Commit: 60162945ddae9876f4436094a63487b11b6deee4
Parents: 8e56f57
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Dec 21 16:08:28 2016 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Dec 21 16:08:28 2016 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/RuntimeConfigurable.java       | 5 +++--
 .../org/apache/tools/zip/UnsupportedZipFeatureException.java | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/60162945/src/main/org/apache/tools/ant/RuntimeConfigurable.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java
index 26f68df..0aafccb 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<RuntimeConfigurable> children = null;
+    // picking ArrayList rather than List as arrayList is Serializable
+    private ArrayList<RuntimeConfigurable> 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<RuntimeConfigurable> newChildren = new ArrayList<RuntimeConfigurable>();
+            ArrayList<RuntimeConfigurable> newChildren = new ArrayList<RuntimeConfigurable>();
             newChildren.addAll(r.children);
             if (children != null) {
                 newChildren.addAll(children);

http://git-wip-us.apache.org/repos/asf/ant/blob/60162945/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java b/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java
index 21d48f2..291d494 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
+}