Cruisecontrol dependencies on JDK-Internal APIs
"Rory O'Donnell" <[email protected]> Fri, 29 May 2015 16:24:36 +0100
| Newsgroups | gmane.comp.java.cruise-control.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1260969032358006783==
Content-Type: multipart/alternative;
boundary="------------050909000208010309030000"
This is a multi-part message in MIME format.
--------------050909000208010309030000
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by userp1040.oracle.com id
t4TFOelv016883
Hi Kent,
As part of the preparations for JDK 9, Oracle=E2=80=99s engineers have be=
en=20
analyzing open source projects like yours to understand usage. One area=20
of concern involves identifying compatibility problems, such as reliance=20
on JDK-internal APIs.
Our engineers have already prepared guidance on migrating some of the=20
more common usage patterns of JDK-internal APIs to supported public=20
interfaces. The list is on the OpenJDK wiki [0].
As part of the ongoing development of JDK 9, I would like to inquire=20
about your usage of JDK-internal APIs and to encourage migration=20
towards supported Java APIs if necessary.
The first step is to identify if your application(s) is leveraging=20
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 JDK internal API (rt.jar)
_3rd party library using Internal APIs:_
If your analysis uncovers a third-party component that you rely on, you=20
can contact the provider and let them know of the upcoming changes. You=20
can then either work with the provider to get an updated library that=20
won't rely on Internal APIs, or you can find an alternative provider for=20
the capabilities that the offending library provides.
_Dynamic use of Internal APIs:_
JDeps can not detect dynamic use of internal APIs, for example through=20
reflection, service loaders and similar mechanisms.
Rgds,Rory
[0] https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+T=
ool
--=20
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland
--------------050909000208010309030000
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by userp1040.oracle.com id
t4TFOelv016883
<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf=
-8">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<br>
Hi Kent,<br>
<br>
As part of the preparations for JDK 9, Oracle=E2=80=99s engineers hav=
e 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. <br>
<br>
Our engineers have already prepared guidance on migrating some of
the more common usage patterns of JDK-internal APIs to supported
public interfaces.=C2=A0 The list is on the OpenJDK wiki [0].<br>
<br>
As part of the ongoing development of JDK 9, I would like to inquire
about your usage of=C2=A0 JDK-internal APIs and to encourage migratio=
n
towards supported Java APIs if necessary.<br>
<br>
The first step is to identify if your application(s) is leveraging
internal APIs. <br>
<br>
=C2=A0 <i>Step 1: Download JDeps. </i><br>
<blockquote>Just download a preview release of JDK8(<a
moz-do-not-send=3D"true"
href=3D"https://jdk8.java.net/download.html">JDeps Download</a>).
You do not need to actually test or run your application on JDK8.=C2=
=A0
JDeps(<a moz-do-not-send=3D"true"
href=3D"http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jdeps.h=
tml">Docs</a>)
looks through JAR files and identifies which JAR files use
internal APIs and then lists those APIs.=C2=A0=C2=A0=C2=A0 <br>
</blockquote>
=C2=A0 <i>Step 2: To run JDeps against an application</i>. The comman=
d
looks like:<br>
<blockquote>jdk8/bin/jdeps -P -jdkinternals *.jar >
your-application.jdeps.txt<br>
<br>
The output inside your-application.jdeps.txt will look like:<br>
<br>
your.package (Filename.jar)<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -> com.sun.corba.se=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 JDK internal API (rt.=
jar)</blockquote>
<u>3rd party library using Internal APIs:</u><br>
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.<br>
<br>
<u>Dynamic use of Internal APIs:</u><br>
JDeps can not detect dynamic use of internal APIs, for example
through reflection, service loaders and similar mechanisms.<br>
<br>
Rgds,Rory <br>
<br>
[0] <a class=3D"moz-txt-link-freetext"
href=3D"https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analys=
is+Tool">https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analy=
sis+Tool</a><br>
<pre class=3D"moz-signature" cols=3D"72">--=20
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland </pre>
</body>
</html>
--------------050909000208010309030000--
--===============1260969032358006783==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============1260969032358006783==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Cruisecontrol-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-devel
--===============1260969032358006783==--