ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r993294 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: CachedIvy.java retrieve/StandaloneRetrieveSerializer.java
Date Tue, 07 Sep 2010 09:08:15 GMT
Author: hibou
Date: Tue Sep  7 09:08:14 2010
New Revision: 993294

URL: http://svn.apache.org/viewvc?rev=993294&view=rev
Log:
Stick to java 1.4 API

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java?rev=993294&r1=993293&r2=993294&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
Tue Sep  7 09:08:14 2010
@@ -23,6 +23,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.text.ParseException;
@@ -164,7 +165,7 @@ public abstract class CachedIvy {
             // first try the standard way
             File file;
             try {
-                file = new File(url.toURI());
+                file = new File(new URI(url.toString()));
             } catch (URISyntaxException e) {
                 // probably a badly constructed url: "file://" + filename
                 file = new File(url.getPath());

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java?rev=993294&r1=993293&r2=993294&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java
Tue Sep  7 09:08:14 2010
@@ -124,7 +124,9 @@ public class StandaloneRetrieveSerialize
             if (e.getException() instanceof IOException) {
                 throw (IOException) e.getException();
             }
-            throw new IOException(e.getMessage(), e);
+            IOException ioe = new IOException(e.getMessage());
+            ioe.initCause(e);
+            throw ioe;
         }
     }
 
@@ -227,11 +229,13 @@ public class StandaloneRetrieveSerialize
             Throwable t = e.getCause();
             if (t instanceof IOException) {
                 throw (IOException) t;
-            } else if (t != null) {
-                throw new IOException(t.getMessage(), t);
-            } else {
-                throw new IOException(e.getMessage(), e);
             }
+            if (t == null) {
+                t = e;
+            }
+            IOException ioe = new IOException(t.getMessage());
+            ioe.initCause(t);
+            throw ioe;
         }
 
     }



Mime
View raw message