This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new d84a3c37e6 FELIX-6654 : Remove support for commons fileupload
d84a3c37e6 is described below
commit d84a3c37e68334f1d80bfacc08233e3ac098a2f0
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Dec 28 10:55:34 2023 +0100
FELIX-6654 : Remove support for commons fileupload
---
.../java/org/apache/felix/webconsole/internal/core/BundlesServlet.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
index 0b098be148..190efc75c7 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -25,6 +25,7 @@ import java.io.StringWriter;
import java.io.Writer;
import java.lang.reflect.Array;
import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
import java.text.MessageFormat;
import java.util.AbstractMap;
import java.util.ArrayList;
@@ -1497,7 +1498,7 @@ public class BundlesServlet extends
AbstractOsgiManagerPlugin implements Invento
// copy the data to a file for better processing
tmpFile = File.createTempFile( "install", ".tmp" );
try (final InputStream bundleStream = part.getInputStream()) {
- Files.copy(bundleStream, tmpFile.toPath());
+ Files.copy(bundleStream, tmpFile.toPath(),
StandardCopyOption.REPLACE_EXISTING);
}
} catch ( final Exception e ) {
Util.LOGGER.error("Problem accessing uploaded bundle file:
{}", part.getSubmittedFileName(), e );