peterreilly 2003/08/13 07:22:29
Modified: src/main/org/apache/tools/ant/types XMLCatalog.java
src/main/org/apache/tools/ant/util CollectionUtils.java
Log:
some 1.1 isms
PR: 22326
Obtained from: Martijn Kruithof
Revision Changes Path
1.31 +1 -4 ant/src/main/org/apache/tools/ant/types/XMLCatalog.java
Index: XMLCatalog.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/XMLCatalog.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- XMLCatalog.java 6 Aug 2003 14:35:03 -0000 1.30
+++ XMLCatalog.java 13 Aug 2003 14:22:29 -0000 1.31
@@ -58,7 +58,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -711,8 +710,6 @@
source.setSystemId(sysid);
log("catalog entry matched a readable file: '"
+ sysid + "'", Project.MSG_DEBUG);
- } catch (FileNotFoundException ex) {
- // ignore
} catch (IOException ex) {
// ignore
}
1.10 +9 -19
ant/src/main/org/apache/tools/ant/util/CollectionUtils.java
Index: CollectionUtils.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/util/CollectionUtils.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CollectionUtils.java 19 Jul 2003 08:11:08 -0000 1.9
+++ CollectionUtils.java 13 Aug 2003 14:22:29 -0000 1.10
@@ -63,15 +63,17 @@
*
* @author Stefan Bodewig
* @author <a href="mailto:[EMAIL PROTECTED]">Ingmar Stein</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Martijn Kruithof</a>
*
* @since Ant 1.5
*/
public class CollectionUtils {
/**
- * Vector.equals() doesn't do any good in 1.1
+ * Please use Vector.equals() or List.equals()
*
* @since Ant 1.5
+ * @deprecated
*/
public static boolean equals(Vector v1, Vector v2) {
if (v1 == v2) {
@@ -82,30 +84,17 @@
return false;
}
- if (v1.size() != v2.size()) {
- return false;
- }
-
- Enumeration e1 = v1.elements();
- Enumeration e2 = v2.elements();
- while (e1.hasMoreElements()) {
- if (!e1.nextElement().equals(e2.nextElement())) {
- return false;
- }
- }
-
- // don't need to check e2.hasMoreElements as the Vectors have
- // same size.
-
- return true;
+ return v1.equals(v2);
}
/**
- * Hashtable.equals() doesn't do any good in 1.1.
+ * Dictionary does not have an equals.
+ * Please use Map.equals()
*
* <p>Follows the equals contract of Java 2's Map.</p>
*
* @since Ant 1.5
+ * @deprecated
*/
public static boolean equals(Dictionary d1, Dictionary d2) {
if (d1 == d2) {
@@ -137,9 +126,10 @@
}
/**
- * JDK 1.1 does not know the putAll method for hash tables.
+ * Dictionary does not know the putAll method. Please use Map.putAll().
*
* @since Ant 1.6
+ * @deprecated
*/
public static void putAll(Dictionary m1, Dictionary m2) {
for (Enumeration it = m2.keys(); it.hasMoreElements();) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]