We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c491a73 commit 32beabfCopy full SHA for 32beabf
src/main/java/com/rabbitmq/client/impl/ValueWriter.java
@@ -151,9 +151,9 @@ else if(value instanceof BigDecimal) {
151
"The scale was: " + decimal.scale());
152
writeOctet(decimal.scale());
153
BigInteger unscaled = decimal.unscaledValue();
154
- // We use 31 instead of 32 because bitLength ignores the sign bit,
+ // We use 31 instead of 32 (Integer.SIZE) because bitLength ignores the sign bit,
155
// so e.g. new BigDecimal(Integer.MAX_VALUE) comes out to 31 bits.
156
- if(unscaled.bitLength() > 31) /*Integer.SIZE in Java 1.5*/
+ if(unscaled.bitLength() > 31)
157
throw new IllegalArgumentException
158
("BigDecimal too large to be encoded");
159
writeLong(decimal.unscaledValue().intValue());
0 commit comments