Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #3275

Merged
merged 16 commits into from
Jan 13, 2025
Prev Previous commit
Next Next commit
use IOUtils
  • Loading branch information
wenshao committed Jan 13, 2025
commit a73960f462cb7f2a49c46145e5ec56739c5d8faf
7 changes: 3 additions & 4 deletions core/src/main/java/com/alibaba/fastjson2/JSONBDump.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.alibaba.fastjson2;

import com.alibaba.fastjson2.util.IOUtils;
import com.alibaba.fastjson2.util.JDKUtils;

import java.math.BigDecimal;
@@ -279,11 +280,9 @@ private void dumpAny() {
);
break;
case BC_INT64:
long unscaledValueLong = UNSAFE.getLong(bytes, ARRAY_BYTE_BASE_OFFSET + offset);
unscaledValue = BigInteger.valueOf(
BIG_ENDIAN
? unscaledValueLong
: Long.reverseBytes(unscaledValueLong));
IOUtils.getLongBE(bytes, offset)
);
offset += 8;
break;
default:
Loading
Loading