kryo-serializers icon indicating copy to clipboard operation
kryo-serializers copied to clipboard

Java 9 compatibility

Open magro opened this issue 9 years ago • 8 comments

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

magro avatar Dec 27 '16 11:12 magro

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

ddukki avatar Jul 24 '17 22:07 ddukki

See also EsotericSoftware/kryo#543

magro avatar Mar 18 '18 00:03 magro

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

RobertSermak avatar Sep 11 '18 13:09 RobertSermak

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

magro avatar Oct 21 '18 12:10 magro

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).

lantian avatar Jan 13 '19 15:01 lantian

@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 ;-)

magro avatar Jan 13 '19 16:01 magro

@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.

lantian avatar Jan 13 '19 16:01 lantian

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.

marcphilipp avatar Nov 10 '20 13:11 marcphilipp