[1/2] struts git commit: WW-4861 Adds fallback to lookup container using ActionContext

2017-09-19 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master bca42a209 -> 50a0a72e9


WW-4861 Adds fallback to lookup container using ActionContext


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/50a0a72e
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/50a0a72e
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/50a0a72e

Branch: refs/heads/master
Commit: 50a0a72e9d4bcf96bdcb6e1d9adaefa8c11f19e8
Parents: d41bd50
Author: Lukasz Lenart 
Authored: Tue Sep 19 09:24:08 2017 +0200
Committer: Lukasz Lenart 
Committed: Tue Sep 19 09:26:20 2017 +0200

--
 .../com/opensymphony/xwork2/ActionSupport.java  | 26 
 1 file changed, 26 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/50a0a72e/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
--
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java 
b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
index cb1ac47..7d79471 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
@@ -19,6 +19,9 @@ import com.opensymphony.xwork2.inject.Container;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.interceptor.ValidationAware;
 import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.StrutsConstants;
 
 import java.io.Serializable;
 import java.util.*;
@@ -29,6 +32,8 @@ import java.util.*;
  */
 public class ActionSupport implements Action, Validateable, ValidationAware, 
TextProvider, LocaleProvider, Serializable {
 
+private static final Logger LOG = 
LogManager.getLogger(ActionSupport.class);
+
 private final ValidationAwareSupport validationAware = new 
ValidationAwareSupport();
 
 private transient TextProvider textProvider;
@@ -274,6 +279,7 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
  * @return reference to field with TextProvider
  */
 protected TextProvider getTextProvider() {
+checkContainer();
 if (textProvider == null) {
 TextProviderFactory tpf = 
container.getInstance(TextProviderFactory.class);
 textProvider = tpf.createInstance(getClass());
@@ -282,6 +288,7 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
 }
 
 protected LocaleProvider getLocaleProvider() {
+checkContainer();
 if (localeProvider == null) {
 LocaleProviderFactory localeProviderFactory = 
container.getInstance(LocaleProviderFactory.class);
 localeProvider = localeProviderFactory.createLocaleProvider();
@@ -289,6 +296,25 @@ public class ActionSupport implements Action, 
Validateable, ValidationAware, Tex
 return localeProvider;
 }
 
+/**
+ * TODO: This a temporary solution, maybe we should consider stop 
injecting container into beans
+ */
+private void checkContainer() {
+if (container == null) {
+container = ActionContext.getContext().getContainer();
+if (container != null) {
+boolean devMode = 
Boolean.parseBoolean(container.getInstance(String.class, 
StrutsConstants.STRUTS_DEVMODE));
+if (devMode) {
+LOG.warn("Container is null, action was created manually? 
Fallback to ActionContext");
+} else {
+LOG.debug("Container is null, action was created manually? 
Fallback to ActionContext");
+}
+} else {
+LOG.warn("Container is null, action was created out of 
ActionContext scope?!?");
+}
+}
+}
+
 @Inject
 public void setContainer(Container container) {
 this.container = container;



[2/2] struts git commit: WW-4859 WW-4860 Upgrades jackson and json-lib jars

2017-09-19 Thread lukaszlenart
WW-4859 WW-4860 Upgrades jackson and json-lib jars


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d41bd50a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d41bd50a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d41bd50a

Branch: refs/heads/master
Commit: d41bd50a6ef5ddc14dd0502fd9cd36dff09e9e6c
Parents: bca42a2
Author: Lukasz Lenart 
Authored: Tue Sep 19 09:19:42 2017 +0200
Committer: Lukasz Lenart 
Committed: Tue Sep 19 09:26:20 2017 +0200

--
 plugins/rest/pom.xml |  5 -
 pom.xml  | 13 -
 2 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/d41bd50a/plugins/rest/pom.xml
--
diff --git a/plugins/rest/pom.xml b/plugins/rest/pom.xml
index caa6808..f85b496 100644
--- a/plugins/rest/pom.xml
+++ b/plugins/rest/pom.xml
@@ -34,7 +34,6 @@
 jar
 
 
-2.6.1
 UTF-8
 
 
@@ -52,14 +51,10 @@
 
 com.fasterxml.jackson.core
 jackson-core
-${jackson.version}
-compile
 
 
 com.fasterxml.jackson.core
 jackson-databind
-${jackson.version}
-compile
 
 
 

http://git-wip-us.apache.org/repos/asf/struts/blob/d41bd50a/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5af929e..3a83b32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -919,7 +919,18 @@
 net.sf.json-lib
 json-lib
 jdk15
-2.3
+2.4
+
+
+
+com.fasterxml.jackson.core
+jackson-core
+2.8.2
+
+
+com.fasterxml.jackson.core
+jackson-databind
+2.8.2
 
 
 



struts git commit: WW-4861 Makes code more re-usable

2017-09-19 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/master 50a0a72e9 -> fe31a24b7


WW-4861 Makes code more re-usable


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/fe31a24b
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/fe31a24b
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/fe31a24b

Branch: refs/heads/master
Commit: fe31a24b74719b5583c38139f64532b51bb6e915
Parents: 50a0a72
Author: Lukasz Lenart 
Authored: Tue Sep 19 10:27:57 2017 +0200
Committer: Lukasz Lenart 
Committed: Tue Sep 19 10:27:57 2017 +0200

--
 core/src/main/java/com/opensymphony/xwork2/ActionSupport.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/fe31a24b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
--
diff --git a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java 
b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
index 7d79471..434e699 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
@@ -279,8 +279,8 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
  * @return reference to field with TextProvider
  */
 protected TextProvider getTextProvider() {
-checkContainer();
 if (textProvider == null) {
+Container container = getContainer();
 TextProviderFactory tpf = 
container.getInstance(TextProviderFactory.class);
 textProvider = tpf.createInstance(getClass());
 }
@@ -288,8 +288,8 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
 }
 
 protected LocaleProvider getLocaleProvider() {
-checkContainer();
 if (localeProvider == null) {
+Container container = getContainer();
 LocaleProviderFactory localeProviderFactory = 
container.getInstance(LocaleProviderFactory.class);
 localeProvider = localeProviderFactory.createLocaleProvider();
 }
@@ -299,7 +299,7 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
 /**
  * TODO: This a temporary solution, maybe we should consider stop 
injecting container into beans
  */
-private void checkContainer() {
+protected Container getContainer() {
 if (container == null) {
 container = ActionContext.getContext().getContainer();
 if (container != null) {
@@ -313,6 +313,7 @@ public class ActionSupport implements Action, Validateable, 
ValidationAware, Tex
 LOG.warn("Container is null, action was created out of 
ActionContext scope?!?");
 }
 }
+return container;
 }
 
 @Inject



struts-site git commit: Fixes link of "Google’s Patch Reward program"

2017-09-19 Thread lukaszlenart
Repository: struts-site
Updated Branches:
  refs/heads/master beef7d4f2 -> 52e23ede2


Fixes link of "Google’s Patch Reward program"


Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/52e23ede
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/52e23ede
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/52e23ede

Branch: refs/heads/master
Commit: 52e23ede2bd15dd5b0c96235b62bcffa1dd5dbe9
Parents: beef7d4
Author: Yasser Zamani 
Authored: Tue Sep 19 12:51:51 2017 +0330
Committer: Yasser Zamani 
Committed: Tue Sep 19 12:51:51 2017 +0330

--
 source/index.html| 2 +-
 source/submitting-patches.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-site/blob/52e23ede/source/index.html
--
diff --git a/source/index.html b/source/index.html
index 60f7ff6..87da707 100644
--- a/source/index.html
+++ b/source/index.html
@@ -27,7 +27,7 @@ title: Welcome to the Apache Struts project
 During http://www.meetup.com/sfhtml5/";>SFHTML5 Google 
announced that
   they extend their program to cover the Apache Struts project as 
well. Now you can earn
   money preparing patches for us!
-  read more
+  read 
more
 
   
   

http://git-wip-us.apache.org/repos/asf/struts-site/blob/52e23ede/source/submitting-patches.md
--
diff --git a/source/submitting-patches.md b/source/submitting-patches.md
index a971c90..38e6ff2 100644
--- a/source/submitting-patches.md
+++ b/source/submitting-patches.md
@@ -153,7 +153,7 @@ after pushing changes, `asfbot` will close the PR at GitHub.
 
  * [Git at Apache](http://wiki.apache.org/general/GitAtApache)
 
-# Google's Patch Reward program {#patch-reward}
+## Google's Patch Reward program
 
 During [SFHTML5](http://www.meetup.com/sfhtml5/) Google announced that they 
adding the Apache Struts project to
 [the Google's Security Patch Reward 
Program](https://www.google.com/about/appsecurity/patch-rewards/).



struts-site git commit: Updates production by Jenkins

2017-09-19 Thread git-site-role
Repository: struts-site
Updated Branches:
  refs/heads/asf-site 705a6aaf2 -> a299b067f


Updates production by Jenkins


Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/a299b067
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/a299b067
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/a299b067

Branch: refs/heads/asf-site
Commit: a299b067f41a28f02e7e46d9df2f46f69f9d6771
Parents: 705a6aa
Author: jenkins 
Authored: Tue Sep 19 09:46:20 2017 +
Committer: jenkins 
Committed: Tue Sep 19 09:46:20 2017 +

--
 content/index.html  | 2 +-
 content/submitting-patches.html | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-site/blob/a299b067/content/index.html
--
diff --git a/content/index.html b/content/index.html
index 9d2cf19..90bc435 100644
--- a/content/index.html
+++ b/content/index.html
@@ -147,7 +147,7 @@
 During http://www.meetup.com/sfhtml5/";>SFHTML5 Google 
announced that
   they extend their program to cover the Apache Struts project as 
well. Now you can earn
   money preparing patches for us!
-  read more
+  read 
more
 
   
   

http://git-wip-us.apache.org/repos/asf/struts-site/blob/a299b067/content/submitting-patches.html
--
diff --git a/content/submitting-patches.html b/content/submitting-patches.html
index 17bfda5..ac5db92 100644
--- a/content/submitting-patches.html
+++ b/content/submitting-patches.html
@@ -137,7 +137,7 @@
 
   
   Further 
reading
-  Google’s Patch 
Reward program
+  Google’s Patch Reward 
program
 
 
 Committers
@@ -326,7 +326,7 @@ git merge some-branch -m "WW- Merges #28 which resolves 
..."
   http://wiki.apache.org/general/GitAtApache";>Git at 
Apache
 
 
-Google’s Patch Reward program
+Google’s Patch Reward program
 
 During http://www.meetup.com/sfhtml5/";>SFHTML5 Google 
announced that they adding the Apache Struts project to
 https://www.google.com/about/appsecurity/patch-rewards/";>the 
Google’s Security Patch Reward Program.



struts-site git commit: Adds missing internal anchors in "How To Help FAQ" page

2017-09-19 Thread lukaszlenart
Repository: struts-site
Updated Branches:
  refs/heads/master 52e23ede2 -> d48f09f13


Adds missing internal anchors in "How To Help FAQ" page


Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/d48f09f1
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/d48f09f1
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/d48f09f1

Branch: refs/heads/master
Commit: d48f09f13d3cb992e5feeef1c3a4c2593bef5683
Parents: 52e23ed
Author: Yasser Zamani 
Authored: Tue Sep 19 13:43:55 2017 +0330
Committer: Yasser Zamani 
Committed: Tue Sep 19 13:43:55 2017 +0330

--
 source/helping.md | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-site/blob/d48f09f1/source/helping.md
--
diff --git a/source/helping.md b/source/helping.md
index 4f25cf0..57e5f9c 100644
--- a/source/helping.md
+++ b/source/helping.md
@@ -35,7 +35,7 @@ title: Helping
   We don't sell Struts for money, but anyone who wants to be our customer can 
pay us back by donating
   the time and energy that money represents.
 
-  - ### How do I create a patch?
+  - ### How do I create a patch? {#patches}
 
   A patch is a machine-readable script that can automatically recreate a 
change to a text file,
   including source code and documentation. The patch format is also 
human-readable. Developers often pass
@@ -65,7 +65,7 @@ title: Helping
   The [NetBeans 
community](http://www.netbeans.org/community/contribute/patches.html) also has 
a helpful section on the
   subject of creating patches.
 
-  - ### How can I report defects or suggest features?
+  - ### How can I report defects or suggest features? {#issues}
 
   Tracking of defect reports and enhancement suggestions for Apache Struts 
products is handled through the
   [Apache Struts JIRA instance](https://issues.apache.org/jira/browse/WW).
@@ -88,7 +88,7 @@ title: Helping
 
   Feature suggestions are also maintained in the [JIRA issue 
tracker](https://issues.apache.org/jira/browse/WW).
 
-  - ### How can I contribute to the Struts source code?
+  - ### How can I contribute to the Struts source code? {#contribute}
 
   A very good place to start is by **reviewing the list of open issues** and 
pending feature suggestions in the
   [issue tracker](#issues).
@@ -111,7 +111,7 @@ title: Helping
   You can try to fake what a JSP container does, but a much more reliable 
testing regime would actually execute
   the tag in a real container.
 
-  - ### How can I contribute to the documentation?
+  - ### How can I contribute to the documentation? {#documentation}
 
   The Struts 2 documentation is maintained using the Atlassian Confluence wiki 
software and automatically
   exported to HTML for viewing on the website. To help with the Struts 2 
documentation, you must create
@@ -126,7 +126,7 @@ title: Helping
   in relation to the rest of the documentation.
   Again, someone has to figure that out before it can be added, and that 
someone might as well be you.
 
-  - ### So when is the next release coming out?
+  - ### So when is the next release coming out? {#release}
 
   Here is the truth regarding releases:
 
@@ -158,7 +158,7 @@ title: Helping
   and keep an eye on what is coming down the pipeline.
   This way you are at least forewarned and forearmed.
 
-  - ### What can I do to help the next release along?
+  - ### What can I do to help the next release along? {#release_help}
 
 - Most importantly, download the latest [nightly 
build](builds.html#NightlyBuilds) or development release
   and test it against your own applications. Report any and all issues or 
suspected issues to
@@ -192,7 +192,7 @@ title: Helping
   If Developers are supporting each other on the lists, the Committers 
have more time to spend on the next
   release.
 
-  - ### How can I help make the decisions?
+  - ### How can I help make the decisions? {#decides_help}
 
   A guiding principle of the Apache Software Foundation is "them that do the 
work, make the decisions".
   This phrase is actually a double-entendre. A project will make some 
decisions by voting (very few),



struts-site git commit: Updates production by Jenkins

2017-09-19 Thread git-site-role
Repository: struts-site
Updated Branches:
  refs/heads/asf-site a299b067f -> 08f875300


Updates production by Jenkins


Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/08f87530
Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/08f87530
Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/08f87530

Branch: refs/heads/asf-site
Commit: 08f87530047f24e3cd8e2c4831316cb8b29ed961
Parents: a299b06
Author: jenkins 
Authored: Tue Sep 19 10:38:17 2017 +
Committer: jenkins 
Committed: Tue Sep 19 10:38:17 2017 +

--
 content/helping.html | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-site/blob/08f87530/content/helping.html
--
diff --git a/content/helping.html b/content/helping.html
index 0b27e2f..96a1431 100644
--- a/content/helping.html
+++ b/content/helping.html
@@ -130,13 +130,13 @@
 
 
   What can 
my company do to help support Apache Struts?
-  How do I create a patch?
-  How can I report 
defects or suggest features?
-  How can I 
contribute to the Struts source code?
-  How can I 
contribute to the documentation?
-  So when is the next 
release coming out?
-  What can I do to 
help the next release along?
-  How can I help make the 
decisions?
+  How do I create a 
patch?
+  How can I report defects or 
suggest features?
+  How can I contribute 
to the Struts source code?
+  How can I 
contribute to the documentation?
+  So when is the next release 
coming out?
+  What can I do to 
help the next release along?
+  How can I help 
make the decisions?
 
 
 
@@ -171,7 +171,7 @@
 
 
   
-How do I create a patch?
+How do I create a patch?
   
 
 
@@ -206,7 +206,7 @@
 
 
   
-How can I report 
defects or suggest features?
+How can I report defects or suggest features?
   
 
 
@@ -233,7 +233,7 @@
 
 
   
-How can I 
contribute to the Struts source code?
+How can I contribute to the Struts source code?
   
 
 
@@ -260,7 +260,7 @@
 
 
   
-How can I contribute to 
the documentation?
+How can I contribute to the documentation?
   
 
 
@@ -279,7 +279,7 @@
 
 
   
-So when is the next 
release coming out?
+So when is the next release coming out?
   
 
 
@@ -315,7 +315,7 @@
 
 
   
-What can I do to 
help the next release along?
+What can I do to help the next release along?
 
 
   
@@ -359,7 +359,7 @@ release.
 
   
   
-How can I help make the 
decisions?
+How can I help make the decisions?