(struts) branch fix/WW-5424-class-cast-exception created (now 4a8ff99b1)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch fix/WW-5424-class-cast-exception in repository https://gitbox.apache.org/repos/asf/struts.git at 4a8ff99b1 WW-5424 Fixes ClassCastException when using short var name in s:set tag This branch includes the following new commits: new 4a8ff99b1 WW-5424 Fixes ClassCastException when using short var name in s:set tag The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(struts) 01/01: WW-5424 Fixes ClassCastException when using short var name in s:set tag
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch fix/WW-5424-class-cast-exception in repository https://gitbox.apache.org/repos/asf/struts.git commit 4a8ff99b1cc04bc69927aa3508c64fcb9d95519e Author: Lukasz Lenart AuthorDate: Sun Jun 2 13:53:37 2024 +0200 WW-5424 Fixes ClassCastException when using short var name in s:set tag --- .../java/org/apache/struts2/components/Set.java| 12 ++--- .../org/apache/struts2/views/jsp/SetTagTest.java | 58 ++ 2 files changed, 55 insertions(+), 15 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Set.java b/core/src/main/java/org/apache/struts2/components/Set.java index cca990ea8..4d8f7c898 100644 --- a/core/src/main/java/org/apache/struts2/components/Set.java +++ b/core/src/main/java/org/apache/struts2/components/Set.java @@ -104,17 +104,17 @@ public class Set extends ContextBean { body=""; if (DispatcherConstants.APPLICATION.equalsIgnoreCase(scope)) { -stack.setValue("#application['" + getVar() + "']", o); +stack.setValue(String.format("#application[\"%s\"]", getVar()), o); } else if (DispatcherConstants.SESSION.equalsIgnoreCase(scope)) { -stack.setValue("#session['" + getVar() + "']", o); +stack.setValue(String.format("#session[\"%s\"]", getVar()), o); } else if (DispatcherConstants.REQUEST.equalsIgnoreCase(scope)) { -stack.setValue("#request['" + getVar() + "']", o); +stack.setValue(String.format("#request[\"%s\"]", getVar()), o); } else if (DispatcherConstants.PAGE.equalsIgnoreCase(scope)) { -stack.setValue("#attr['" + getVar() + "']", o, false); +stack.setValue(String.format("#attr[\"%s\"]", getVar()), o, false); } else { // Default scope is action. Note: The action scope handling also adds the var to the page scope. -stack.getContext().put(getVar(), o); -stack.setValue("#attr['" + getVar() + "']", o, false); +putInContext(o); +stack.setValue(String.format("#attr[\"%s\"]", getVar()), o, false); } return super.end(writer, body); diff --git a/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java index 9e5c30eb5..f14e07735 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/SetTagTest.java @@ -22,14 +22,10 @@ import com.mockobjects.servlet.MockJspWriter; import java.io.IOException; import javax.servlet.jsp.JspException; - -/** - */ public class SetTagTest extends AbstractUITagTest { -Chewbacca chewie; -SetTag tag; - +private Chewbacca chewie; +private SetTag tag; public void testApplicationScope() throws JspException { tag.setName("foo"); @@ -397,6 +393,50 @@ public class SetTagTest extends AbstractUITagTest { strutsBodyTagsAreReflectionEqual(tag, freshTag)); } +public void testShortVarNameInPageScope() throws JspException { +tag.setName("f"); +tag.setValue("name"); +tag.setScope("page"); + +tag.doStartTag(); +tag.doEndTag(); + +assertEquals("chewie", pageContext.getAttribute("f")); +} + +public void testShortVarNameInRequestScope() throws JspException { +tag.setName("f"); +tag.setValue("name"); +tag.setScope("request"); + +tag.doStartTag(); +tag.doEndTag(); + +assertEquals("chewie", request.getAttribute("f")); +} + +public void testShortVarNameInSessionScope() throws JspException { +tag.setName("f"); +tag.setValue("name"); +tag.setScope("session"); + +tag.doStartTag(); +tag.doEndTag(); + +assertEquals("chewie", session.get("f")); +} + +public void testShortVarNameInApplicationScope() throws JspException { +tag.setName("f"); +tag.setValue("name"); +tag.setScope("application"); + +tag.doStartTag(); +tag.doEndTag(); + +assertEquals("chewie", servletContext.getAttribute("f")); +} + @Override protected void setUp() throws Exception { super.setUp(); @@ -408,9 +448,9 @@ public class SetTagTest extends AbstractUITagTest { } -public class Chewbacca { -String name; -boolean furry; +public static class Chewbacca { +private String name; +private boolean furry; public Chewbacca(String name, boolean furry) { this.name = name;
(struts) branch fix/no-reviewers-required created (now 00752e33c)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch fix/no-reviewers-required in repository https://gitbox.apache.org/repos/asf/struts.git at 00752e33c Disables required reviewers option This option doesn't play with Silence Consensus This branch includes the following new commits: new 00752e33c Disables required reviewers option This option doesn't play with Silence Consensus The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(struts) 01/01: Disables required reviewers option This option doesn't play with Silence Consensus
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch fix/no-reviewers-required in repository https://gitbox.apache.org/repos/asf/struts.git commit 00752e33c4e9bc6e2924e40f03cedcda1905552c Author: Lukasz Lenart AuthorDate: Sun Jun 2 13:59:41 2024 +0200 Disables required reviewers option This option doesn't play with Silence Consensus --- .asf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.asf.yaml b/.asf.yaml index 3f83d509a..5e259c710 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -20,7 +20,7 @@ github: required_pull_request_reviews: # it does not work because our github teams are private/secret, see INFRA-25666 require_code_owner_reviews: false -required_approving_review_count: 1 +required_approving_review_count: 0 autolink_jira: - WW dependabot_alerts: true
(struts) branch feature/WW-5412-master created (now 855b95e55)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch feature/WW-5412-master in repository https://gitbox.apache.org/repos/asf/struts.git at 855b95e55 WW-5412 Upgrades struts-master to ver 15 This branch includes the following new commits: new 855b95e55 WW-5412 Upgrades struts-master to ver 15 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(struts) 01/01: WW-5412 Upgrades struts-master to ver 15
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feature/WW-5412-master in repository https://gitbox.apache.org/repos/asf/struts.git commit 855b95e557340c10f6d36e7fe64e96650210e56b Author: Lukasz Lenart AuthorDate: Sun Jun 2 19:13:01 2024 +0200 WW-5412 Upgrades struts-master to ver 15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e5e67e4e..cf6bb206d 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts-master -14 +15 4.0.0
(struts-examples) branch dependabot/maven/io.quarkus-quarkus-universe-bom-3.11.0 created (now ff182f2)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/io.quarkus-quarkus-universe-bom-3.11.0 in repository https://gitbox.apache.org/repos/asf/struts-examples.git at ff182f2 Bump io.quarkus:quarkus-universe-bom from 3.10.0 to 3.11.0 No new revisions were added by this update.
(struts-examples) branch dependabot/maven/io.quarkus-quarkus-universe-bom-3.10.2 deleted (was d61ab2b)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/io.quarkus-quarkus-universe-bom-3.10.2 in repository https://gitbox.apache.org/repos/asf/struts-examples.git was d61ab2b Bump io.quarkus:quarkus-universe-bom from 3.10.0 to 3.10.2 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.mockito-mockito-core-5.12.0 created (now 58927afcf)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.mockito-mockito-core-5.12.0 in repository https://gitbox.apache.org/repos/asf/struts.git at 58927afcf Bump org.mockito:mockito-core from 4.3.1 to 5.12.0 No new revisions were added by this update.
(struts) branch dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.7.1 created (now e5fcc8f17)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.7.1 in repository https://gitbox.apache.org/repos/asf/struts.git at e5fcc8f17 Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1 No new revisions were added by this update.
(struts) branch dependabot/maven/com.sun.xml.bind-jaxb-core-4.0.5 created (now 78105871b)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/com.sun.xml.bind-jaxb-core-4.0.5 in repository https://gitbox.apache.org/repos/asf/struts.git at 78105871b Bump com.sun.xml.bind:jaxb-core from 2.3.0.1 to 4.0.5 No new revisions were added by this update.
(struts) branch dependabot/maven/spring.platformVersion-6.1.8 created (now 0dc2c2e6f)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/spring.platformVersion-6.1.8 in repository https://gitbox.apache.org/repos/asf/struts.git at 0dc2c2e6f Bump spring.platformVersion from 5.3.31 to 6.1.8 No new revisions were added by this update.
(struts) branch dependabot/maven/org.freemarker-freemarker-2.3.33 created (now 5c2be7cc7)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.freemarker-freemarker-2.3.33 in repository https://gitbox.apache.org/repos/asf/struts.git at 5c2be7cc7 Bump org.freemarker:freemarker from 2.3.32 to 2.3.33 No new revisions were added by this update.
(struts) branch dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.7.1 deleted (was e5fcc8f17)
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-assembly-plugin-3.7.1 in repository https://gitbox.apache.org/repos/asf/struts.git was e5fcc8f17 Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.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 master updated (9682b3b42 -> f6b25ac8a)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from 9682b3b42 Merge pull request #944 from apache/dependabot/maven/jackson.version-2.17.1 add e5fcc8f17 Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1 add f6b25ac8a Merge pull request #950 from apache/dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.7.1 No new revisions were added by this update. Summary of changes: assembly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(struts) branch dependabot/maven/org.mockito-mockito-core-5.12.0 deleted (was 58927afcf)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch dependabot/maven/org.mockito-mockito-core-5.12.0 in repository https://gitbox.apache.org/repos/asf/struts.git was 58927afcf Bump org.mockito:mockito-core from 4.3.1 to 5.12.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/spring.platformVersion-6.1.8 deleted (was 0dc2c2e6f)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch dependabot/maven/spring.platformVersion-6.1.8 in repository https://gitbox.apache.org/repos/asf/struts.git was 0dc2c2e6f Bump spring.platformVersion from 5.3.31 to 6.1.8 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.freemarker-freemarker-2.3.33 deleted (was 5c2be7cc7)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch dependabot/maven/org.freemarker-freemarker-2.3.33 in repository https://gitbox.apache.org/repos/asf/struts.git was 5c2be7cc7 Bump org.freemarker:freemarker from 2.3.32 to 2.3.33 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) 01/01: Merge pull request #953 from apache/dependabot/maven/org.freemarker-freemarker-2.3.33
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit ee040babd475cf950f77ad7d1147866154eedde9 Merge: f6b25ac8a 5c2be7cc7 Author: Lukasz Lenart AuthorDate: Mon Jun 3 07:04:47 2024 +0200 Merge pull request #953 from apache/dependabot/maven/org.freemarker-freemarker-2.3.33 WW-5426 Bump org.freemarker:freemarker from 2.3.32 to 2.3.33 pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(struts) branch master updated (f6b25ac8a -> ee040babd)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from f6b25ac8a Merge pull request #950 from apache/dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.7.1 add 5c2be7cc7 Bump org.freemarker:freemarker from 2.3.32 to 2.3.33 new ee040babd Merge pull request #953 from apache/dependabot/maven/org.freemarker-freemarker-2.3.33 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)