[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:18
Start Date: 19/Aug/19 16:18
Worklog Time Spent: 10m 
  Work Description: asfgit 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
 
 
   
 

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: 297257)
Time Spent: 5h 20m  (was: 5h 10m)

> 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 20m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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_r315293725
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
 Review comment:
   ignore i was wrong, i see the issue.
 

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: 297250)
Time Spent: 4h 50m  (was: 4h 40m)

> 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: 4h 50m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-2450?focusedWorklogId=297251=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)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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_r315293926
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -597,11 +597,11 @@ public void parseMainConfig(final Element e, final 
Configuration config) throws
 
   config.setJournalSyncNonTransactional(getBoolean(e, 
"journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
 
-  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.GT_ZERO));
+  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.POSITIVE_INT));
 
 Review comment:
   ignore i spotted why you need.
 

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: 297252)
Time Spent: 5h 10m  (was: 5h)

> 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 10m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:10
Start Date: 19/Aug/19 16:10
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_r315293589
 
 

 ##
 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() {
 
 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: 297249)
Time Spent: 4h 40m  (was: 4.5h)

> 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: 4h 40m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:09
Start Date: 19/Aug/19 16:09
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_r315289774
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -597,11 +597,11 @@ public void parseMainConfig(final Element e, final 
Configuration config) throws
 
   config.setJournalSyncNonTransactional(getBoolean(e, 
"journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
 
-  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.GT_ZERO));
+  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.POSITIVE_INT));
 
   int journalBufferTimeout = getInteger(e, "journal-buffer-timeout", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, Validators.GE_ZERO);
 
-  int journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.GT_ZERO);
+  int journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.POSITIVE_INT);
 
 Review comment:
   change was not needed here.
 

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: 297243)
Time Spent: 4h 10m  (was: 4h)

> 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: 4h 10m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:09
Start Date: 19/Aug/19 16:09
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_r315289391
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
 ##
 @@ -364,7 +364,7 @@ public void testDefaults() {
   assertEquals("a2.2", 
conf.getAddressesSettings().get("a2").getExpiryAddress().toString());
   assertEquals(5, 
conf.getAddressesSettings().get("a2").getRedeliveryDelay());
   assertEquals(932489234928324L, 
conf.getAddressesSettings().get("a2").getMaxSizeBytes());
-  assertEquals(7126716262626L, 
conf.getAddressesSettings().get("a2").getPageSizeBytes());
+  assertEquals(712671626L, 
conf.getAddressesSettings().get("a2").getPageSizeBytes());
 
 Review comment:
   should now be int, no need for L
 

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: 297242)
Time Spent: 4h  (was: 3h 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: 4h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:09
Start Date: 19/Aug/19 16:09
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_r315288710
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
   long maxRetryInterval = getLong(e, "max-retry-interval", 
ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), 
Validators.GT_ZERO);
 
   int initialConnectAttempts = getInteger(e, "initial-connect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
   int reconnectAttempts = getInteger(e, "reconnect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
-  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.GT_ZERO);
+  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.POSITIVE_INT);
 
 Review comment:
   revert not 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 297246)
Time Spent: 4.5h  (was: 4h 20m)

> 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: 4.5h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:09
Start Date: 19/Aug/19 16:09
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_r315288862
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
   long maxRetryInterval = getLong(e, "max-retry-interval", 
ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), 
Validators.GT_ZERO);
 
   int initialConnectAttempts = getInteger(e, "initial-connect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
   int reconnectAttempts = getInteger(e, "reconnect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
-  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.GT_ZERO);
+  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.POSITIVE_INT);
 
-  int producerWindowSize = getTextBytesAsIntBytes(e, 
"producer-window-size", 
ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), 
Validators.MINUS_ONE_OR_GT_ZERO);
+  int producerWindowSize = getTextBytesAsIntBytes(e, 
"producer-window-size", 
ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), 
Validators.MINUS_ONE_OR_POSITIVE_INT);
 
 Review comment:
   revert not 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 297245)
Time Spent: 4h 20m  (was: 4h 10m)

> 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: 4h 20m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:03
Start Date: 19/Aug/19 16:03
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_r315288204
 
 

 ##
 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:
   again not needed, if the xsd is corrected to correct type, as it would 
ensure type size bound. also ensruing xsd is correct, allows end users to use 
the xsd to pre validate.
 

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: 297237)
Time Spent: 3h 50m  (was: 3h 40m)

> 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: 3h 50m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:02
Start Date: 19/Aug/19 16:02
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_r315290001
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -597,11 +597,11 @@ public void parseMainConfig(final Element e, final 
Configuration config) throws
 
   config.setJournalSyncNonTransactional(getBoolean(e, 
"journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
 
-  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.GT_ZERO));
+  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.POSITIVE_INT));
 
 Review comment:
   change was not needed here, int range should all be validated by xsd type.
 

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: 297235)
Time Spent: 3.5h  (was: 3h 20m)

> 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: 3.5h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:02
Start Date: 19/Aug/19 16:02
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_r315287789
 
 

 ##
 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() {
 
 Review comment:
   This isnt needed, simply change the xsd defination to int and it would fail
 

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: 297236)
Time Spent: 3h 40m  (was: 3.5h)

> 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: 3h 40m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:01
Start Date: 19/Aug/19 16:01
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_r315289774
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -597,11 +597,11 @@ public void parseMainConfig(final Element e, final 
Configuration config) throws
 
   config.setJournalSyncNonTransactional(getBoolean(e, 
"journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
 
-  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.GT_ZERO));
+  config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", 
config.getJournalFileSize(), Validators.POSITIVE_INT));
 
   int journalBufferTimeout = getInteger(e, "journal-buffer-timeout", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, Validators.GE_ZERO);
 
-  int journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.GT_ZERO);
+  int journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", 
config.getJournalType() == JournalType.ASYNCIO ? 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : 
ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.POSITIVE_INT);
 
 Review comment:
   change was not needed here.
 

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: 297234)
Time Spent: 3h 20m  (was: 3h 10m)

> 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: 3h 20m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 16:01
Start Date: 19/Aug/19 16:01
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_r315289391
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
 ##
 @@ -364,7 +364,7 @@ public void testDefaults() {
   assertEquals("a2.2", 
conf.getAddressesSettings().get("a2").getExpiryAddress().toString());
   assertEquals(5, 
conf.getAddressesSettings().get("a2").getRedeliveryDelay());
   assertEquals(932489234928324L, 
conf.getAddressesSettings().get("a2").getMaxSizeBytes());
-  assertEquals(7126716262626L, 
conf.getAddressesSettings().get("a2").getPageSizeBytes());
+  assertEquals(712671626L, 
conf.getAddressesSettings().get("a2").getPageSizeBytes());
 
 Review comment:
   should now be int, no need for L
 

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: 297232)
Time Spent: 3h 10m  (was: 3h)

> 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: 3h 10m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 15:59
Start Date: 19/Aug/19 15:59
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_r315288862
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
   long maxRetryInterval = getLong(e, "max-retry-interval", 
ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), 
Validators.GT_ZERO);
 
   int initialConnectAttempts = getInteger(e, "initial-connect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
   int reconnectAttempts = getInteger(e, "reconnect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
-  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.GT_ZERO);
+  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.POSITIVE_INT);
 
-  int producerWindowSize = getTextBytesAsIntBytes(e, 
"producer-window-size", 
ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), 
Validators.MINUS_ONE_OR_GT_ZERO);
+  int producerWindowSize = getTextBytesAsIntBytes(e, 
"producer-window-size", 
ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), 
Validators.MINUS_ONE_OR_POSITIVE_INT);
 
 Review comment:
   revert not 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 297231)
Time Spent: 3h  (was: 2h 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: 3h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 15:59
Start Date: 19/Aug/19 15:59
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_r315288606
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
 Review comment:
   revert, not 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 297229)
Time Spent: 2h 40m  (was: 2.5h)

> 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: 2h 40m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 15:59
Start Date: 19/Aug/19 15:59
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_r315288710
 
 

 ##
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
 ##
 @@ -1756,17 +1758,17 @@ private void parseClusterConnectionConfiguration(final 
Element e, final Configur
 
   double retryIntervalMultiplier = getDouble(e, 
"retry-interval-multiplier", 
ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), 
Validators.GT_ZERO);
 
-  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.GT_ZERO);
+  int minLargeMessageSize = getTextBytesAsIntBytes(e, 
"min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, 
Validators.POSITIVE_INT);
 
   long maxRetryInterval = getLong(e, "max-retry-interval", 
ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), 
Validators.GT_ZERO);
 
   int initialConnectAttempts = getInteger(e, "initial-connect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
   int reconnectAttempts = getInteger(e, "reconnect-attempts", 
ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), 
Validators.MINUS_ONE_OR_GE_ZERO);
 
-  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.GT_ZERO);
+  int confirmationWindowSize = getTextBytesAsIntBytes(e, 
"confirmation-window-size", 
ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), 
Validators.POSITIVE_INT);
 
 Review comment:
   revert not 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 297230)
Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 15:58
Start Date: 19/Aug/19 15:58
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_r315288204
 
 

 ##
 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:
   again not needed, if the xsd (schema is corrected)
 

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: 297228)
Time Spent: 2.5h  (was: 2h 20m)

> 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: 2.5h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Aug/19 15:57
Start Date: 19/Aug/19 15:57
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_r315287789
 
 

 ##
 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() {
 
 Review comment:
   This isnt needed, simply change the xsd to int and it would fail
 

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: 297227)
Time Spent: 2h 20m  (was: 2h 10m)

> 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: 2h 20m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 17/Aug/19 04:45
Start Date: 17/Aug/19 04:45
Worklog Time Spent: 10m 
  Work Description: wy96f commented on issue #2791: ARTEMIS-2450 
page-size-bytes should not be greater than Integer.MAX_VALUE
URL: https://github.com/apache/activemq-artemis/pull/2791#issuecomment-522204295
 
 
   @jbertram will re-work this based on comments. After that will rebase and 
push :)
 

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: 296726)
Time Spent: 2h  (was: 1h 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: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 20:26
Start Date: 16/Aug/19 20:26
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314878133
 
 

 ##
 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:
   Also should update the schema to int so then when people do parse configs 
via xsd validators it would fail
 

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: 296547)
Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 20:24
Start Date: 16/Aug/19 20:24
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314877470
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
   assertEquals("helloworld", bconfig.getPassword());
}
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+  FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   Point more so was i assume the same issue may lay in other persistence such 
as journal etc. As alot of it started from a common base.
 

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: 296545)
Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 20:24
Start Date: 16/Aug/19 20:24
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314877470
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
   assertEquals("helloworld", bconfig.getPassword());
}
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+  FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   Point more so was i assume the same issue may lay in other persistence such 
as journal etc
 

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: 296543)
Time Spent: 1.5h  (was: 1h 20m)

> 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: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 20:23
Start Date: 16/Aug/19 20:23
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314877174
 
 

 ##
 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:
   Not really. If you now decode something thats larger than int it will blow 
up with the exception youve added. No different. Except we are actually making 
the method take the correct primitive number
 

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: 296542)
Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-16 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 13:25
Start Date: 16/Aug/19 13:25
Worklog Time Spent: 10m 
  Work Description: jbertram commented on issue #2791: ARTEMIS-2450 
page-size-bytes should not be greater than Integer.MAX_VALUE
URL: https://github.com/apache/activemq-artemis/pull/2791#issuecomment-522007729
 
 
   @wy96f, can you rebase and push -f to trigger a rebuild of the PR by Travis? 
An issue was recently fixed that was preventing the PR build from completing 
properly. Thanks!
 

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: 296283)
Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-15 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 01:36
Start Date: 16/Aug/19 01:36
Worklog Time Spent: 10m 
  Work Description: wy96f 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_r314557230
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
   assertEquals("helloworld", bconfig.getPassword());
}
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+  FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   > E.g. other sizes are quite happily long currently also. Why is this special
   
   I see in Page::write()/Page::read() all operations are limited to int range, 
such as PagingStoreImpl::currentPageSize, Page::size, and local variables like 
fileSize, processedBytes in Page::readFromSequentialFile(), etc.
   
   > This test, test the new change, but doesnt test for what we are protecting 
from. E.g whats the underlying issue being fixed
   
   I'm not sure what you mean. We're protecting page-size-bytes from being 
greater than Integer.MAX_VALUE(2147483647). So if we set page-size-bytes to 
2147483648, the broker is expected to fail fast to throw exception , correct?
   
   
   
   
   
 

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: 295928)
Time Spent: 1h  (was: 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: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-15 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 16/Aug/19 01:16
Start Date: 16/Aug/19 01:16
Worklog Time Spent: 10m 
  Work Description: wy96f 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_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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 295919)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-15 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 15/Aug/19 06:34
Start Date: 15/Aug/19 06:34
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314189108
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
   assertEquals("helloworld", bconfig.getPassword());
}
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+  FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   E.g. other sizes are quite happily long currently also. Why is this special
 

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: 295243)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-15 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 15/Aug/19 06:33
Start Date: 15/Aug/19 06:33
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314188891
 
 

 ##
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
   assertEquals("helloworld", bconfig.getPassword());
}
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+  FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   This test, test the new change, but doesnt test for what we are protecting 
from. E.g whats the underlying issue being fixed
 

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: 295242)
Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-15 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 15/Aug/19 06:32
Start Date: 15/Aug/19 06:32
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce 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_r314188595
 
 

 ##
 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:
   Why not change long to int, this would then be cleaner from anyone trying to 
use the method
 

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: 295239)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (ARTEMIS-2450) page-size-bytes should not be greater than Integer.MAX_VALUE

2019-08-09 Thread ASF GitHub Bot (JIRA)


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

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

Author: ASF GitHub Bot
Created on: 09/Aug/19 12:09
Start Date: 09/Aug/19 12:09
Worklog Time Spent: 10m 
  Work Description: wy96f 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
 
 
   
 

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: 292019)
Time Spent: 10m
Remaining Estimate: 0h

> 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: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)