Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning on instantiate object on Android N+ #514

Merged
merged 2 commits into from
Jun 11, 2017

Conversation

pilgr
Copy link
Contributor

@pilgr pilgr commented May 26, 2017

objenesis in the version 2.3 (https://github.com/easymock/objenesis/releases/tag/2.3) fixed important warning caused by using private ObjectStream api on Android N+.

I'm a developer of Paper DB lib (https://github.com/pilgr/Paper) and happy to use Kryo serialization!
But I noticed users started to failing issues with a warning happening on read data on Android N and above ObjectStreamClass.newInstance(Class<?>, long) is private API and will be removed in a future Android release.
I realized Objenesis fixed it, but Kryo 4.0 unfortunately uses outdated version. I temporary fixed this warning in the lib by forcing use of Objenesis 2.3. But would be awesome to have a new version of Kryo to include such dependency update.

Thanks!

objenesis in the version 2.3 (https://github.com/easymock/objenesis/releases/tag/2.3) fixed important warning caused by using private ObjectStream api on Android N+. 

I'm a developer of Paper DB lib (https://github.com/pilgr/Paper) and happy to use Kryo serialization!
But I noticed users started to failing issues with a warning happening on read data on Android N and above `ObjectStreamClass.newInstance(Class<?>, long) is private API and will be removed in a future Android release`. 
I realized Objenesis fixed it, but Kryo 4.0 unfortunately uses outdated version. I temporary fixed this warning in the lib by forcing use of Objenesis 2.3. But would be awesome to have a new version of Kryo to include such dependency update. 

Thanks!
@pakoito
Copy link
Contributor

pakoito commented May 26, 2017

I'd like to know when the release is stable, to update my libs too. Thanks for the fix!

@westnordost
Copy link

And for Android O, it is not a warning anymore but an UnsupportedOperationException.

@magro
Copy link
Collaborator

magro commented Jun 11, 2017

So we should update objenesis to 2.5.1, right? Can you do this here?

@pilgr
Copy link
Contributor Author

pilgr commented Jun 11, 2017

@magro sure. I've changed to the minimal vital version just to avoid any other side effects for Kryo. But seems to be updating to 2.5.1 shouldn't break anything according to the release notes.

@magro
Copy link
Collaborator

magro commented Jun 11, 2017

Great, thanks!

@magro magro merged commit add3702 into EsotericSoftware:master Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants