-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b133
-
Verified
According to documentation loop should run (end - start) times from start to end - 1.
Please, look at attached example. Considering countedLoop(x, y, ..., ...)
it should run 0 times in the case y <= x. It works correctly in most cases, e.g. (1, 0) and (0, -10), etc.
Following cases have unexpected behaviour
1) (Integer.MAX_VALUE - 1, Integer,MAX_VALUE)
2) (Integer.MAX_VALUE, any_integer)
E.g. (Integer.MAX_VALUE, Integer.MIN_VALUE + 10) iterates 11 times.
Two commented lines in the end of 'main' method will lead to huge output.
Found on jdk9b131
Please, look at attached example. Considering countedLoop(x, y, ..., ...)
it should run 0 times in the case y <= x. It works correctly in most cases, e.g. (1, 0) and (0, -10), etc.
Following cases have unexpected behaviour
1) (Integer.MAX_VALUE - 1, Integer,MAX_VALUE)
2) (Integer.MAX_VALUE, any_integer)
E.g. (Integer.MAX_VALUE, Integer.MIN_VALUE + 10) iterates 11 times.
Two commented lines in the end of 'main' method will lead to huge output.
Found on jdk9b131