[struts] branch master updated: [WW-5121] Fix: remove contention during Scope.SINGLETON injection
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 cb2c67e [WW-5121] Fix: remove contention during Scope.SINGLETON injection new 49a4d6d Merge pull request #478 from davoustp/contention-in-singleton-injection-2.6.x cb2c67e is described below commit cb2c67e8085107e7c21dfdf20187e36d1bd5d864 Author: Pascal Davoust AuthorDate: Mon Mar 22 09:37:14 2021 +0100 [WW-5121] Fix: remove contention during Scope.SINGLETON injection --- core/src/main/java/com/opensymphony/xwork2/inject/Scope.java | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java index 86592bb..3974d6c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java +++ b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java @@ -44,15 +44,17 @@ public enum Scope { @Override InternalFactory scopeFactory(Class type, String name, final InternalFactory factory) { return new InternalFactory() { -T instance; +volatile T instance; public T create(InternalContext context) { -synchronized (context.getContainer()) { -if (instance == null) { -instance = InitializableFactory.wrapIfNeeded(factory).create(context); +if (instance == null) { +synchronized (context.getContainer()) { +if (instance == null) { +instance = InitializableFactory.wrapIfNeeded(factory).create(context); +} } -return instance; } +return instance; } @Override
[struts] branch struts-2-5-x updated: [WW-5121] Fix: remove contention during Scope.SINGLETON injection
This is an automated email from the ASF dual-hosted git repository. yasserzamani 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 ce8b75d [WW-5121] Fix: remove contention during Scope.SINGLETON injection new 7e912a2 Merge pull request #479 from davoustp/contention-in-singleton-injection-2.5.x ce8b75d is described below commit ce8b75de58cca46dade40d76d5d421be5ff808ba Author: Pascal Davoust AuthorDate: Mon Mar 22 09:40:02 2021 +0100 [WW-5121] Fix: remove contention during Scope.SINGLETON injection --- core/src/main/java/com/opensymphony/xwork2/inject/Scope.java | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java index 86592bb..3974d6c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java +++ b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java @@ -44,15 +44,17 @@ public enum Scope { @Override InternalFactory scopeFactory(Class type, String name, final InternalFactory factory) { return new InternalFactory() { -T instance; +volatile T instance; public T create(InternalContext context) { -synchronized (context.getContainer()) { -if (instance == null) { -instance = InitializableFactory.wrapIfNeeded(factory).create(context); +if (instance == null) { +synchronized (context.getContainer()) { +if (instance == null) { +instance = InitializableFactory.wrapIfNeeded(factory).create(context); +} } -return instance; } +return instance; } @Override
[struts] branch WW-5117-reorders-stack updated (4afa345 -> af6d386)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch WW-5117-reorders-stack in repository https://gitbox.apache.org/repos/asf/struts.git. from 4afa345 WW-5117 Moves action on top just before the tag add af6d386 WW-5117 Adds more consistent logic to set action on top of the stack No new revisions were added by this update. Summary of changes: .../template/FreemarkerTemplateEngine.java | 11 +++--- .../apache/struts2/views/jsp/ui/HiddenTest.java| 40 ++ 2 files changed, 40 insertions(+), 11 deletions(-)