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


##########
core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java:
##########
@@ -1829,6 +1852,15 @@ public T withProfile(String profile) {
      * To specify for how long time in seconds to keep running the JVM before 
automatic terminating the JVM. You can use
      * this to run Camel for a short while.
      */
+    /**
+     * For how long to keep running before automatic terminating the JVM, as a 
duration with a time unit such as 15s, 2m
+     * or 1h (a plain number is seconds). An alias of durationMaxSeconds that 
accepts a unit.
+     */
+    public T withDuration(String duration) {
+        setDuration(duration);
+        return (T) this;
+    }
+

Review Comment:
   ⚠️ **Orphaned Javadoc** — `withDuration` was inserted between the existing 
Javadoc block for `withDurationMaxSeconds` (lines 1852-1854) and the 
`withDurationMaxSeconds` method itself (line 1864). As a result:
   
   1. `withDuration` has **two** stacked Javadoc blocks — the first one (about 
seconds) is wrong for it
   2. `withDurationMaxSeconds` lost its Javadoc entirely
   
   Move the old Javadoc below `withDuration` to re-attach it to its method:
   
   ```suggestion
       /**
        * For how long to keep running before automatic terminating the JVM, as 
a duration with a time unit such as 15s, 2m
        * or 1h (a plain number is seconds). An alias of durationMaxSeconds 
that accepts a unit.
        */
       public T withDuration(String duration) {
           setDuration(duration);
           return (T) this;
       }
   
   ```
   
   (The `withDurationMaxSeconds` Javadoc that was displaced should stay above 
`withDurationMaxSeconds` — the context lines before this hunk already contain 
it, so the suggestion just removes the duplicate.)



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