You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by bf...@apache.org on 2014/05/15 05:04:54 UTC

svn commit: r1594759 - in /oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull: filerestrictions/parsers/GenericEmailParser.java retrievalsystem/RetrievalSetup.java

Author: bfoster
Date: Thu May 15 03:04:54 2014
New Revision: 1594759

URL: http://svn.apache.org/r1594759
Log:
- Updates to delete on success
- Whitespace cleanup

--------
OODT-683

Modified:
    oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/GenericEmailParser.java
    oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java

Modified: oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/GenericEmailParser.java
URL: http://svn.apache.org/viewvc/oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/GenericEmailParser.java?rev=1594759&r1=1594758&r2=1594759&view=diff
==============================================================================
--- oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/GenericEmailParser.java (original)
+++ oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/GenericEmailParser.java Thu May 15 03:04:54 2014
@@ -65,7 +65,7 @@ public class GenericEmailParser implemen
   public GenericEmailParser(String filePattern, String checkForPattern, String pathToRoot) {
     this.filePattern = filePattern;
     this.checkForPattern = checkForPattern;
-    this.pathToRoot = pathToRoot;
+    this.pathToRoot = Strings.nullToEmpty(pathToRoot);
   }
 
   @Override

Modified: oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java
URL: http://svn.apache.org/viewvc/oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java?rev=1594759&r1=1594758&r2=1594759&view=diff
==============================================================================
--- oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java (original)
+++ oodt/trunk/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java Thu May 15 03:04:54 2014
@@ -244,17 +244,19 @@ public class RetrievalSetup {
 
     private void movePropsFileToFinalDestination(PropFilesInfo pfi,
             File dirstructFile, String errorMsgs) throws IOException {
+        File metFile = new File(
+            String.format("%s.%s", dirstructFile.getAbsolutePath(), config.getMetFileExtension()));
         if (pfi.getDeleteOnSuccess() && errorMsgs == null) {
             dirstructFile.delete();
+            metFile.delete();
             return;
         }
         File moveToDir = pfi.getFinalDestination(errorMsgs == null);
         moveToDir.mkdirs();
         File newLoc = new File(moveToDir, dirstructFile.getName());
         dirstructFile.renameTo(newLoc);
-        new File(dirstructFile.getAbsolutePath() + "." + config.getMetFileExtension())
-                .renameTo(new File(newLoc.getAbsolutePath() + "."
-                		+ config.getMetFileExtension()));
+        metFile.renameTo(new File(
+            String.format("%s.%s", newLoc.getAbsolutePath(), config.getMetFileExtension())));
         if (errorMsgs != null) {
             File errorFile = new File(newLoc.getParentFile(), dirstructFile
                     .getName()