This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

HashSet.clone


It is illegal to try and catch an exception that can never be thrown
from within a try block. GCJ doesn't actually detect this, but other
Java compilers complain about it, so we need to make this fix in order
to resync with classpath.


regards

  [ bryce ]


Index: HashSet.java
===================================================================
RCS file: /cvs/gcc/egcs/libjava/java/util/HashSet.java,v
retrieving revision 1.2
diff -u -r1.2 HashSet.java
--- HashSet.java        2001/02/14 04:44:21     1.2
+++ HashSet.java        2001/02/15 05:09:30
@@ -129,14 +129,7 @@
   public Object clone()
   {
     HashSet copy = new HashSet();
-    try
-      {
-       copy.map = (HashMap) map.clone();
-      }
-    catch (CloneNotSupportedException ex)
-      {
-      }
-
+    copy.map = (HashMap) map.clone();
     return copy;
   }




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]