You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2022/11/25 13:13:06 UTC
[maven-shared-utils] branch element created (now 92fb6c4)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch element
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
at 92fb6c4 stricter type
This branch includes the following new commits:
new 25405c1 be more careful about stripping whitespace
new 92fb6c4 stricter type
The 2 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.
[maven-shared-utils] 02/02: stricter type
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch element
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
commit 92fb6c4b633455df41ca1963dc971c9505296b35
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Nov 25 08:12:53 2022 -0500
stricter type
---
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
index 8e7e304..777a064 100644
--- a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
+++ b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
@@ -248,8 +248,8 @@ public class Xpp3DomBuilder
Xpp3Dom element = pop();
- /* this Object could be null if it is a singleton tag */
- Object accumulatedValue = values.remove( depth );
+ /* this StringBuilder could be null if it is a singleton tag */
+ StringBuilder accumulatedValue = values.remove( depth );
if ( element.getChildCount() == 0 )
{
[maven-shared-utils] 01/02: be more careful about stripping whitespace
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch element
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
commit 25405c1f1368dcdb81785a8061ece9034d5d0d9b
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Nov 25 08:11:07 2022 -0500
be more careful about stripping whitespace
---
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
index 2b8f4ab..8e7e304 100644
--- a/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
+++ b/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilder.java
@@ -259,7 +259,8 @@ public class Xpp3DomBuilder
}
else
{
- element.setValue( accumulatedValue.toString() );
+ String text = accumulatedValue.toString();
+ element.setValue( ( trim && !spacePreserve ) ? text.trim() : text );
}
}
@@ -274,7 +275,7 @@ public class Xpp3DomBuilder
throws SAXException
{
String text = new String( ch, start, length );
- appendToTopValue( ( trim && !spacePreserve ) ? text.trim() : text );
+ appendToTopValue( text );
}
private void appendToTopValue( String toAppend )