This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch 1.x
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git

commit 324793c082cadbc51801f8574bde4f2d8c011cb8
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Feb 8 09:31:34 2026 -0500

    Use in-line comments
    
    Reduce vertical space
---
 .../java/org/apache/commons/fileupload/disk/DiskFileItem.java  | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java 
b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
index f1262ba9..4047cf85 100644
--- a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
+++ b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
@@ -437,9 +437,7 @@ public class DiskFileItem implements FileItem {
             if (tempDir == null) {
                 tempDir = new File(System.getProperty("java.io.tmpdir"));
             }
-
             final String tempFileName = String.format("upload_%s_%s.tmp", UID, 
nextUniqueId());
-
             tempFile = new File(tempDir, tempFileName);
         }
         return tempFile;
@@ -557,16 +555,12 @@ public class DiskFileItem implements FileItem {
         } else {
             final File outputFile = getStoreLocation();
             if (outputFile == null) {
-                /*
-                 * For whatever reason we cannot write the file to disk.
-                 */
+                // For whatever reason we cannot write the file to disk.
                 throw new FileUploadException("Cannot write uploaded file to 
disk!");
             }
             // Save the length of the file
             size = outputFile.length();
-            /*
-             * The uploaded file is being stored on disk in a temporary 
location so move it to the desired file.
-             */
+            // The uploaded file is being stored on disk in a temporary 
location so move it to the desired file.
             if (file.exists() && !file.delete()) {
                 throw new FileUploadException("Cannot write uploaded file to 
disk!");
             }

Reply via email to