Remove.java-Replace the type specification in this constructor call with the diamond...
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / batch / update / Remove.java
index 087ab95..7c516b1 100644 (file)
@@ -94,7 +94,14 @@ public class Remove extends Batch {
                 remove.add(new File(logDir, args()[i]));
             }
         } else {
-            remove.add(new File(logDir,"Delete"+Chrono.dateOnlyStamp()+".csv"));
+               final String ending = Chrono.dateOnlyStamp()+".csv";
+               for (File file : logDir.listFiles(f -> {
+                               String name = f.getName();
+                                       return name.endsWith(ending) && (
+                                                       name.startsWith("Delete") || name.startsWith("Clean."));
+                               }))  {
+                       remove.add(file);
+               };
         }
 
         for(File f : remove) {
@@ -104,7 +111,7 @@ public class Remove extends Batch {
         final Holder<Boolean> ur = new Holder<>(false);
         final Holder<Boolean> cred = new Holder<>(false);
         final Holder<Boolean> x509 = new Holder<>(false);
-        final Holder<String> memoFmt = new Holder<String>("");
+        final Holder<String> memoFmt = new Holder<>("");
         final HistoryDAO.Data hdd = new HistoryDAO.Data();
         final String orgName = trans.org().getName();