[
https://issues.apache.org/jira/browse/FLINK-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15516689#comment-15516689
]
ASF GitHub Bot commented on FLINK-4668:
---------------------------------------
Github user apivovarov commented on the issue:
https://github.com/apache/flink/pull/2539
it's not even convenient to work with files started with `-`, e.g.
```$ vi -44.txt
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 1 2016 19:37:21)
Unknown option argument: "-44.txt"
More info with: "vim -h"```
```$ rm -rf "-4.txt"
rm: illegal option -- 4
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file```
> Fix positive random int generation
> ----------------------------------
>
> Key: FLINK-4668
> URL: https://issues.apache.org/jira/browse/FLINK-4668
> Project: Flink
> Issue Type: Bug
> Components: Client
> Reporter: Alexander Pivovarov
> Priority: Trivial
>
> According to java spec
> {code}Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE{code}
> So, {code}Math.abs(rnd.nextInt()){code} might return negative value
> To generate positive random int value we can use
> {code}rnd.nextInt(Integer.MAX_VALUE){code}
> Integer.MAX_VALUE will be excluded btw
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)