You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2023/08/17 08:56:31 UTC

[GitHub] [maven-archiver] slawekjaranowski commented on a diff in pull request #42: [MSHARED-1297] Prefer JDK features over plexus-utils, plexus-io

slawekjaranowski commented on code in PR #42:
URL: https://github.com/apache/maven-archiver/pull/42#discussion_r1296895957


##########
src/main/java/org/apache/maven/archiver/MavenArchiver.java:
##########
@@ -800,6 +800,21 @@ public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp
         }
     }
 
+    private static boolean isNumeric(String str) {
+
+        if (str.isEmpty()) {
+            return false;
+        }
+
+        for (char c : str.toCharArray()) {
+            if (!Character.isDigit(c)) {

Review Comment:
   It is simple copy method from plexu-utils ...
   https://github.com/codehaus-plexus/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/StringUtils.java#L1749
   
   I think it is enough for our case - if user provide a special chars Long.parseLong simply throw exception if needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org