[infinispan-dev] Analysis of infinispan-6.0.2 dependency on JDK-Internal APIs

Galder Zamarreño galder at redhat.com
Wed Oct 22 04:58:53 EDT 2014


On 10 Oct 2014, at 13:37, Dan Berindei <dan.berindei at gmail.com> wrote:

> Hi Rory
> 
> Galder is on PTO for another week, so I'll try to answer instead.
> 
> We only use sun.misc.Unsafe directly, in order to implement a variation of Doug Lea's ConcurrentHashMapV8 that accepts a custom Equivalence (implementation of equality/hashCode). I guess we'll have to switch to AtomicFieldUpdaters if we want it to work with JDK 9, and possibly move to the volatile extensions once they are implemented.

By that point, Doug might even have an updated ConcurrentHashMapV8 version that can be run with JDK9. We could ask it in the concurrency-interest list, but I’d give them some time yet.

> The rest of the internal class usages seem to be from our dependencies on WildFly, JBoss Marshalling, LevelDB, Smooks, and JBoss MicroContainer. Smooks and JBoss MicroContainer likely won't see any updates for JDK 9, but they're only used in the demos so they're not critical. JBoss Marshalling is used in the core, however, so we'll need a release from them before we can run anything on JDK 9.
> 
> Cheers
> Dan
> 
> 
> On Fri, Oct 10, 2014 at 1:01 PM, Rory O'Donnell Oracle, Dublin Ireland <rory.odonnell at oracle.com> wrote:
> Hi Galder,
> 
> Did you have time to review the report, any feedback ? 
> 
> Rgds,Rory 
> 
> On 24/09/2014 09:21, Rory O'Donnell Oracle, Dublin Ireland wrote:
>> Below is a text output of the report for infinispan-6.0.2.
>> 
>> Rgds,Rory
>> 
>> JDK Internal API Usage Report for infinispan-6.0.2.Final-all
>> 
>> The OpenJDK Quality Outreach campaign has run a compatibility report to identify usage of JDK-internal APIs. Usage of these JDK-internal APIs could pose compatibility issues, as the Java team explained in 1996. We have created this report to help you identify which JDK-internal APIs your project uses, what to use instead, and where those changes should go. Making these changes will improve your compatibility, and in some cases give better performance.
>> 
>> Migrating away from the JDK-internal APIs now will give your team adequate time for testing before the release of JDK 9. If you are unable to migrate away from an internal API, please provide us with an explanation below to help us understand it better. As a reminder, supported APIs are determined by the OpenJDK's Java Community Process and not by Oracle.
>> 
>> This report was generated by jdeps through static analysis of artifacts: it does not identify any usage of those APIs through reflection or dynamic bytecode. You may also run jdeps on your own if you would prefer.
>> 
>> Summary of the analysis of the jar files within infinispan-6.0.2.Final-all:
>> 
>> 	• Numer of jar files depending on JDK-internal APIs: 10
>> 	• Internal APIs that have known replacements: 0
>> 	• Internal APIs that have no supported replacements: 73
>> APIs that have known replacements:
>> 
>> ID	Replace Usage of	With	Inside
>> JDK-internal APIs without supported replacements:
>> 
>> ID	Internal APIs (do not use)	Used by
>> 1	com.sun.org.apache.xml.internal.utils.PrefixResolver	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 2	com.sun.org.apache.xpath.internal.XPath	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 3	com.sun.org.apache.xpath.internal.XPathContext	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 4	com.sun.org.apache.xpath.internal.objects.XBoolean	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 5	com.sun.org.apache.xpath.internal.objects.XNodeSet	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 6	com.sun.org.apache.xpath.internal.objects.XNull	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 7	com.sun.org.apache.xpath.internal.objects.XNumber	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 8	com.sun.org.apache.xpath.internal.objects.XObject	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 9	com.sun.org.apache.xpath.internal.objects.XString	
>> 	• lib/freemarker-2.3.11.jar
>> Explanation...
>> 10	org.w3c.dom.html.HTMLAnchorElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 11	org.w3c.dom.html.HTMLAppletElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 12	org.w3c.dom.html.HTMLAreaElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 13	org.w3c.dom.html.HTMLBRElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 14	org.w3c.dom.html.HTMLBaseElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 15	org.w3c.dom.html.HTMLBaseFontElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 16	org.w3c.dom.html.HTMLBodyElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 17	org.w3c.dom.html.HTMLButtonElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 18	org.w3c.dom.html.HTMLCollection	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 19	org.w3c.dom.html.HTMLDListElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 20	org.w3c.dom.html.HTMLDirectoryElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 21	org.w3c.dom.html.HTMLDivElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 22	org.w3c.dom.html.HTMLDocument	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 23	org.w3c.dom.html.HTMLElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 24	org.w3c.dom.html.HTMLFieldSetElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 25	org.w3c.dom.html.HTMLFontElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 26	org.w3c.dom.html.HTMLFormElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 27	org.w3c.dom.html.HTMLFrameElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 28	org.w3c.dom.html.HTMLFrameSetElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 29	org.w3c.dom.html.HTMLHRElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 30	org.w3c.dom.html.HTMLHeadElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 31	org.w3c.dom.html.HTMLHeadingElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 32	org.w3c.dom.html.HTMLHtmlElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 33	org.w3c.dom.html.HTMLIFrameElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 34	org.w3c.dom.html.HTMLImageElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 35	org.w3c.dom.html.HTMLInputElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 36	org.w3c.dom.html.HTMLIsIndexElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 37	org.w3c.dom.html.HTMLLIElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 38	org.w3c.dom.html.HTMLLabelElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 39	org.w3c.dom.html.HTMLLegendElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 40	org.w3c.dom.html.HTMLLinkElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 41	org.w3c.dom.html.HTMLMapElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 42	org.w3c.dom.html.HTMLMenuElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 43	org.w3c.dom.html.HTMLMetaElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 44	org.w3c.dom.html.HTMLModElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 45	org.w3c.dom.html.HTMLOListElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 46	org.w3c.dom.html.HTMLObjectElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 47	org.w3c.dom.html.HTMLOptGroupElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 48	org.w3c.dom.html.HTMLOptionElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 49	org.w3c.dom.html.HTMLParagraphElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 50	org.w3c.dom.html.HTMLParamElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 51	org.w3c.dom.html.HTMLPreElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 52	org.w3c.dom.html.HTMLQuoteElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 53	org.w3c.dom.html.HTMLScriptElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 54	org.w3c.dom.html.HTMLSelectElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 55	org.w3c.dom.html.HTMLStyleElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 56	org.w3c.dom.html.HTMLTableCaptionElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 57	org.w3c.dom.html.HTMLTableCellElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 58	org.w3c.dom.html.HTMLTableColElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 59	org.w3c.dom.html.HTMLTableElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 60	org.w3c.dom.html.HTMLTableRowElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 61	org.w3c.dom.html.HTMLTableSectionElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 62	org.w3c.dom.html.HTMLTextAreaElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 63	org.w3c.dom.html.HTMLTitleElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 64	org.w3c.dom.html.HTMLUListElement	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 65	org.w3c.dom.ranges.DocumentRange	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 66	org.w3c.dom.ranges.Range	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 67	org.w3c.dom.ranges.RangeException	
>> 	• lib/xercesImpl-2.9.1.jar
>> Explanation...
>> 68	sun.misc.Signal	
>> 	• lib/aesh-0.33.7.jar
>> Explanation...
>> 69	sun.misc.SignalHandler	
>> 	• lib/aesh-0.33.7.jar
>> Explanation...
>> 70	sun.misc.Unsafe	
>> 	• lib/avro-1.7.5.jar
>> 	• lib/guava-12.0.jar
>> 	• lib/infinispan-commons-6.0.2.Final.jar
>> 	• lib/mvel2-2.0.12.jar
>> 	• lib/scala-library-2.10.2.jar
>> Explanation...
>> 71	sun.nio.ch.FileChannelImpl	
>> 	• lib/leveldb-0.5.jar
>> Explanation...
>> 72	sun.reflect.ReflectionFactory	
>> 	• lib/jboss-marshalling-1.4.4.Final.jar
>> Explanation...
>> 73	sun.reflect.ReflectionFactory$GetReflectionFactoryAction	
>> 	• lib/jboss-marshalling-1.4.4.Final.jar
>> Explanation...
>> Identify External Replacements
>> 
>> You should use a separate third-party library that performs this functionality.
>> 
>> ID	Internal API (grouped by package)	Used By	Identify External Replacement
>> 
>> 
>> On 24/09/2014 08:55, Rory O'Donnell Oracle, Dublin Ireland wrote:
>>> Hi Galder,
>>> 
>>> 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], along with instructions on how to run the jdeps analysis tool yourself . 
>>> 
>>> As part of the ongoing development of JDK 9, I would like to encourage migration from JDK-internal APIs towards the supported Java APIs. I have prepared a report for your project rele ase infinispan-6.0.2 based on the jdeps output. 
>>> 
>>> The report is attached to this e-mail. 
>>> 
>>> For anything where your migration path is unclear, I would appreciate comments on the JDK-internal API usage patterns in the attached jdeps report - in particular comments elaborating on the rationale for them - either to me or on this mailing list. 
>>> 
>>> Finding suitable replacements for unsupported interfaces is not always straightforward, which is why I am reaching out to you early in the JDK 9 development cycle so you can give feedback about new APIs that may be needed to facilitate this exercise. 
>>> 
>>> Thank you in advance for any efforts and feedback helping us make JDK 9 better. 
>>> 
>>> Rgds,Rory 
>>> 
>>> [0] https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool 
>>> 
>>> 
>>> -- 
>>> Rgds,Rory O'Donnell
>>> Quality Engineering Manager
>>> Oracle EMEA , Dublin, Ireland 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> -- 
>> Rgds,Rory O'Donnell
>> Quality Engineering Manager
>> Oracle EMEA , Dublin, Ireland 
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Rgds,Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA , Dublin, Ireland 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz




More information about the infinispan-dev mailing list