You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/12/14 08:55:51 UTC

[GitHub] [activemq-artemis] michaelandrepearce commented on a diff in pull request #4312: ARTEMIS-3993 fixed some MB style uses to use MiB; added support for MiB/GiB/etc in config

michaelandrepearce commented on code in PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#discussion_r1048176649


##########
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java:
##########
@@ -39,9 +39,9 @@ public class ByteUtil {
    private static final String prefix = "^\\s*(\\d+)\\s*";
    private static final String suffix = "(b)?\\s*$";
    private static final Pattern ONE = Pattern.compile(prefix + suffix, Pattern.CASE_INSENSITIVE);
-   private static final Pattern KILO = Pattern.compile(prefix + "k" + suffix, Pattern.CASE_INSENSITIVE);
-   private static final Pattern MEGA = Pattern.compile(prefix + "m" + suffix, Pattern.CASE_INSENSITIVE);
-   private static final Pattern GIGA = Pattern.compile(prefix + "g" + suffix, Pattern.CASE_INSENSITIVE);
+   private static final Pattern KILO = Pattern.compile(prefix + "ki?" + suffix, Pattern.CASE_INSENSITIVE);

Review Comment:
   This will break anyone using existing styles. Add new style support but don't break existing



-- 
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: gitbox-unsubscribe@activemq.apache.org

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