Skip to content

Commit

Permalink
use IOUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jan 13, 2025
1 parent e4790b8 commit a73960f
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 233 deletions.
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;
Expand Down Expand Up @@ -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:
Expand Down
Loading

0 comments on commit a73960f

Please sign in to comment.