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 2019/08/16 01:16:30 UTC

[GitHub] [activemq-artemis] wy96f commented on a change in pull request #2791: ARTEMIS-2450 page-size-bytes should not be greater than Integer.MAX_VALUE

wy96f commented on a change in 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_r314554334
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
 ##########
 @@ -505,6 +505,9 @@ public long getPageSizeBytes() {
    }
 
    public AddressSettings setPageSizeBytes(final long pageSize) {
+      if (pageSize > Integer.MAX_VALUE) {
+         throw new IllegalArgumentException("pageSize must be < " + Integer.MAX_VALUE);
 
 Review comment:
   The AddressSettings maybe persisted in disk, and if we change long to int, we would incorrectly decode it. Does it make sense?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services