You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2005/12/18 20:05:38 UTC
svn commit: r357494 - in /jakarta/commons/proper/collections/trunk:
project.xml src/java/org/apache/commons/collections/DefaultMapBag.java
src/java/org/apache/commons/collections/MapUtils.java
src/java/org/apache/commons/collections/set/MapBackedSet.java
Author: scolebourne
Date: Sun Dec 18 11:05:31 2005
New Revision: 357494
URL: http://svn.apache.org/viewcvs?rev=357494&view=rev
Log:
Minor fixes of unecessary casts/imports
bug 37915, from Nathan Beyer
Modified:
jakarta/commons/proper/collections/trunk/project.xml
jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/DefaultMapBag.java
jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java
jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/MapBackedSet.java
Modified: jakarta/commons/proper/collections/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/project.xml?rev=357494&r1=357493&r2=357494&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/project.xml (original)
+++ jakarta/commons/proper/collections/trunk/project.xml Sun Dec 18 11:05:31 2005
@@ -194,6 +194,9 @@
<name>Christopher Berry</name>
</contributor>
<contributor>
+ <name>Nathan Beyer</name>
+ </contributor>
+ <contributor>
<name>Janek Bogucki</name>
</contributor>
<contributor>
Modified: jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/DefaultMapBag.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/DefaultMapBag.java?rev=357494&r1=357493&r2=357494&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/DefaultMapBag.java (original)
+++ jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/DefaultMapBag.java Sun Dec 18 11:05:31 2005
@@ -181,7 +181,7 @@
return false;
}
for (Iterator it = _map.keySet().iterator(); it.hasNext();) {
- Object element = (Object) it.next();
+ Object element = it.next();
if (other.getCount(element) != getCount(element)) {
return false;
}
Modified: jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java?rev=357494&r1=357493&r2=357494&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java (original)
+++ jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MapUtils.java Sun Dec 18 11:05:31 2005
@@ -18,7 +18,6 @@
import java.io.PrintStream;
import java.text.NumberFormat;
import java.text.ParseException;
-import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -34,6 +33,7 @@
import org.apache.commons.collections.map.LazyMap;
import org.apache.commons.collections.map.LazySortedMap;
import org.apache.commons.collections.map.ListOrderedMap;
+import org.apache.commons.collections.map.MultiValueMap;
import org.apache.commons.collections.map.PredicatedMap;
import org.apache.commons.collections.map.PredicatedSortedMap;
import org.apache.commons.collections.map.TransformedMap;
@@ -42,7 +42,6 @@
import org.apache.commons.collections.map.TypedSortedMap;
import org.apache.commons.collections.map.UnmodifiableMap;
import org.apache.commons.collections.map.UnmodifiableSortedMap;
-import org.apache.commons.collections.map.MultiValueMap;
/**
* Provides utility methods and decorators for
@@ -1065,8 +1064,7 @@
* If the input map had multiple entries with the same value mapped to
* different keys, the returned map will map one of those keys to the
* value, but the exact key which will be mapped is undefined.
- *
- * @see DoubleOrderedMap
+ *
* @param map the map to invert, may not be null
* @return a new HashMap containing the inverted data
* @throws NullPointerException if the map is null
Modified: jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/MapBackedSet.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/MapBackedSet.java?rev=357494&r1=357493&r2=357494&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/MapBackedSet.java (original)
+++ jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/set/MapBackedSet.java Sun Dec 18 11:05:31 2005
@@ -114,7 +114,7 @@
public boolean addAll(Collection coll) {
int size = map.size();
for (Iterator it = coll.iterator(); it.hasNext();) {
- Object obj = (Object) it.next();
+ Object obj = it.next();
map.put(obj, dummyValue);
}
return (map.size() != size);
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org