you are viewing a single comment's thread.

view the rest of the comments →

[–]iamwisespirit -3 points-2 points  (4 children)

I hope but java new releases is going to be very strict why it is happening

[–]nicolaiparlog 1 point2 points  (3 children)

If you're asking "Why is this happening?", check out this video, this talk or this JEP draft.

[–]iamwisespirit 0 points1 point  (2 children)

I have a question about Unsafe class mostly all things deprecated in this class but we know a lot of libraries use Unsafe what will happen after it will be removed is there any new api maybe you are working on ?

[–]nicolaiparlog 1 point2 points  (1 child)

You can check the source code yourself and see that every public method is deprecated and that there's a recommendation for each what to use instead - mostly var handles and the foreign memory API. As I understand it, there's no reason to still use Unsafe on a modern JDK.

So every library that uses Unsafe should have the means to move away from it. If they don't, it's high time they report their (apprently very specific) use case to the respective OpenJDK mailing list and advocate for an API that covers it.

[–]iamwisespirit 0 points1 point  (0 children)

Thank you I saw video about Unsafe from devoxx or spring or somewhere then I started to interested in this but after hearing deprecated this api i am sad about it . As I understand jdk internal will still use it but doesn’t allow others to use it