Community
Participate
Working Groups
Test case: class ASTNode { public final static long Bit38L = 0x2000000000L; } public class X { public static final long Autoboxing = ASTNode.Bit38L; public static void main(String[] args) { int i = args.length; switch(i) { case (int) Autoboxing >>> 32 : System.out.println("Autoboxing"); break; default: System.out.println("Default"); } } } jikes reports a warning for the expression (int) Autoboxing >>> 32. Issued 1 semantic warning compiling "d:/tests_sources/X.java": 9. final int IntAutoBoxing = (int) Autoboxing >>> 32; ^^ *** Semantic Caution: The shift count of 32 is >= the 32-bit width of the type. The result will always be 0 whatever the value of the constant Autoboxing. So this is highly possible that this is a user bug.