(struts) branch main updated (b22022c25 -> 1ab2fcc62)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


from b22022c25 Bump github/codeql-action from 3.28.15 to 3.28.17 (#1261)
 add 1ab2fcc62 Bump org.htmlunit:htmlunit from 4.9.0 to 4.11.1 (#1258)

No new revisions were added by this update.

Summary of changes:
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch dependabot/maven/org.htmlunit-htmlunit-4.11.1 deleted (was 937091dca)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch 
dependabot/maven/org.htmlunit-htmlunit-4.11.1
in repository https://gitbox.apache.org/repos/asf/struts.git


 was 937091dca Bump org.htmlunit:htmlunit from 4.9.0 to 4.11.1

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts) branch dependabot/maven/com.github.ben-manes.caffeine-caffeine-3.2.0 deleted (was d08a19ce7)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch 
dependabot/maven/com.github.ben-manes.caffeine-caffeine-3.2.0
in repository https://gitbox.apache.org/repos/asf/struts.git


 was d08a19ce7 Bump com.github.ben-manes.caffeine:caffeine from 3.1.8 to 
3.2.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch main updated: Bump com.github.ben-manes.caffeine:caffeine from 3.1.8 to 3.2.0 (#1257)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
 new d4f1adbb0 Bump com.github.ben-manes.caffeine:caffeine from 3.1.8 to 
3.2.0 (#1257)
d4f1adbb0 is described below

commit d4f1adbb05ecc8be0affaa61cf1063c78220c27b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue May 6 20:47:20 2025 +0200

Bump com.github.ben-manes.caffeine:caffeine from 3.1.8 to 3.2.0 (#1257)

Bumps 
[com.github.ben-manes.caffeine:caffeine](https://github.com/ben-manes/caffeine) 
from 3.1.8 to 3.2.0.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.1.8...v3.2.0)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 55212cb4b..40a1c3e65 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -56,7 +56,7 @@
 
 com.github.ben-manes.caffeine
 caffeine
-3.1.8
+3.2.0
 
 
 



(struts) branch release/struts-6-7-x updated: WW-5546 Fixes NPE when uploaded file is empty (#1262)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch release/struts-6-7-x
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/release/struts-6-7-x by this 
push:
 new 84a51cce0 WW-5546 Fixes NPE when uploaded file is empty (#1262)
84a51cce0 is described below

commit 84a51cce0e9ea3e04c5b3793faef95a5d5b4ebcd
Author: Lukasz Lenart 
AuthorDate: Tue May 6 20:48:24 2025 +0200

WW-5546 Fixes NPE when uploaded file is empty (#1262)
---
 .../interceptor/AbstractFileUploadInterceptor.java |  2 +-
 .../ActionFileUploadInterceptorTest.java   | 63 ++
 .../interceptor/FileUploadInterceptorTest.java | 63 ++
 3 files changed, 127 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
 
b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
index ecebd3748..a905e00cb 100644
--- 
a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
+++ 
b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
@@ -116,7 +116,7 @@ public abstract class AbstractFileUploadInterceptor extends 
AbstractInterceptor
 }
 
 // If it's null the upload failed
-if (file == null) {
+if (file == null || file.getContent() == null) {
 String errMsg = getTextMessage(action, 
STRUTS_MESSAGES_ERROR_UPLOADING_KEY, new String[]{inputName});
 if (validation != null) {
 validation.addFieldError(inputName, errMsg);
diff --git 
a/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
 
b/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
index 869deeed5..1e054753e 100644
--- 
a/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
+++ 
b/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
@@ -98,6 +98,53 @@ public class ActionFileUploadInterceptorTest extends 
StrutsInternalTestCase {
 }
 };
 
+public static final UploadedFile NULL_CONTENT = new UploadedFile() {
+@Override
+public Long length() {
+return 0L;
+}
+
+@Override
+public String getName() {
+return "";
+}
+
+@Override
+public boolean isFile() {
+return false;
+}
+
+@Override
+public boolean delete() {
+return false;
+}
+
+@Override
+public String getAbsolutePath() {
+return null;
+}
+
+@Override
+public File getContent() {
+return null;
+}
+
+@Override
+public String getOriginalName() {
+return null;
+}
+
+@Override
+public String getContentType() {
+return null;
+}
+
+@Override
+public String getInputName() {
+return null;
+}
+};
+
 private ActionFileUploadInterceptor interceptor;
 private File tempDir;
 
@@ -205,6 +252,22 @@ public class ActionFileUploadInterceptorTest extends 
StrutsInternalTestCase {
 assertTrue(msg.indexOf("inputName") > 0);
 }
 
+public void testAcceptFileWithNoContent() {
+interceptor.setAllowedTypes("text/plain");
+
+ValidationAwareSupport validation = new ValidationAwareSupport();
+boolean notOk = interceptor.acceptFile(validation, NULL_CONTENT, 
"filename.html", "text/plain", "inputName");
+
+assertFalse(notOk);
+assertFalse(validation.getFieldErrors().isEmpty());
+assertTrue(validation.hasErrors());
+List errors = validation.getFieldErrors().get("inputName");
+assertEquals(1, errors.size());
+String msg = errors.get(0);
+assertTrue(msg.startsWith("Error uploading:"));
+assertTrue(msg.indexOf("inputName") > 0);
+}
+
 public void testAcceptFileWithMaxSize() throws Exception {
 interceptor.setMaximumSize(10L);
 
diff --git 
a/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
 
b/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
index c4b03ad0b..8b64ccb43 100644
--- 
a/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
+++ 
b/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
@@ -100,6 +100,53 @@ public class FileUploadInterceptorTest extends 
StrutsInternalTestCase {
 }
 };
 
+public static final UploadedFile NULL_CONTENT = new UploadedFile() {
+@Override
+public Long length() {
+return 0L;
+}
+
+@Override
+public String getName() {
+return "";
+}
+
+@Override
+

struts.git: Error while running github feature from release/struts-6-7-x:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch fix/WW-5546-null-file deleted (was 587444e24)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch fix/WW-5546-null-file
in repository https://gitbox.apache.org/repos/asf/struts.git


 was 587444e24 WW-5546 Fixes NPE when uploaded file is empty

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts) branch main updated (e32679953 -> 84a97741e)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


from e32679953 WW-5544 Marks ReflectionContextFactory as deprecated and 
uses ActionContext instead (#1254) (#1255)
 add 84a97741e Bump org.apache.maven.plugins:maven-site-plugin from 3.20.0 
to 3.21.0 (#1256)

No new revisions were added by this update.

Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch dependabot/github_actions/github/codeql-action-3.28.17 deleted (was fe2c2a705)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch 
dependabot/github_actions/github/codeql-action-3.28.17
in repository https://gitbox.apache.org/repos/asf/struts.git


 was fe2c2a705 Bump github/codeql-action from 3.28.15 to 3.28.17

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts) branch dependabot/maven/org.apache.maven.plugins-maven-site-plugin-3.21.0 deleted (was c89bb5c1c)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch 
dependabot/maven/org.apache.maven.plugins-maven-site-plugin-3.21.0
in repository https://gitbox.apache.org/repos/asf/struts.git


 was c89bb5c1c Bump org.apache.maven.plugins:maven-site-plugin from 3.20.0 
to 3.21.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts) branch dependabot/maven/org.owasp-dependency-check-maven-12.1.1 deleted (was 1ca516aaf)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch 
dependabot/maven/org.owasp-dependency-check-maven-12.1.1
in repository https://gitbox.apache.org/repos/asf/struts.git


 was 1ca516aaf Bump org.owasp:dependency-check-maven from 10.0.4 to 12.1.1

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts) branch main updated: Bump github/codeql-action from 3.28.15 to 3.28.17 (#1261)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
 new b22022c25 Bump github/codeql-action from 3.28.15 to 3.28.17 (#1261)
b22022c25 is described below

commit b22022c25fd367158e1367bd3c15d785ad8312ea
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue May 6 20:40:16 2025 +0200

Bump github/codeql-action from 3.28.15 to 3.28.17 (#1261)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 
3.28.15 to 3.28.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- 
[Commits](https://github.com/github/codeql-action/compare/v3.28.15...v3.28.17)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
---
 .github/workflows/codeql.yml   | 6 +++---
 .github/workflows/scorecards-analysis.yaml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index bd5617e57..a09d806d1 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -52,12 +52,12 @@ jobs:
 java-version: 17
 cache: 'maven'
 - name: Initialize CodeQL
-  uses: github/codeql-action/init@v3.28.15
+  uses: github/codeql-action/init@v3.28.17
   with:
 languages: ${{ matrix.language }}
 - name: Autobuild
-  uses: github/codeql-action/autobuild@v3.28.15
+  uses: github/codeql-action/autobuild@v3.28.17
 - name: Perform CodeQL Analysis
-  uses: github/codeql-action/analyze@v3.28.15
+  uses: github/codeql-action/analyze@v3.28.17
   with:
 category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/scorecards-analysis.yaml 
b/.github/workflows/scorecards-analysis.yaml
index ae5e07740..881e5dd74 100644
--- a/.github/workflows/scorecards-analysis.yaml
+++ b/.github/workflows/scorecards-analysis.yaml
@@ -65,6 +65,6 @@ jobs:
   retention-days: 5
 
   - name: "Upload to code-scanning"
-uses: 
github/codeql-action/upload-sarif@4c3e5362829f0b0bb62ff5f6c938d7f95574c306# 
2.22.11
+uses: 
github/codeql-action/upload-sarif@5eb3ed6614230b1931d5c08df9e096e4ba524f21# 
2.22.11
 with:
   sarif_file: results.sarif



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch main updated: Bump org.owasp:dependency-check-maven from 10.0.4 to 12.1.1 (#1259)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
 new 101dc02f7 Bump org.owasp:dependency-check-maven from 10.0.4 to 12.1.1 
(#1259)
101dc02f7 is described below

commit 101dc02f7799e53ac191f6643da465982de8cd48
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue May 6 20:39:52 2025 +0200

Bump org.owasp:dependency-check-maven from 10.0.4 to 12.1.1 (#1259)

Bumps 
[org.owasp:dependency-check-maven](https://github.com/dependency-check/DependencyCheck)
 from 10.0.4 to 12.1.1.
- [Release 
notes](https://github.com/dependency-check/DependencyCheck/releases)
- 
[Changelog](https://github.com/dependency-check/DependencyCheck/blob/main/CHANGELOG.md)
- 
[Commits](https://github.com/dependency-check/DependencyCheck/compare/v10.0.4...v12.1.1)

---
updated-dependencies:
- dependency-name: org.owasp:dependency-check-maven
  dependency-version: 12.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 17e4298f8..1a3ea1386 100644
--- a/pom.xml
+++ b/pom.xml
@@ -322,7 +322,7 @@
 
 org.owasp
 dependency-check-maven
-10.0.4
+12.1.1
 
 
 
src/etc/project-suppression.xml



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



struts.git: Error while running github feature from --unknown-branch--:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



struts.git: Error while running github feature from main:.asf.yaml

2025-05-06 Thread Apache Infrastructure


An error occurred while processing the github feature in .asf.yaml: 

while parsing a mapping
  in "struts.git/.asf.yaml::github", line 7, column 1:
  # contexts are the names o ... 
^ (line: 7)
unexpected key not in schema 'contexts'
  in "struts.git/.asf.yaml::github", line 8, column 1:
contexts:
^ (line: 8)

---
With regards, ASF Infra.
For further information, please see the .asf.yaml documentation at:
https://github.com/apache/infrastructure-asfyaml/blob/main/README.md



(struts) branch main updated: WW-5546 Fixes NPE when uploaded file is empty (#1263)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
 new d9c9d2b03 WW-5546 Fixes NPE when uploaded file is empty (#1263)
d9c9d2b03 is described below

commit d9c9d2b0307fe7a4126c6f00df29951c54517802
Author: Lukasz Lenart 
AuthorDate: Wed May 7 07:18:15 2025 +0200

WW-5546 Fixes NPE when uploaded file is empty (#1263)
---
 .../interceptor/AbstractFileUploadInterceptor.java |   2 +-
 .../ActionFileUploadInterceptorTest.java   | 344 +++--
 2 files changed, 174 insertions(+), 172 deletions(-)

diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
 
b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
index c0a1bd9d8..8d7ef49f1 100644
--- 
a/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
+++ 
b/core/src/main/java/org/apache/struts2/interceptor/AbstractFileUploadInterceptor.java
@@ -115,7 +115,7 @@ public abstract class AbstractFileUploadInterceptor extends 
AbstractInterceptor
 }
 
 // If it's null the upload failed
-if (file == null) {
+if (file == null || file.getContent() == null) {
 String errMsg = getTextMessage(action, 
STRUTS_MESSAGES_ERROR_UPLOADING_KEY, new String[]{inputName});
 if (validation != null) {
 validation.addFieldError(inputName, errMsg);
diff --git 
a/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
 
b/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
index b8761a8a4..26cf7e180 100644
--- 
a/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
+++ 
b/core/src/test/java/org/apache/struts2/interceptor/ActionFileUploadInterceptorTest.java
@@ -18,21 +18,21 @@
  */
 package org.apache.struts2.interceptor;
 
-import org.apache.struts2.ActionContext;
-import org.apache.struts2.ActionSupport;
-import org.apache.struts2.locale.DefaultLocaleProvider;
-import org.apache.struts2.ValidationAwareSupport;
-import org.apache.struts2.mock.MockActionInvocation;
-import org.apache.struts2.mock.MockActionProxy;
-import org.apache.struts2.util.ClassLoaderUtil;
 import 
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletDiskFileUpload;
 import 
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.ActionSupport;
 import org.apache.struts2.StrutsInternalTestCase;
+import org.apache.struts2.ValidationAwareSupport;
 import org.apache.struts2.action.UploadedFilesAware;
 import org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
 import org.apache.struts2.dispatcher.multipart.StrutsUploadedFile;
 import org.apache.struts2.dispatcher.multipart.UploadedFile;
+import org.apache.struts2.locale.DefaultLocaleProvider;
+import org.apache.struts2.mock.MockActionInvocation;
+import org.apache.struts2.mock.MockActionProxy;
+import org.apache.struts2.util.ClassLoaderUtil;
 import org.assertj.core.util.Files;
 import org.springframework.mock.web.MockHttpServletRequest;
 
@@ -40,7 +40,6 @@ import java.io.File;
 import java.net.URI;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
-import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
 
@@ -51,53 +50,6 @@ import static org.assertj.core.api.Assertions.assertThat;
  */
 public class ActionFileUploadInterceptorTest extends StrutsInternalTestCase {
 
-private static final UploadedFile EMPTY_FILE = new UploadedFile() {
-@Override
-public Long length() {
-return 0L;
-}
-
-@Override
-public String getName() {
-return "";
-}
-
-@Override
-public boolean isFile() {
-return false;
-}
-
-@Override
-public boolean delete() {
-return false;
-}
-
-@Override
-public String getAbsolutePath() {
-return null;
-}
-
-@Override
-public File getContent() {
-return Files.newTemporaryFile();
-}
-
-@Override
-public String getOriginalName() {
-return null;
-}
-
-@Override
-public String getContentType() {
-return null;
-}
-
-@Override
-public String getInputName() {
-return null;
-}
-};
-
 private MockHttpServletRequest request;
 private ActionFileUploadInterceptor interceptor;
 private File tempDir;
@@ -105,16 +57,16 @@ public class ActionFileUploadInterceptorTest extends 
StrutsInternalTestCase {
 private final String htmlCon

(struts) branch fix/WW-5546-null-file-s7 deleted (was c64e5aa30)

2025-05-06 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch fix/WW-5546-null-file-s7
in repository https://gitbox.apache.org/repos/asf/struts.git


 was c64e5aa30 WW-5546 Fixes NPE when uploaded file is empty

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.