Priority
Major
Type
Bug 
State
Fixed 
Assignee
Bas Leijdekkers 
Subsystem
Code Analysis. Inspection 
Affected versions
Fixed in
Fixed in build
Next build 
Build
7590
Fixed in build
7649
Severity
0
  • Submitted by   Jonas Kvarnstrom
    2 years ago (19 Dec 2007 11:40)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:56)
  • Jira: IDEA-42337
    (history, comments)

IDEA-42337

int > Integer.MAX_VALUE is always true?

0
IDEA seems to believe that all integers are greater than Integer.MAX_VALUE, since it wants to replace the condition below with "true"...

package test;

public class TestGreaterThanMax
{
    public static void main(String[] args) {
	if (args.length > Integer.MAX_VALUE) {
	    System.out.println("Impossible!");
	}
    }
}


Issue was resolved
Comments (1)
 
History (1)
 
Links
 
Jon Steelman
  Jon Steelman
20 Dec 2007 20:01
(2 years ago)
#permalink
Did they get the thing swapped?

args.length < Integer.MAX_VALUE always true
args.length <= Integer.MAX_VALUE always true

args.length > Integer.MAX_VALUE always false