Browse Source

fix Serializable classes that were in fact not Serializable

master
Stefan Bodewig 8 years ago
parent
commit
60162945dd
2 changed files with 7 additions and 6 deletions
  1. +3
    -2
      src/main/org/apache/tools/ant/RuntimeConfigurable.java
  2. +4
    -4
      src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java

+ 3
- 2
src/main/org/apache/tools/ant/RuntimeConfigurable.java View File

@@ -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);


+ 4
- 4
src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java View File

@@ -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;
}
}
}
}

Loading…
Cancel
Save