You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/06/22 22:13:50 UTC

[maven-shared-utils] branch MSHARED-431 updated (3e44168 -> 76605ac)

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

slachiewicz pushed a change to branch MSHARED-431
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git.


    omit 3e44168  [MSHARED-431] Escape arguments including hash-signs
     add 9eb17dd  deprecate equals in favor of Objects.equals() (#50)
     add cd25a37  deprecate defaultString since it's now in the JDK (#51)
     add be2a1a1  clean up JavaDoc (#52)
     add 5c98cb9  fix deprecated methods and warnings
     add b09cf40  Merge pull request #49 from apache/string
     add d63328f  Restore space between referenced parameter and its description
     add 5a1ece5  Remove useless check
     add 8159ddb  Remove unused containers
     new 76605ac  [MSHARED-431] Escape arguments including hash-signs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3e44168)
            \
             N -- N -- N   refs/heads/MSHARED-431 (76605ac)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../org/apache/maven/shared/utils/StringUtils.java | 218 ++++++++++-----------
 .../apache/maven/shared/utils/cli/shell/Shell.java |   2 +-
 .../maven/shared/utils/xml/Xpp3DomBuilder.java     |  31 ---
 .../shared/utils/xml/PrettyPrintXmlWriterTest.java |   5 -
 4 files changed, 108 insertions(+), 148 deletions(-)


[maven-shared-utils] 01/01: [MSHARED-431] Escape arguments including hash-signs

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

slachiewicz pushed a commit to branch MSHARED-431
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit 76605ac236ee5fb64062581209e8ee941efcea77
Author: Rob Oxspring <ro...@imapmail.org>
AuthorDate: Wed May 27 21:49:20 2020 +0100

    [MSHARED-431] Escape arguments including hash-signs
---
 src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java | 2 +-
 .../java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java b/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
index 1793cbb..02586af 100644
--- a/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
+++ b/src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
@@ -34,7 +34,7 @@ public class BourneShell
     private static final char DOUBLE_QUOTATION = '"';
 
     private static final char[] BASH_QUOTING_TRIGGER_CHARS =
-        { ' ', '$', ';', '&', '|', '<', '>', '*', '?', '(', ')', '[', ']', '{', '}', '`' };
+        { ' ', '$', ';', '&', '|', '<', '>', '*', '?', '(', ')', '[', ']', '{', '}', '`', '#' };
 
     /**
      * Create instance of BourneShell.
diff --git a/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java b/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java
index c83287c..7d5c456 100644
--- a/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java
+++ b/src/test/java/org/apache/maven/shared/utils/cli/shell/BourneShellTest.java
@@ -186,13 +186,14 @@ public class BourneShellTest
         commandline.createArg().setValue( "{" );
         commandline.createArg().setValue( "}" );
         commandline.createArg().setValue( "`" );
+        commandline.createArg().setValue( "#" );
 
         List<String> lines = commandline.getShell().getShellCommandLine( commandline.getArguments() );
         System.out.println( lines  );
 
         assertEquals( "/bin/sh", lines.get( 0 ) );
         assertEquals( "-c", lines.get( 1 ) );
-        assertEquals( "chmod \" \" \"|\" \"&&\" \"||\" \";\" \";;\" \"&\" \"()\" \"<\" \"<<\" \">\" \">>\" \"*\" \"?\" \"[\" \"]\" \"{\" \"}\" \"`\"",
+        assertEquals( "chmod \" \" \"|\" \"&&\" \"||\" \";\" \";;\" \"&\" \"()\" \"<\" \"<<\" \">\" \">>\" \"*\" \"?\" \"[\" \"]\" \"{\" \"}\" \"`\" \"#\"",
                       lines.get( 2 ) );
     }