castor-data-binding / castor

http://castor-data-binding.github.io/castor/
35 stars 29 forks source link

Java11+ #76

Closed hoikin closed 3 years ago

hoikin commented 5 years ago

Hello, please consider make it Java 11 compatible, thanks! Please find below warning for your reference :

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.exolab.castor.xml.BaseXercesJDK5Serializer (file:/C:/Users/hkwong/.gradle/caches/modules-2/files-2.1/org.codehaus.castor/castor-xml/1.4.1/2cee800a008291305ac4f3a67b674f9c6cb1d07a/castor-xml-1.4.1.jar) to constructor com.sun.org.apache.xml.internal.serialize.XMLSerializer() WARNING: Please consider reporting this to the maintainers of org.exolab.castor.xml.BaseXercesJDK5Serializer WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

gverratti commented 5 years ago

Yes, please, here's another:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.exolab.castor.xml.BaseXercesOutputFormat (file:/C:/test1/lib/castor-xml.jar) to method com.sun.org.apache.xml.internal.serialize.OutputFormat.setMethod(java.lang.String) WARNING: Please consider reporting this to the maintainers of org.exolab.castor.xml.BaseXercesOutputFormat WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

realrolfje commented 3 years ago

Any plans on fixing this issue?

hoikin commented 3 years ago

Just find that we can set the property to use own Xerces to prevent the problem.

context.setProperty(org.castor.xml.XMLProperties.SERIALIZER_FACTORY, org.exolab.castor.xml.XercesXMLSerializerFactory.class.getName());