[Swift-commit] cog r3752
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Mon Jul 29 00:40:03 CDT 2013
------------------------------------------------------------------------
r3752 | hategan | 2013-07-29 00:35:50 -0500 (Mon, 29 Jul 2013) | 1 line
merged r3751 from trunk
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (revision 3751)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java (working copy)
@@ -12,7 +12,6 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.HashSet;
@@ -27,6 +26,7 @@
import org.globus.cog.abstraction.interfaces.ExecutionService;
import org.globus.cog.abstraction.interfaces.FileLocation;
import org.globus.cog.abstraction.interfaces.JobSpecification;
+import org.globus.cog.abstraction.interfaces.RemoteFile;
import org.globus.cog.abstraction.interfaces.Service;
import org.globus.cog.abstraction.interfaces.StagingSetEntry;
import org.globus.cog.abstraction.interfaces.StagingSetEntry.Mode;
@@ -178,16 +178,16 @@
private String absolutize(String file) throws IOException {
try {
- URL u = new URL(file);
+ RemoteFile u = new RemoteFile(file);
if (ABSOLUTIZE.contains(u.getProtocol())) {
return u.getProtocol() + "://" + u.getHost() +
- (u.getPort() != -1 ? ":" + u.getPort() : "") + "/" + new File(u.getPath().substring(1)).getAbsolutePath();
+ (u.getPort() != -1 ? ":" + u.getPort() : "") + "/" + new File(u.getPath()).getAbsolutePath();
}
else {
return file;
}
}
- catch (MalformedURLException e) {
+ catch (Exception e) {
throw new IOException("Invalid file specification: " + file);
}
}
More information about the Swift-commit
mailing list