commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [68/77] [abbrv] commons-collections git commit: finish extraction of abstract class
Date Tue, 11 Jul 2017 17:55:53 GMT
finish extraction of abstract class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/branches/collections_jdk5_branch@814061
13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/collections_jdk5_branch
Commit: c673ab5f4e38463fe210eb141678206904f39505
Parents: bb91d00
Author: Matthew Jason Benson <mbenson@apache.org>
Authored: Fri Sep 11 22:22:41 2009 +0000
Committer: Matthew Jason Benson <mbenson@apache.org>
Committed: Fri Sep 11 22:22:41 2009 +0000

----------------------------------------------------------------------
 .../commons/collections/splitmap/TransformedMap.java   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/c673ab5f/src/java/org/apache/commons/collections/splitmap/TransformedMap.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/splitmap/TransformedMap.java b/src/java/org/apache/commons/collections/splitmap/TransformedMap.java
index 88e309c..67a515f 100644
--- a/src/java/org/apache/commons/collections/splitmap/TransformedMap.java
+++ b/src/java/org/apache/commons/collections/splitmap/TransformedMap.java
@@ -66,8 +66,6 @@ public class TransformedMap<J, K, U, V> extends AbstractIterableGetMapDecorator<
     /** Serialization version */
     private static final long serialVersionUID = 5966875321133456994L;
 
-    /** The decorated map */
-    private Map<K, V> decorated;
     /** The transformer to use for the key */
     private final Transformer<? super J, ? extends K> keyTransformer;
     /** The transformer to use for the value */
@@ -128,7 +126,7 @@ public class TransformedMap<J, K, U, V> extends AbstractIterableGetMapDecorator<
      */
     private void writeObject(ObjectOutputStream out) throws IOException {
         out.defaultWriteObject();
-        out.writeObject(decorated);
+        out.writeObject(decorated());
     }
 
     /**
@@ -142,7 +140,7 @@ public class TransformedMap<J, K, U, V> extends AbstractIterableGetMapDecorator<
     @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
         in.defaultReadObject();
-        decorated = (Map) in.readObject();
+        map = (Map) in.readObject();
     }
 
     //-----------------------------------------------------------------------
@@ -216,5 +214,10 @@ public class TransformedMap<J, K, U, V> extends AbstractIterableGetMapDecorator<
         decorated().putAll(transformMap(mapToCopy));
     }
 
-
+    /**
+     * {@inheritDoc}
+     */
+    public void clear() {
+        decorated().clear();
+    }
 }


Mime
View raw message