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 2023/02/26 13:38:08 UTC

[maven] branch dom created (now 06cd7c11a)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch dom
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 06cd7c11a remove unused code

This branch includes the following new commits:

     new 06cd7c11a remove unused code

The 1 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] 01/01: remove unused code

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch dom
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 06cd7c11ab4fb47798849d1694423657ec4f512f
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun Feb 26 08:37:55 2023 -0500

    remove unused code
---
 .../src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java          | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java
index 59818320a..b64a2d0cf 100644
--- a/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java
+++ b/maven-xml-impl/src/main/java/org/codehaus/plexus/util/xml/Xpp3Dom.java
@@ -27,7 +27,6 @@ import java.util.Map;
 
 import org.apache.maven.api.xml.XmlNode;
 import org.apache.maven.internal.xml.XmlNodeImpl;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlSerializer;
 
 /**
@@ -36,8 +35,6 @@ import org.codehaus.plexus.util.xml.pull.XmlSerializer;
 public class Xpp3Dom implements Serializable {
     private static final String[] EMPTY_STRING_ARRAY = new String[0];
 
-    private static final Xpp3Dom[] EMPTY_DOM_ARRAY = new Xpp3Dom[0];
-
     public static final String CHILDREN_COMBINATION_MODE_ATTRIBUTE = "combine.children";
 
     public static final String CHILDREN_COMBINATION_MERGE = "merge";
@@ -157,7 +154,7 @@ public class Xpp3Dom implements Serializable {
      * @since 3.4.0
      */
     public boolean removeAttribute(String name) {
-        if (!StringUtils.isEmpty(name)) {
+        if (name != null && !name.isEmpty()) {
             Map<String, String> attrs = new HashMap<>(dom.getAttributes());
             boolean ret = attrs.remove(name) != null;
             if (ret) {