History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-24264
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Bas Leijdekkers
Reporter: Jonas Kvarnstrom
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

int > Integer.MAX_VALUE is always true?

Created: 19 Dec 07 11:40   Updated: 15 Jan 08 00:21
Component/s: Code Analysis. Inspection
Fix Version/s: Diana 8243, Selena 7.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,590
Fixed in build: 7,649
Severity: High


 Description  « Hide
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!");
	}
    }
}


 All   Comments   Work Log   Change History      Sort Order:
Jon Steelman - 20 Dec 07 20:01
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