commit | 1247d0e570335eb3aa1dc597949dd371e9ef3dc1 | [log] [tgz] |
---|---|---|
author | Ronald Li <ronald.li@bigswitch.com> | Mon Jul 07 18:18:53 2014 -0700 |
committer | Ronald Li <ronald.li@bigswitch.com> | Mon Jul 07 19:18:40 2014 -0700 |
tree | 7ffd0a71d4b4fafeb83578aed8af470a216cd21d | |
parent | f9377607fbfd88427e5a020793cbf2f1d1b6849d [diff] |
Use -1L instead of (long) -1
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java index 29a3726..471d0fb 100644 --- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java +++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
@@ -322,9 +322,9 @@ return IPv6Address.FULL_MASK; } else { int shift1 = Math.min(cidrMaskLength, 64); - long raw1 = shift1 == 0 ? 0 : (long) -1 << (64 - shift1); + long raw1 = shift1 == 0 ? 0 : -1L << (64 - shift1); int shift2 = Math.max(cidrMaskLength - 64, 0); - long raw2 = shift2 == 0 ? 0 : (long) -1 << (64 - shift2); + long raw2 = shift2 == 0 ? 0 : -1L << (64 - shift2); return IPv6Address.of(raw1, raw2); } }