gnodet-bot commented on code in PR #30282:
URL: https://github.com/apache/camel/pull/30282#discussion_r4600788246


##########
core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java:
##########
@@ -229,8 +276,25 @@ public File getFileStore() {
         return fileStore;
     }
 
+    /**
+     * Sets the file of the repository (incl directory).
+     */
     public void setFileStore(File fileStore) {
         this.fileStore = fileStore;
+        this.fileName = fileStore != null ? fileStore.getPath() : null;
+    }
+
+    public String getFileName() {
+        return fileName;

Review Comment:
   Missing Javadoc. Add a `@return` description — something like:
   
   ```suggestion
       /**
        * Returns the file name of the repository (incl directory), or {@code 
null} if not set.
        */
       public String getFileName() {
   ```



##########
core/camel-support/src/main/java/org/apache/camel/support/processor/state/FileStateRepository.java:
##########
@@ -321,10 +352,25 @@ public File getFileStore() {
         return fileStore;
     }
 
+    /**
+     * Sets the file of the repository (incl directory).
+     */

Review Comment:
   Missing `@param fileStore` on the new Javadoc:
   
   ```suggestion
       /**
        * Sets the file of the repository (incl directory).
        *
        * @param fileStore the file store
        */
   ```



##########
core/camel-support/src/main/java/org/apache/camel/support/processor/state/FileStateRepository.java:
##########
@@ -321,10 +352,25 @@ public File getFileStore() {
         return fileStore;
     }
 
+    /**
+     * Sets the file of the repository (incl directory).
+     */
     public void setFileStore(File fileStore) {
         this.fileStore = fileStore;
     }
 
+    public String getFileName() {
+        return fileStore != null ? fileStore.getPath() : null;

Review Comment:
   Missing Javadoc. Add a `@return` description:
   
   ```suggestion
       /**
        * Returns the file name of the repository (incl directory), derived 
from the file store,
        * or {@code null} if the file store has not been set.
        */
       public String getFileName() {
   ```



##########
core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java:
##########
@@ -229,8 +276,25 @@ public File getFileStore() {
         return fileStore;
     }
 
+    /**
+     * Sets the file of the repository (incl directory).
+     */

Review Comment:
   New Javadoc block is missing `@param fileStore` and doesn't mention the side 
effect of also updating the `fileName` field:
   
   ```suggestion
       /**
        * Sets the file of the repository (incl directory).
        * Also updates the {@code fileName} property to {@code 
fileStore.getPath()}.
        *
        * @param fileStore the file store, or {@code null} to clear both the 
file store and file name
        */
   ```



-- 
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