erosb / json-sKema

JSON Schema Validator for the JVM, implements draft2020-12
MIT License
53 stars 10 forks source link

Java 17 Compatibility #118

Open PrathamArora20 opened 1 month ago

PrathamArora20 commented 1 month ago

Hey !

So im trying to use this library for validating my Json in Java 17 version. It worked for the previous versions but now that I have upgraded to Java 17 , the library doesnt seem to work.

I keep getting this error " (class: com/github/erosb/jsonsKema/Validator$create, method: call signature: (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool "

and it links back to this line

" Validator validator = Validator.create(schema, new ValidatorConfig(FormatValidationPolicy.ALWAYS)) "

So i was wondering what should i do , or when would there be a java 17 compatibility code be released ?

Thank you !

erosb commented 1 month ago

Hello, this looks a weird issue. We build every commit on java 17, and some users are using this library even on java 8. Can you please create a reproducer in a sepatate repo?

PrathamArora20 commented 1 month ago

So im using the library for internal use ( Using groovy ) so im unable to create a reproducer. It was working completely fine with Java 11 and previous versions but once we upgraded to java 17 , it doesn't seem to work properly. The line where its converting the schema to validator is erroring out.

erosb commented 1 month ago

Are you using version 0.18.0 ?

PrathamArora20 commented 1 month ago

Yes ! Im using version 0.18.0