[
https://issues.apache.org/jira/browse/ARTEMIS-2320?focusedWorklogId=234202&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-234202
]
ASF GitHub Bot logged work on ARTEMIS-2320:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Apr/19 16:23
Start Date: 28/Apr/19 16:23
Worklog Time Spent: 10m
Work Description: jdanekrh commented on pull request #2650: ARTEMIS-2320
Multiple math-related fixes
URL: https://github.com/apache/activemq-artemis/pull/2650#discussion_r279201613
##########
File path:
artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java
##########
@@ -110,7 +110,7 @@ public void open(int maxIO, boolean useExecutor) throws
IOException {
@Override
public boolean fits(int size) {
checkIsOpen();
- final long newPosition = this.mappedFile.position() + size;
+ final long newPosition = (long) this.mappedFile.position() + size;
final boolean hasRemaining = newPosition <= this.mappedFile.length();
Review comment:
```
jshell> Integer.MAX_VALUE + Integer.MAX_VALUE
$2 ==> -2
jshell> (long) Integer.MAX_VALUE + Integer.MAX_VALUE
$3 ==> 4294967294
```
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 234202)
Time Spent: 3.5h (was: 3h 20m)
> Upgrade errorprone compiler dependency to 2.3.3 and review the new warnings
> ---------------------------------------------------------------------------
>
> Key: ARTEMIS-2320
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2320
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.7.0
> Reporter: Jiri Daněk
> Priority: Minor
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)