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/13 02:02:41 UTC

[GitHub] [activemq-artemis] erwindon opened a new pull request, #4312: ARTEMIS-3993 fixed some MB style uses to use MiB; added support for MiB/GiB/etc in config

erwindon opened a new pull request, #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312

   See https://issues.apache.org/jira/browse/ARTEMIS-3993


-- 
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


[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

Posted by GitBox <gi...@apache.org>.
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 and depending on that for inputs or output. 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


[GitHub] [activemq-artemis] clebertsuconic 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

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on code in PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#discussion_r1049103282


##########
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:
   @michaelandrepearce I didn't see him changing the style.. just adding  a new one... unless I missed something.



-- 
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


[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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
jbertram merged PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312


-- 
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


[GitHub] [activemq-artemis] erwindon 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

Posted by GitBox <gi...@apache.org>.
erwindon commented on code in PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#discussion_r1048194987


##########
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:
   @michaelandrepearce, that was strictly my intention. the unit test that I added verifies that. how does this break anything?



-- 
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


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

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#issuecomment-1348629171

   can you fix FileConfigurationParserTest.testNotations, and amend your PR with the fix?
   
   other than that LGTM


-- 
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


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

Posted by GitBox <gi...@apache.org>.
erwindon commented on PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#issuecomment-1350197295

   ow! thanks, I will take a look.
   while reviewing my code I realized that the proposed code would also allow adding "i" in trivial sizes, e.g. "12345i". that is now a separate commit. but I'll squash all before un-draft-ing it.


-- 
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


[GitHub] [activemq-artemis] erwindon 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

Posted by GitBox <gi...@apache.org>.
erwindon commented on code in PR #4312:
URL: https://github.com/apache/activemq-artemis/pull/4312#discussion_r1048194987


##########
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:
   Michael, that was strictly my intention. the unit test that I added verifies that. how does this break anything?



-- 
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