[ 
https://issues.apache.org/jira/browse/ARTEMIS-2450?focusedWorklogId=297251&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-297251
 ]

ASF GitHub Bot logged work on ARTEMIS-2450:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Aug/19 16:11
            Start Date: 19/Aug/19 16:11
    Worklog Time Spent: 10m 
      Work Description: michaelpearce-gain commented on pull request #2791: 
ARTEMIS-2450 page-size-bytes should not be greater than Integer.MAX_VALUE
URL: https://github.com/apache/activemq-artemis/pull/2791#discussion_r315293775
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java
 ##########
 @@ -122,6 +122,30 @@ public void validate(final String name, final Object 
value) {
       }
    };
 
+   public static final Validator POSITIVE_INT = new Validator() {
+      @Override
+      public void validate(final String name, final Object value) {
+         Number val = (Number) value;
+         if (val.longValue() > 0 && val.longValue() <= Integer.MAX_VALUE) {
+            // OK
+         } else {
+            throw ActiveMQMessageBundle.BUNDLE.inRangeOfPositiveInt(name, val);
+         }
+      }
+   };
+
+   public static final Validator MINUS_ONE_OR_POSITIVE_INT = new Validator() {
 
 Review comment:
   ignore i spotted, why finally, its because GB etc can be used in the string 
type, and then converted as such cannot limit this in xsd.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 297251)
    Time Spent: 5h  (was: 4h 50m)

> page-size-bytes should not be greater than Integer.MAX_VALUE
> ------------------------------------------------------------
>
>                 Key: ARTEMIS-2450
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2450
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>            Reporter: yangwei
>            Priority: Major
>          Time Spent: 5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to