magro / kryo-serializers

More kryo serializers
Apache License 2.0
381 stars 120 forks source link

Java 9 compatibility #71

Open magro opened 7 years ago

magro commented 7 years ago

Some serializers might suffer from the issue described in https://github.com/cglib/cglib/issues/93

ddukki commented 7 years ago

Looks like even with the core serializers, there is at least a warning. Is there a plan for moving away from the "illegal" reflections access?

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.esotericsoftware.kryo.util.UnsafeUtil (file:/C:/Users/user/.m2/repository/com/esotericsoftware/kryo/kryo/2.24.0/kryo-2.24.0.jar) to constructor java.nio.DirectByteBuffer(long,int,java.lang.Object)
WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.kryo.util.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
magro commented 6 years ago

See also EsotericSoftware/kryo#543

RobertSermak commented 6 years ago

Hi there, any chance that this warning "Illegal reflective access by com.esotericsoftware.kryo.util.UnsafeUtil" will be fixed?

magro commented 5 years ago

@RobertSermak this is not caused by kryo-serializers but kryo itself, see EsotericSoftware/kryo#543

lantian commented 5 years ago

Hi,

And what with:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer to field java.util.Collections$UnmodifiableCollection.c
WARNING: Please consider reporting this to the maintainers of de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

? (openjdk 11).

magro commented 5 years ago

@lantian At least that's just a warning and it should still work, right?

Getting rid of this would require quite some effort with a java9+ specific implementation and multi-release jars - at least to my current understanding of this stuff. PRs are of course welcome ;-)

lantian commented 5 years ago

@magro Yep, just a warning. But can be a problem (blocker) in future java releases.

As you said - this will require some effort to support jdk+ specific stuff. It seems to me, that no one will do this better, then you ;)

Of course if you will have no time until blocker releases - we(community, maybe me, maybe someone) could create the PR.

marcphilipp commented 3 years ago

Any updates? Is it really necessary to use reflection for this?

@magro If you could outline a potential fix I might be able to submit a PR.