From commits-return-18486-archive-asf-public=cust-asf.ponee.io@struts.apache.org Tue Oct 1 06:36:54 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id AE2A7180608 for ; Tue, 1 Oct 2019 08:36:53 +0200 (CEST) Received: (qmail 72550 invoked by uid 500); 1 Oct 2019 06:36:52 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 72541 invoked by uid 99); 1 Oct 2019 06:36:52 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2019 06:36:52 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 7C48081E87; Tue, 1 Oct 2019 06:36:52 +0000 (UTC) Date: Tue, 01 Oct 2019 06:36:52 +0000 To: "commits@struts.apache.org" Subject: [struts] branch master updated: Merge pull request #354 from JCgH4164838Gh792C124B5/localS2_25x_B10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <156991181222.26415.11192002238064591360@gitbox.apache.org> From: lukaszlenart@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: struts X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9453e05559731a4f20e720fa268e25c0040b80c0 X-Git-Newrev: 40d23ac315ce1c283319fd2f6f3507fbdddaedba X-Git-Rev: 40d23ac315ce1c283319fd2f6f3507fbdddaedba X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 40d23ac Merge pull request #354 from JCgH4164838Gh792C124B5/localS2_25x_B10 new ad864ac Merge pull request #368 from JCgH4164838Gh792C124B5/local_26x_CPickPR354 40d23ac is described below commit 40d23ac315ce1c283319fd2f6f3507fbdddaedba Author: Lukasz Lenart AuthorDate: Mon Apr 29 07:42:13 2019 +0200 Merge pull request #354 from JCgH4164838Gh792C124B5/localS2_25x_B10 Minor consistency update correction for WW-5029 fix to the 2.5.x branch (cherry picked from commit bb9ce7582b5b8e021eb458527777db07594e5739) --- .../config/providers/XmlConfigurationProvider.java | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java index 9cd21fb..1613ae2 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java @@ -93,12 +93,12 @@ public class XmlConfigurationProvider implements ConfigurationProvider { private String configFileName; private ObjectFactory objectFactory; - private Set loadedFileUrls = new HashSet<>(); + private final Set loadedFileUrls = new HashSet<>(); private boolean errorIfMissing; private Map dtdMappings; private Configuration configuration; private boolean throwExceptionOnDuplicateBeans = true; - private Map declaredPackages = new HashMap<>(); + private final Map declaredPackages = new HashMap<>(); private FileManager fileManager; private ValueSubstitutor valueSubstitutor; @@ -881,10 +881,12 @@ public class XmlConfigurationProvider implements ConfigurationProvider { final StringBuilder allowedMethodsSB = new StringBuilder(); for (int i = 0; i < allowedMethodsChildren.getLength(); i++) { Node allowedMethodsChildNode = allowedMethodsChildren.item(i); - String childNodeValue = (allowedMethodsChildNode != null ? allowedMethodsChildNode.getNodeValue() : ""); - childNodeValue = (childNodeValue != null ? childNodeValue.trim() : ""); - if (childNodeValue.length() > 0) { - allowedMethodsSB.append(childNodeValue); + if (allowedMethodsChildNode != null && allowedMethodsChildNode.getNodeType() == Node.TEXT_NODE) { + String childNodeValue = allowedMethodsChildNode.getNodeValue(); + childNodeValue = (childNodeValue != null ? childNodeValue.trim() : ""); + if (childNodeValue.length() > 0) { + allowedMethodsSB.append(childNodeValue); + } } } if (allowedMethodsSB.length() > 0) { @@ -951,10 +953,12 @@ public class XmlConfigurationProvider implements ConfigurationProvider { final StringBuilder globalAllowedMethodsSB = new StringBuilder(); for (int i = 0; i < globaAllowedMethodsChildren.getLength(); i++) { Node globalAllowedMethodsChildNode = globaAllowedMethodsChildren.item(i); - String childNodeValue = (globalAllowedMethodsChildNode != null ? globalAllowedMethodsChildNode.getNodeValue() : ""); - childNodeValue = (childNodeValue != null ? childNodeValue.trim() : ""); - if (childNodeValue.length() > 0) { - globalAllowedMethodsSB.append(childNodeValue); + if (globalAllowedMethodsChildNode != null && globalAllowedMethodsChildNode.getNodeType() == Node.TEXT_NODE) { + String childNodeValue = globalAllowedMethodsChildNode.getNodeValue(); + childNodeValue = (childNodeValue != null ? childNodeValue.trim() : ""); + if (childNodeValue.length() > 0) { + globalAllowedMethodsSB.append(childNodeValue); + } } } if (globalAllowedMethodsSB.length() > 0) {