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


##########
components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileHelper.java:
##########
@@ -239,6 +240,29 @@ public static boolean isWithinDirectory(String 
compactTarget, String compactDir,
      * @throws InvalidPayloadException if the body cannot be converted
      * @throws IOException             if the charset is not supported
      */
+    /**
+     * The body as a stream to write to a file of the given name. A Map, a 
List or an object (a body unmarshalled from
+     * JSON, XML or CSV, or built in the route) cannot become one, and the 
converter's message only names the
+     * conversion: says what the body is, the step that set it, and the 
marshal that writes it, in the data format the
+     * file name names (CAMEL-25751, CAMEL-25749). The file, ftp and sftp 
producers read the body with it (CAMEL-27151).
+     */
+    public static InputStream mandatoryBodyStream(Exchange exchange, Message 
message, String fileName)
+            throws InvalidPayloadException {

Review Comment:
   The new `mandatoryBodyStream` block is inserted **between** 
`toInputStream`'s Javadoc block and the `toInputStream` method declaration. 
After this change, the structure at this location is:
   
   ```
    * @throws InvalidPayloadException ...  ← end of toInputStream's Javadoc
    * @throws IOException ...
    */
   /**
    * The body as a stream ...              ← mandatoryBodyStream's own Javadoc
    */
   public static InputStream mandatoryBodyStream(...)   ← inserted here
   { ... }
   
   public static InputStream toInputStream(...)         ← toInputStream, now 
without its Javadoc preceding it
   ```
   
   Javadoc tools associate each `/** */` block with the declaration that 
immediately follows it. The long `@param`/`@throws` Javadoc for `toInputStream` 
(the one with `@throws InvalidPayloadException if the body cannot be converted` 
etc.) now precedes `mandatoryBodyStream` — Javadoc will treat it as 
documentation for `mandatoryBodyStream`, not `toInputStream`. The 
`toInputStream` method will appear undocumented.
   
   Move `mandatoryBodyStream` (with its own Javadoc) to **after** 
`toInputStream` instead of before it.



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