tenthe commented on code in PR #2430:
URL: https://github.com/apache/streampipes/pull/2430#discussion_r1471640401


##########
streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/file/FileHandler.java:
##########
@@ -39,6 +40,16 @@ public File getFile(String filename) {
     return FileUtils.getFile(makeFile(filename));
   }
 
+  public void renameFile(String oldFilename, String newFilename) {
+    try {
+      var fileInputStream = new FileInputStream(getFile(oldFilename));
+      deleteFile(oldFilename);
+      storeFile(newFilename, fileInputStream);
+    } catch (Exception e) {
+      System.out.println(e.getMessage());

Review Comment:
   Please use a logger instead. Can we change the generic Exception with the 
specific exceptions that can be thrown?



##########
streampipes-model/src/main/java/org/apache/streampipes/model/file/FileMetadata.java:
##########
@@ -28,15 +28,16 @@ public class FileMetadata {
 
   private @SerializedName("_rev") String rev;
 
-  private String internalFilename;
-  private String originalFilename;
+  private String filename;
   private String filetype;
 
   private long createdAt;
   private long lastModified;
 
   private String createdByUser;
 
+  public String test;

Review Comment:
   Can this variable be deleted?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to