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 d3418e688211042b624f3f7d52a894a60183678c
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Feb 8 08:14:56 2026 -0500

    Better internal name
---
 src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java | 5 ++---
 1 file changed, 2 insertions(+), 3 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 cc8ac86e..357941b6 100644
--- a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
+++ b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
@@ -84,11 +84,10 @@ public class DiskFileItem implements FileItem {
      *
      * @return A String with the non-random looking instance identifier.
      */
-    private static String getUniqueId() {
+    private static String nextUniqueId() {
         final int limit = 100_000_000;
         final int current = COUNTER.getAndIncrement();
         String id = Integer.toString(current);
-
         // If you manage to get more than 100 million of ids, you'll
         // start getting ids longer than 8 characters.
         if (current < limit) {
@@ -438,7 +437,7 @@ public class DiskFileItem implements FileItem {
                 tempDir = new File(System.getProperty("java.io.tmpdir"));
             }
 
-            final String tempFileName = String.format("upload_%s_%s.tmp", UID, 
getUniqueId());
+            final String tempFileName = String.format("upload_%s_%s.tmp", UID, 
nextUniqueId());
 
             tempFile = new File(tempDir, tempFileName);
         }

Reply via email to