apache / fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
https://fury.apache.org/
Apache License 2.0
3.11k stars 248 forks source link

feat(java): Improve error message on architecture not using little-endian format #1918

Closed apupier closed 3 weeks ago

apupier commented 3 weeks ago

What does this PR do?

previously there was this kind of error stacktrace:

Caused by: java.lang.IllegalArgumentException: false
    at org.apache.fury.util.Preconditions.checkArgument(Preconditions.java:52)
    at org.apache.fury.Fury.deserialize(Fury.java:765)
    at org.apache.fury.Fury.deserialize(Fury.java:815)
    at org.apache.fury.Fury.deserialize(Fury.java:808)
    at org.apache.camel.component.fury.FuryDataFormat.unmarshal(FuryDataFormat.java:79)

Related issues

Does this PR introduce any user-facing change?

Benchmark

chaokunyang commented 3 weeks ago

Hi @apupier , thanks for your contribution. The code lint failed, could you execute mvn spotless:apply to format code?