Closed gzsombor closed 4 months ago
Right, native/zstd_errors.h
also comes from upstream. I also don't think that maintaining our own message types in jni_fast_zstd
is good idea.
I think for that case, may be better approach is to check for negative offsets on the Java side, before calling the JNI code and raising an exception from there.
Thanks for the explanation, that's a reasonable concern. I guess,
src/main/native/zstd_errors.h
is also coming from upstream, so you would rather not touch that too, am I right? I can imagine, creating separate error constants injni_fast_zstd.c
and put the error message somewhere there could work, but I'm afraid that it will be a bit more complicated. Would you merge a solution like that, or any idea, how to solve this problem?