Hi Jody, depends on the focus of the sprint... if the target is to run off the classpath I believe all we need to is to care for the J2EE dependencies, which are not exposed anymore. However, if that was the focus, we could also ignore split packages.
Going towards automatic modules, and then to proper modules, places increased restrictions. I'm sure that a proper module needs to declare a dependency on "jdk.unsupported" to access Unsafe, but I'm not sure about an automatic module... hopefully not? The rule I know is that automatic modules read by default every module that made into the module graph, plus the unnamed module (aka, the classpath), but I don't know if jdk.unsupported is visible or not in that situation (one should try with an application that places a proper module as the application one, depend onto one that use Unsafe that is being treated as an automatic module, and see if that works). Cheers Andrea On Sun, Sep 30, 2018 at 1:29 PM Jody Garnett <jody.garn...@gmail.com> wrote: > Thanks Andrea that is great, > > I thought there was going to continue to be a way to use “unsafe”? Found > it - there is a jdk.unsupported module for popular internal packages (see > https://www.azul.com/javas-magic-sauce/). > > I am not sure if the results of jdeps represent a blocker for jars on the > classpath, or just modules? I do note that unsafe changed a bit so we may > have forced updates regardless. > > On Sun, Sep 30, 2018 at 2:07 AM Andrea Aime <andrea.a...@geo-solutions.it> > wrote: > >> Hi, >> I am looking at internal API usage that we (likely) have to remove during >> the JDK 11 upgrade effort. >> The jdeps tool can scan jars and find internal API usage, so I used it. >> I've already run it on jai-ext (no complaints) >> and imageio-ext (see results at >> https://github.com/geosolutions-it/imageio-ext/issues/172 ). >> >> Here are the results running it onto GeoTools (I've collected the >> GeoTools jars, release style, went into target/binaries, and run jdeps): >> >> jdeps --jdk-internals -R *.jar >> ehcache-2.10.3.jar -> jdk.unsupported >> net.sf.ehcache.pool.sizeof.UnsafeSizeOf -> sun.misc.Unsafe >> JDK internal API (jdk.unsupported) >> gt-arcsde-21-SNAPSHOT.jar -> java.desktop >> org.geotools.arcsde.raster.info.RasterUtils -> >> com.sun.imageio.plugins.common.BogusColorSpace JDK internal API >> (java.desktop) >> gt-coverage-api-21-SNAPSHOT.jar -> java.desktop >> org.geotools.coverage.io.util.Utilities -> sun.awt.OSInfo >> JDK internal API (java.desktop) >> org.geotools.coverage.io.util.Utilities -> >> sun.awt.OSInfo$OSType JDK internal API >> (java.desktop) >> imageio-ext-streams-1.1.25.jar -> java.desktop >> >> it.geosolutions.imageio.stream.input.spi.FileImageInputStreamExtImplSpi -> >> com.sun.imageio.spi.FileImageInputStreamSpi JDK internal API >> (java.desktop) >> >> it.geosolutions.imageio.stream.output.spi.FileImageOutputStreamExtImplSpi >> -> com.sun.imageio.spi.FileImageOutputStreamSpi JDK internal API >> (java.desktop) >> imageio-ext-utilities-1.1.25.jar -> java.desktop >> it.geosolutions.imageio.utilities.ImageIOUtilities -> >> com.sun.imageio.plugins.common.BogusColorSpace JDK internal API >> (java.desktop) >> jai_codec-1.1.3.jar -> JDK removed internal API >> jai_codec-1.1.3.jar -> java.base >> com.sun.media.jai.codecimpl.JPEGImage -> >> com.sun.image.codec.jpeg.ImageFormatException JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImage -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImage -> >> com.sun.image.codec.jpeg.JPEGImageDecoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImageEncoder -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImageEncoder -> >> com.sun.image.codec.jpeg.JPEGEncodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImageEncoder -> >> com.sun.image.codec.jpeg.JPEGImageEncoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.JPEGImageEncoder -> >> com.sun.image.codec.jpeg.JPEGQTable JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.PNMImage -> >> sun.security.action.GetPropertyAction JDK internal API >> (java.base) >> com.sun.media.jai.codecimpl.PNMImageEncoder -> >> sun.security.action.GetPropertyAction JDK internal API >> (java.base) >> com.sun.media.jai.codecimpl.TIFFImage -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.TIFFImage -> >> com.sun.image.codec.jpeg.JPEGDecodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.TIFFImage -> >> com.sun.image.codec.jpeg.JPEGImageDecoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.TIFFImageEncoder -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.TIFFImageEncoder -> >> com.sun.image.codec.jpeg.JPEGEncodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.TIFFImageEncoder -> >> com.sun.image.codec.jpeg.JPEGImageEncoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.fpx.FPXImage -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.fpx.FPXImage -> >> com.sun.image.codec.jpeg.JPEGDecodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.codecimpl.fpx.FPXImage -> >> com.sun.image.codec.jpeg.JPEGImageDecoder JDK internal API (JDK >> removed internal API) >> jai_core-1.1.3.jar -> JDK removed internal API >> jai_core-1.1.3.jar -> java.desktop >> com.sun.media.jai.opimage.IIPResolutionOpImage -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.opimage.IIPResolutionOpImage -> >> com.sun.image.codec.jpeg.JPEGDecodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.opimage.IIPResolutionOpImage -> >> com.sun.image.codec.jpeg.JPEGImageDecoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileDecoder -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileDecoder -> >> com.sun.image.codec.jpeg.JPEGDecodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileDecoder -> >> com.sun.image.codec.jpeg.JPEGImageDecoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileDecoder -> >> com.sun.image.codec.jpeg.JPEGQTable JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileEncoder -> >> com.sun.image.codec.jpeg.JPEGCodec JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileEncoder -> >> com.sun.image.codec.jpeg.JPEGEncodeParam JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileEncoder -> >> com.sun.image.codec.jpeg.JPEGImageEncoder JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileEncoder -> >> com.sun.image.codec.jpeg.JPEGQTable JDK internal API (JDK >> removed internal API) >> com.sun.media.jai.tilecodec.JPEGTileEncoder -> >> sun.awt.image.codec.JPEGParam JDK internal API (JDK >> removed internal API) >> javax.media.jai.RasterAccessor -> >> sun.awt.image.BytePackedRaster JDK internal API >> (java.desktop) >> jai_imageio-1.1.jar -> java.base >> com.sun.media.imageioimpl.plugins.pnm.PNMImageReader -> >> sun.security.action.GetPropertyAction JDK internal API >> (java.base) >> com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter -> >> sun.security.action.GetPropertyAction JDK internal API >> (java.base) >> protobuf-java-3.4.0.jar -> jdk.unsupported >> com.google.protobuf.UnsafeUtil -> sun.misc.Unsafe >> JDK internal API (jdk.unsupported) >> com.google.protobuf.UnsafeUtil$1 -> sun.misc.Unsafe >> JDK internal API (jdk.unsupported) >> com.google.protobuf.UnsafeUtil$JvmMemoryAccessor -> sun.misc.Unsafe >> JDK internal API (jdk.unsupported) >> com.google.protobuf.UnsafeUtil$MemoryAccessor -> sun.misc.Unsafe >> JDK internal API (jdk.unsupported) >> swt.win32.win32.x86_64-3.6.1.v3655c.jar -> java.desktop >> org.eclipse.swt.awt.SWT_AWT$1 -> >> java.awt.peer.ComponentPeer JDK internal API >> (java.desktop) >> >> 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 dependence 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.ImageFormatException Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGCodec Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGDecodeParam Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGEncodeParam Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGImageDecoder Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGImageEncoder Use javax.imageio @since 1.4 >> com.sun.image.codec.jpeg.JPEGQTable Use javax.imageio @since 1.4 >> java.awt.peer.ComponentPeer Should not use. See >> https://bugs.openjdk.java.net/browse/JDK-8037739 >> sun.awt.image.codec.JPEGParam Use javax.imageio @since 1.4 >> sun.misc.Unsafe See >> http://openjdk.java.net/jeps/260 >> sun.security.action.GetPropertyAction Use >> java.security.PrivilegedAction @since 1.1 >> >> As you can see part of the report is due to imageoi-ext jars in the >> collection (I've made it light gray), but the rest seems legit and >> points to both GeoTools sources and some dependencies. >> >> Cheers >> Andrea >> >> == GeoServer Professional Services from the experts! Visit >> http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf >> Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa >> (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 >> http://www.geo-solutions.it http://twitter.com/geosolutions_it >> ------------------------------------------------------- *Con riferimento >> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - >> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni >> circostanza inerente alla presente email (il suo contenuto, gli eventuali >> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i >> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per >> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le >> sarei comunque grato se potesse darmene notizia. This email is intended >> only for the person or entity to which it is addressed and may contain >> information that is privileged, confidential or otherwise protected from >> disclosure. We remind that - as provided by European Regulation 2016/679 >> “GDPR” - copying, dissemination or use of this e-mail or the information >> herein by anyone other than the intended recipient is prohibited. If you >> have received this email by mistake, please notify us immediately by >> telephone or e-mail.* >> _______________________________________________ >> GeoTools-Devel mailing list >> GeoTools-Devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> > -- > -- > Jody Garnett > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- *Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.*
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel