Skip to content

Commit

Permalink
[Java] Correct defaults for UINT32 type. Issue #455.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed May 18, 2017
1 parent 410ceb3 commit 18dc535
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sbe-tool/src/main/java/uk/co/real_logic/sbe/PrimitiveValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ public enum Representation
public static final long NULL_VALUE_INT32 = -2147483648;

public static final long MIN_VALUE_UINT32 = 0;
public static final long MAX_VALUE_UINT32 = 4294967293L; // 0xFFFFFFFD
public static final long NULL_VALUE_UINT32 = 4294967294L; // 0xFFFFFFFE
public static final long MAX_VALUE_UINT32 = 0xFFFF_FFFFL - 1;
public static final long NULL_VALUE_UINT32 = 0xFFFF_FFFFL;

public static final long MIN_VALUE_INT64 = Long.MIN_VALUE + 1; // (-2 ^ 63) + 1
public static final long MAX_VALUE_INT64 = Long.MAX_VALUE; // (2 ^ 63) - 1 (SBE spec says (-2 ^ 63) - 1)
public static final long NULL_VALUE_INT64 = Long.MIN_VALUE; // (-2 ^ 63)
public static final long MIN_VALUE_INT64 = Long.MIN_VALUE + 1; // (-2 ^ 63) + 1
public static final long MAX_VALUE_INT64 = Long.MAX_VALUE; // ( 2 ^ 63) - 1
public static final long NULL_VALUE_INT64 = Long.MIN_VALUE; // (-2 ^ 63)

public static final long MIN_VALUE_UINT64 = 0;
public static final BigInteger BI_MAX_VALUE_UINT64 = new BigInteger("18446744073709551614");
public static final long MAX_VALUE_UINT64 = BI_MAX_VALUE_UINT64.longValue(); // (2 ^ 64)- 2
public static final long MAX_VALUE_UINT64 = BI_MAX_VALUE_UINT64.longValue(); // (2 ^ 64) - 2
public static final BigInteger BI_NULL_VALUE_UINT64 = new BigInteger("18446744073709551615");
public static final long NULL_VALUE_UINT64 = BI_NULL_VALUE_UINT64.longValue(); // (2 ^ 64)- 1
public static final long NULL_VALUE_UINT64 = BI_NULL_VALUE_UINT64.longValue(); // (2 ^ 64) - 1

public static final float MIN_VALUE_FLOAT = Float.MIN_VALUE;
public static final float MAX_VALUE_FLOAT = Float.MAX_VALUE;
Expand Down

0 comments on commit 18dc535

Please sign in to comment.