[struts] branch master updated: WW-4991 Not existing property in listValueKey throws exception

2019-02-04 Thread amashchenko
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f6e0cde  WW-4991 Not existing property in listValueKey throws exception
f6e0cde is described below

commit f6e0cdeb67540ceacff6bc4f167907650640
Author: Aleksandr Mashchenko 
AuthorDate: Mon Feb 4 22:06:26 2019 +0200

WW-4991 Not existing property in listValueKey throws exception
---
 core/src/main/resources/template/simple/radiomap.ftl  |  9 ++---
 core/src/main/resources/template/simple/select.ftl|  4 ++--
 .../java/org/apache/struts2/views/jsp/ui/RadioTest.java   | 15 +++
 .../java/org/apache/struts2/views/jsp/ui/SelectTest.java  | 15 +++
 .../resources/org/apache/struts2/views/jsp/ui/Radio-8.txt |  8 
 .../org/apache/struts2/views/jsp/ui/Select-16.txt | 10 ++
 6 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/core/src/main/resources/template/simple/radiomap.ftl 
b/core/src/main/resources/template/simple/radiomap.ftl
index c1664f0..5c37a4b 100644
--- a/core/src/main/resources/template/simple/radiomap.ftl
+++ b/core/src/main/resources/template/simple/radiomap.ftl
@@ -29,9 +29,12 @@
 <#if parameters.listValueKey??>
 <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
  file for it's localized value.  This is then used as a label -->
-<#assign itemValue = stack.findString(parameters.listValueKey)/>
-<#-- FIXME: find a better way to get the value than a call to @s.text 
-->
-<#assign itemValue><@s.text name="${itemValue}"/>
+<#assign valueKey = stack.findString(parameters.listValueKey)!''/>
+<#if valueKey?has_content>
+<#assign itemValue = struts.getText(valueKey) />
+<#else>
+<#assign itemValue = parameters.listValueKey />
+
 <#elseif parameters.listValue??>
 <#assign itemValue = stack.findString(parameters.listValue)/>
 <#else>
diff --git a/core/src/main/resources/template/simple/select.ftl 
b/core/src/main/resources/template/simple/select.ftl
index d007074..e096cb7 100644
--- a/core/src/main/resources/template/simple/select.ftl
+++ b/core/src/main/resources/template/simple/select.ftl
@@ -70,8 +70,8 @@
 <#if parameters.listValueKey??>
   <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale file for it's 
  localized value.  This is then used as a label -->
-  <#assign valueKey = stack.findString(parameters.listValueKey) />
-  <#if valueKey??>
+  <#assign valueKey = stack.findString(parameters.listValueKey)!'' />
+  <#if valueKey?has_content>
   <#assign itemValue = struts.getText(valueKey) />
   <#else>
   <#assign itemValue = parameters.listValueKey />
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
index 4932740..1caa5a5 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
@@ -196,6 +196,21 @@ public class RadioTest extends AbstractUITagTest {
 verify(RadioTag.class.getResource("Radio-7.txt"));
 }
 
+public void testNotExistingListValueKey() throws Exception {
+RadioTag tag = new RadioTag();
+tag.setName("myname");
+tag.setLabel("mylabel");
+tag.setList("#{'a':'aaa', 'b':'bbb', 'c':'ccc'}");
+tag.setListValueKey("notExistingProperty");
+
+tag.setPageContext(pageContext);
+
+tag.doStartTag();
+tag.doEndTag();
+
+verify(SelectTag.class.getResource("Radio-8.txt"));
+}
+
 private void prepareTagGeneric(RadioTag tag) {
 TestAction testAction = (TestAction) action;
 testAction.setFoo("bar");
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
index 01f7300..c30b8f5 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
@@ -637,6 +637,21 @@ public class SelectTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("Select-13.txt"));
 }
 
+public void testNotExistingListValueKey() throws Exception {
+SelectTag tag = new SelectTag();
+tag.setName("foo");
+tag.setLabel("mylabel");
+tag.setList("#{'a':'aaa', 'b':'bbb', 'c':'ccc'}");
+tag.setListValueKey("notExistingProperty");
+
+tag.setPageContext(pageContext);
+
+tag.doStartTag();
+tag.doEndTag();
+
+verify(SelectTag.class.getResource("Select-1

[struts] branch struts-2-5-x updated: WW-4991 Not existing property in listValueKey throws exception

2019-02-04 Thread amashchenko
This is an automated email from the ASF dual-hosted git repository.

amashchenko pushed a commit to branch struts-2-5-x
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/struts-2-5-x by this push:
 new 873ca8f  WW-4991 Not existing property in listValueKey throws exception
 new 32e88d1  Merge pull request #322 from aleksandr-m/feature/WW-4991
873ca8f is described below

commit 873ca8fa203b7066cbaeaeb67df5d16c
Author: Aleksandr Mashchenko 
AuthorDate: Wed Jan 30 23:10:06 2019 +0200

WW-4991 Not existing property in listValueKey throws exception
---
 core/src/main/resources/template/simple/radiomap.ftl  |  9 ++---
 core/src/main/resources/template/simple/select.ftl|  4 ++--
 .../java/org/apache/struts2/views/jsp/ui/RadioTest.java   | 15 +++
 .../java/org/apache/struts2/views/jsp/ui/SelectTest.java  | 15 +++
 .../resources/org/apache/struts2/views/jsp/ui/Radio-8.txt |  8 
 .../org/apache/struts2/views/jsp/ui/Select-16.txt | 10 ++
 6 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/core/src/main/resources/template/simple/radiomap.ftl 
b/core/src/main/resources/template/simple/radiomap.ftl
index cdff00e..b44a0be 100644
--- a/core/src/main/resources/template/simple/radiomap.ftl
+++ b/core/src/main/resources/template/simple/radiomap.ftl
@@ -29,9 +29,12 @@
 <#if parameters.listValueKey??>
 <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale 
  file for it's localized value.  This is then used as a label -->
-<#assign itemValue = stack.findString(parameters.listValueKey)/>
-<#-- FIXME: find a better way to get the value than a call to @s.text 
-->
-<#assign itemValue><@s.text name="${itemValue}"/>
+<#assign valueKey = stack.findString(parameters.listValueKey)!''/>
+<#if valueKey?has_content>
+<#assign itemValue = struts.getText(valueKey) />
+<#else>
+<#assign itemValue = parameters.listValueKey />
+
 <#elseif parameters.listValue??>
 <#assign itemValue = stack.findString(parameters.listValue)/>
 <#else>
diff --git a/core/src/main/resources/template/simple/select.ftl 
b/core/src/main/resources/template/simple/select.ftl
index a0c17b4..b0144ba 100644
--- a/core/src/main/resources/template/simple/select.ftl
+++ b/core/src/main/resources/template/simple/select.ftl
@@ -70,8 +70,8 @@
 <#if parameters.listValueKey??>
   <#-- checks the valueStack for the 'valueKey.' The valueKey is then 
looked-up in the locale file for it's 
  localized value.  This is then used as a label -->
-  <#assign valueKey = stack.findString(parameters.listValueKey) />
-  <#if valueKey??>
+  <#assign valueKey = stack.findString(parameters.listValueKey)!'' />
+  <#if valueKey?has_content>
   <#assign itemValue = struts.getText(valueKey) />
   <#else>
   <#assign itemValue = parameters.listValueKey />
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
index 4932740..1caa5a5 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/RadioTest.java
@@ -196,6 +196,21 @@ public class RadioTest extends AbstractUITagTest {
 verify(RadioTag.class.getResource("Radio-7.txt"));
 }
 
+public void testNotExistingListValueKey() throws Exception {
+RadioTag tag = new RadioTag();
+tag.setName("myname");
+tag.setLabel("mylabel");
+tag.setList("#{'a':'aaa', 'b':'bbb', 'c':'ccc'}");
+tag.setListValueKey("notExistingProperty");
+
+tag.setPageContext(pageContext);
+
+tag.doStartTag();
+tag.doEndTag();
+
+verify(SelectTag.class.getResource("Radio-8.txt"));
+}
+
 private void prepareTagGeneric(RadioTag tag) {
 TestAction testAction = (TestAction) action;
 testAction.setFoo("bar");
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
index 01f7300..c30b8f5 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/SelectTest.java
@@ -637,6 +637,21 @@ public class SelectTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("Select-13.txt"));
 }
 
+public void testNotExistingListValueKey() throws Exception {
+SelectTag tag = new SelectTag();
+tag.setName("foo");
+tag.setLabel("mylabel");
+tag.setList("#{'a':'aaa', 'b':'bbb', 'c':'ccc'}");
+tag.setListValueKey("notExistingProperty");
+
+tag.setPageContext(pageContext);
+
+tag.doStar

[struts] branch master updated (9d4e720 -> 48fe791)

2019-02-04 Thread lukaszlenart
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 9d4e720  upgrade to ASM 7
 new 42ef171  Merge pull request #1 from apache/master
 new 6ecd4b4  Switch to Java 8
 new b909693  Update Jenkinsfile
 new 7625c3c  Update .travis.yml
 new 48fe791  Merge pull request #312 from aleksandr-m/feature/java8

The 5622 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:
 .travis.yml | 1 -
 Jenkinsfile | 2 +-
 pom.xml | 5 +++--
 3 files changed, 4 insertions(+), 4 deletions(-)



[struts] branch master updated: upgrade to ASM 7

2019-02-04 Thread yasserzamani
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 9d4e720  upgrade to ASM 7
9d4e720 is described below

commit 9d4e720922b1b0b3084619a97882bdbecfce53f4
Author: Yasser Zamani 
AuthorDate: Wed Jan 23 16:24:40 2019 +0330

upgrade to ASM 7

fixes WW-5005

(cherry picked from commit 3eb68be)
---
 .../main/java/org/apache/struts2/convention/DefaultClassFinder.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultClassFinder.java
 
b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultClassFinder.java
index 09bd431..3aaad59 100644
--- 
a/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultClassFinder.java
+++ 
b/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultClassFinder.java
@@ -458,7 +458,7 @@ public class DefaultClassFinder implements ClassFinder {
 private ClassFinder classFinder;
 
 public InfoBuildingVisitor(ClassFinder classFinder) {
-super(Opcodes.ASM5);
+super(Opcodes.ASM7);
 this.classFinder = classFinder;
 }
 
@@ -539,7 +539,7 @@ public class DefaultClassFinder implements ClassFinder {
 private Info info;
 
 public InfoBuildingMethodVisitor() {
-super(Opcodes.ASM5);
+super(Opcodes.ASM7);
 }
 
 public InfoBuildingMethodVisitor(Info info) {



[struts-site] branch asf-site updated: Updates production by Jenkins

2019-02-04 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new a4c228f  Updates production by Jenkins
a4c228f is described below

commit a4c228fc5679c3421b6964118f449c671923e836
Author: jenkins 
AuthorDate: Mon Feb 4 10:16:04 2019 +

Updates production by Jenkins
---
 content/builds.html | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/content/builds.html b/content/builds.html
index aa30c27..c844e4c 100644
--- a/content/builds.html
+++ b/content/builds.html
@@ -195,7 +195,7 @@ your own applications!)
 NightlyBuilds
 
 As part of our continuous integration practice, we also make available each 
morning the
-https://builds.apache.org/view/S-Z/view/Struts/job/Struts2-JDK6/lastStableBuild/org.apache.struts$struts2-assembly/";>latest
 stable development build.
+https://repository.apache.org/content/repositories/snapshots/org/apache/struts/struts2-assembly/";>latest
 stable development build.
 
 Again: Use at your own risk!
 
@@ -224,13 +224,13 @@ of the distribution may be upgraded to “Beta” or “General 
Availability”,
 and then made available through ibiblio and other public Maven repositories. 
To obtain an early distribution via Maven,
 specify the ASF Snapshot repository in the project’s POM.
 
-
-
-apache.snapshots
-ASF Maven 2 Snapshot
-
https://repository.apache.org/content/groups/snapshots/;
-
-
+
+
+apache.snapshots
+ASF Maven 2 Snapshot
+https://repository.apache.org/content/groups/snapshots/
+
+
 
 
 



[struts-site] branch master updated: Uses a proper link to nightly builds

2019-02-04 Thread lukaszlenart
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-site.git


The following commit(s) were added to refs/heads/master by this push:
 new 33c40e0  Uses a proper link to nightly builds
33c40e0 is described below

commit 33c40e07af6a3aff28756252e1f4a49063a480ee
Author: Lukasz Lenart 
AuthorDate: Mon Feb 4 11:07:45 2019 +0100

Uses a proper link to nightly builds
---
 source/builds.md | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/source/builds.md b/source/builds.md
index 3322726..db63422 100644
--- a/source/builds.md
+++ b/source/builds.md
@@ -24,12 +24,15 @@ Read-only access to the Apache Struts source repository is 
available through bot
 
 With the [Git client](http://git-scm.com/) installed, obtaining a working copy 
of the Struts codebase is as simple as
 
-> git clone https://gitbox.apache.org/repos/asf/struts.git
+```
+> git clone https://gitbox.apache.org/repos/asf/struts.git
+```
 
 or from GitHub
 
-> git clone https://github.com/apache/struts.git
-
+```
+> git clone https://github.com/apache/struts.git
+```
 
 For more about using version control systems at Apache, see the ASF's
 [Source Code Repositories](http://www.apache.org/dev/#version-control) page.
@@ -43,11 +46,15 @@ your own applications!)
 
 With Maven installed, building a Struts codebase is as simple as
 
-> mvn install
+```
+> mvn install
+```
 
 or
 
-> mvn -DskipAssembly=true install
+```
+> mvn -DskipAssembly=true install
+```
 
 Maven will automatically download any dependencies as needed.
 
@@ -60,7 +67,7 @@ For more about using Maven to build Struts 1, see our [Maven 
wiki page.](http://
 ## NightlyBuilds
 
 As part of our continuous integration practice, we also make available each 
morning the
-[latest stable development 
build.](https://builds.apache.org/view/S-Z/view/Struts/job/Struts2-JDK6/lastStableBuild/org.apache.struts$struts2-assembly/)
+[latest stable development 
build.](https://repository.apache.org/content/repositories/snapshots/org/apache/struts/struts2-assembly/)
 
 *Again: Use at your own risk!*
 
@@ -89,13 +96,15 @@ of the distribution may be upgraded to "Beta" or "General 
Availability", based o
 and then made available through ibiblio and other public Maven repositories. 
To obtain an early distribution via Maven,
 specify the ASF Snapshot repository in the project's POM.
 
-
-
-apache.snapshots
-ASF Maven 2 Snapshot
-https://repository.apache.org/content/groups/snapshots/
-
-
+```xml
+
+
+apache.snapshots
+ASF Maven 2 Snapshot
+https://repository.apache.org/content/groups/snapshots/
+
+
+```
 
 
 ## Licensing of Apache Struts Builds



[struts] branch struts-2-5-x updated (71267a9 -> 6403de4)

2019-02-04 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch struts-2-5-x
in repository https://gitbox.apache.org/repos/asf/struts.git.


from 71267a9  Revert some changes to be more consistent with 2.6 version
 new 3eb68be  upgrade to ASM 7
 new 13c517f  Merge branch 'struts-2-5-x' into WW-5005
 new 6403de4  Merge pull request #315 from yasserzamani/WW-5005

The 5369 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:
 .../main/java/org/apache/struts2/convention/DefaultClassFinder.java   | 4 ++--
 pom.xml   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)



[struts] branch master updated: Adds a link to JavaDocs

2019-02-04 Thread lukaszlenart
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


The following commit(s) were added to refs/heads/master by this push:
 new a308537  Adds a link to JavaDocs
a308537 is described below

commit a3085373c651573ffbe45bc81da6ddcd5228e0dd
Author: Lukasz Lenart 
AuthorDate: Mon Feb 4 10:57:14 2019 +0100

Adds a link to JavaDocs
---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index a17ccda..c51a1c9 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@ The Apache Struts web framework
 [![Build Status @ 
Jenkins](https://builds.apache.org/buildStatus/icon?job=Struts-master-JDK7)](https://builds.apache.org/view/S-Z/view/Struts/job/Struts-master-JDK7/)
 [![Build Status @ 
Travis](https://travis-ci.org/apache/struts.svg?branch=master)](https://travis-ci.org/apache/struts)
 [![Maven 
Central](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/)
+[![Javadocs](https://javadoc.io/badge/org.apache.struts/struts2-core.svg)](https://javadoc.io/doc/org.apache.struts/struts2-core)
 [![Coverage 
Status](https://coveralls.io/repos/github/apache/struts/badge.svg)](https://coveralls.io/github/apache/struts)
 
[![Dependencies](https://app.updateimpact.com/badge/713283867011846144/Struts%202.svg?config=test)](https://app.updateimpact.com/latest/713283867011846144/Struts%202)
 
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)