ptupitsyn commented on code in PR #7310:
URL: https://github.com/apache/ignite-3/pull/7310#discussion_r2681713426


##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/deployment/InputStreamCollectorImpl.java:
##########
@@ -54,13 +54,20 @@ public InputStreamCollectorImpl(TempStorage tempStorage) {
 
     @Override
     public void addInputStream(String filename, InputStream is) {
-        collect.put(filename, tempStorage.store(filename, 
is).whenComplete((path, throwable) -> {
-            try {
-                is.close();
-            } catch (IOException e) {
-                LOG.error("Error when closing input stream.", e);
-            }
-        }));
+        if (collect.containsKey(filename)) {
+            closeStream(is);
+            throw new DuplicateFilenamesException("Duplicate filename: " + 
filename);

Review Comment:
   Please create a ticket for this.



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