Hi Phillipe/Sebb,
Thank you both for the feedback.
I suggest to open a discussion on
http://mail.openjdk.java.net/pipermail/jigsaw-dev/
Rgds,Rory
On 06/06/2015 15:24, Philippe Mouawad wrote:
Hi,
After further analysis:
* JODD : It may be an issue if Unsafe is really removed at some
point, but implementor seem to be ready to make change, very reactive.
* XSteam : Unsafe is used to newInstance any class, when Unsafe is
missing Library defaults to PureJavaReflectionProvider class but
with following limitations:
o Cannot newInstance: classes without public visibility,
non-static inner classes, classes without default constructors.
o @Rory is there some way to do what is needed here without
using Unsafe ?
Thanks
Regards
On Fri, Jun 5, 2015 at 11:32 PM, Philippe Mouawad
<[email protected] <mailto:[email protected]>> wrote:
Hi,
I opened:
- https://github.com/oblac/jodd/issues/220
- https://github.com/x-stream/xstream/issues/11
For other projects not sure they are still maintained. Maybe time
to think about dropping them.
Regards
Philippe M.
@philmdot
On Fri, Jun 5, 2015 at 5:05 PM, sebb <[email protected]
<mailto:[email protected]>> wrote:
On 5 June 2015 at 15:33, Rory O'Donnell
<[email protected] <mailto:[email protected]>>
wrote:
> Hi Philippe,
>
> I believe we checked an older version of Apache jmeter for
dependencies on
> JDK-Internal APIs.
> Below are instructions on how to check for yourself.
Thanks!
Just ran a check on the current build and there is no output
from the
JMeter jars (including jorphan.jar).
However, some of the 3rd party dependencies do produce output,
as follows:
bsh-2.0b5.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(Full JRE)
bsh.util.AWTConsole (bsh-2.0b5.jar)
-> java.awt.peer.ComponentPeer JDK
internal API (rt.jar)
-> java.awt.peer.TextComponentPeer JDK
internal API (rt.jar)
dnsjava-2.1.7.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(compact1)
org.xbill.DNS.spi.DNSJavaNameServiceDescriptor
(dnsjava-2.1.7.jar)
-> sun.net.spi.nameservice.NameService JDK
internal API (rt.jar)
-> sun.net.spi.nameservice.NameServiceDescriptor JDK
internal API (rt.jar)
jcharts-0.7.5.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(Full JRE)
org.jCharts.encoders.JPEGEncoder13 (jcharts-0.7.5.jar)
-> com.sun.image.codec.jpeg.JPEGCodec JDK
internal API (rt.jar)
-> com.sun.image.codec.jpeg.JPEGEncodeParam JDK
internal API (rt.jar)
-> com.sun.image.codec.jpeg.JPEGImageEncoder JDK
internal API (rt.jar)
jodd-core-3.6.4.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(Full JRE)
jodd.util.UnsafeUtil (jodd-core-3.6.4.jar)
-> sun.misc.Unsafe JDK
internal API (rt.jar)
soap-2.3.1.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(Full JRE)
org.apache.soap.util.net.SSLUtils (soap-2.3.1.jar)
-> sun.net.www.protocol.http.HttpURLConnection JDK
internal API (rt.jar)
xstream-1.4.8.jar ->
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar
(Full JRE)
com.thoughtworks.xstream.converters.reflection.SunLimitedUnsafeReflectionProvider
(xstream-1.4.8.jar)
-> sun.misc.Unsafe JDK
internal API (rt.jar)
com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
(xstream-1.4.8.jar)
-> sun.misc.Unsafe JDK
internal API (rt.jar)
Warning: JDK internal APIs are unsupported and private to JDK
implementation that are
subject to be removed or changed incompatibly and could break
your application.
Please modify your code to eliminate dependency on any JDK
internal APIs.
For the most recent update on JDK internal API replacements,
please check:
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
JDK Internal API Suggested Replacement
---------------- ---------------------
com.sun.image.codec.jpeg.JPEGCodec Use javax.imageio
@since 1.4
com.sun.image.codec.jpeg.JPEGEncodeParam Use javax.imageio
@since 1.4
com.sun.image.codec.jpeg.JPEGImageEncoder Use javax.imageio
@since 1.4
> Rgds,Rory
>
>
------------------------------------------------------------------------
> As part of the preparations for JDK 9, Oracle’s engineers have been
> analyzing open source projects like yours to understand
usage. One area of
> concern involves identifying compatibility problems, such as
reliance on
> JDK-internal APIs.
>
> Our engineers have already prepared guidance on migrating
some of the more
> common usage patterns of JDK-internal APIs to supported
public interfaces.
> The list is on the OpenJDK wiki [0].
>
> As part of the ongoing development of JDK 9, I would like to
inquire about
> your usage of JDK-internal APIs and to encourage migration
towards
> supported Java APIs if necessary.
>
> The first step is to identify if your application(s) is
leveraging internal
> APIs.
>
> /Step 1: Download JDeps. /
>
> Just download a preview release of JDK8(JDeps Download
> <https://jdk8.java.net/download.html>). You do not need
to actually
> test or run your application on JDK8. JDeps(Docs
>
<http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jdeps.html>)
> looks through JAR files and identifies which JAR files use internal
> APIs and then lists those APIs.
>
> /Step 2: To run JDeps against an application/. The command
looks like:
>
> jdk8/bin/jdeps -P -jdkinternals *.jar >
your-application.jdeps.txt
>
> The output inside your-application.jdeps.txt will look like:
>
> your.package (Filename.jar)
> -> com.sun.corba.se <http://com.sun.corba.se>
JDK internal API (rt.jar)
>
> _3rd party library using Internal APIs:_
> If your analysis uncovers a third-party component that you rely on,
you can
> contact the provider and let them know of the upcoming
changes. You can then
> either work with the provider to get an updated library that
won't rely on
> Internal APIs, or you can find an alternative provider for
the capabilities
> that the offending library provides.
>
> _Dynamic use of Internal APIs:_
> JDeps can not detect dynamic use of internal APIs, for
example through
> reflection, service loaders and similar mechanisms.
>
>
> [0]
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
>
> --
> Rgds,Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA , Dublin, Ireland
>
--
Cordialement.
Philippe Mouawad.
--
Cordialement.
Philippe Mouawad.
--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland