Quantcast

sun.nio.ch.DirectBuffer will be removed

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sun.nio.ch.DirectBuffer will be removed

Felix Natter
Administrator
hello Devs,

I get this warning when compiling with openjdk7 and openjdk8:

:freeplane:compileJava
/home/felix/git2/freeplane2/freeplane/src/main/java/org/freeplane/core/ui/image/BigBufferedImage.java:26: warning: DirectBuffer is internal proprietary API and may be removed in a future release
import sun.nio.ch.DirectBuffer;
                 ^
/home/felix/git2/freeplane2/freeplane/src/main/java/org/freeplane/core/ui/image/BigBufferedImage.java:199: warning: DirectBuffer is internal proprietary API and may be removed in a future release
                                        ((DirectBuffer) b).cleaner().clean();
                                          ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings

Since this warning appears in openjdk7 already, it may be remove in java9. Shall I look for an alternative solution?

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sun.nio.ch.DirectBuffer will be removed

Dimitry Polivaev
Administrator
Hello Felix,

this API is used because of reasons explained in http://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java/5036003#5036003 . In Java 9 nothing has changed, I have checked it now.

Regards,
Dimitry


On 28.04.2017 13:11 wrote Felix Natter [via Freeplane Developer]:

> hello Devs,
>
> I get this warning when compiling with openjdk7 and openjdk8:
>
> :freeplane:compileJava
> /home/felix/git2/freeplane2/freeplane/src/main/java/org/freeplane/core/ui/image/BigBufferedImage.java:26: warning: DirectBuffer is internal proprietary API and may be removed in a future release
> import sun.nio.ch.DirectBuffer;
>                  ^
> /home/felix/git2/freeplane2/freeplane/src/main/java/org/freeplane/core/ui/image/BigBufferedImage.java:199: warning: DirectBuffer is internal proprietary API and may be removed in a future release
>                                         ((DirectBuffer) b).cleaner().clean();
>                                           ^
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 2 warnings
>
> Since this warning appears in openjdk7 already, it may be remove in java9. Shall I look for an alternative solution?
>
> Cheers and Best Regards,
> Felix
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> http://freeplane-developer.996965.n3.nabble.com/sun-nio-ch-DirectBuffer-will-be-removed-tp1016.html
> To start a new topic under Freeplane Developer, email [hidden email]
> To unsubscribe from Freeplane Developer, click here <
> NAML <
http://freeplane-developer.996965.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

Loading...