Author: bfoster
Date: Fri May 16 05:23:03 2014
New Revision: 1595107
URL: http://svn.apache.org/r1595107
Log:
- cleanups
Modified:
oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
Modified:
oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
URL:
http://svn.apache.org/viewvc/oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java?rev=1595107&r1=1595106&r2=1595107&view=diff
==============================================================================
---
oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
(original)
+++
oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
Fri May 16 05:23:03 2014
@@ -246,8 +246,8 @@ public class ProtocolHandler {
boolean delete) throws RemoteConnectionException {
// rename file for download
- File downloadFile = new File(toFile.getParent() + "/Downloading_"
- + toFile.getName());
+ File downloadFile = new File(
+ String.format("%s/Downloading_%s", toFile.getParent(),
toFile.getName()));
toFile.renameTo(downloadFile);
LOG.log(Level.INFO, "Starting to download " + fromFile);
@@ -415,7 +415,7 @@ public class ProtocolHandler {
return false;
}
} catch (Exception e) {
- e.printStackTrace();
+ LOG.log(Level.SEVERE, "Failed to delete file", e);
return false;
}
}