You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several warnings are logged when XStream is used in Java 9. FYI I am using Java 9.0.1 that recently was released. So far I have seen these:
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.util.TreeMap.comparator
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.lang.reflect.Proxy.h
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter (file:lib/compile/xstream-1.4.9.jar) to method java.text.AttributedCharacterIterator$Attribute.getName()
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.awt.font.TextAttribute.instanceMap
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
The simple workaround for this is to add these command line options to the invocation of java:
Several warnings are logged when XStream is used in Java 9. FYI I am using Java 9.0.1 that recently was released. So far I have seen these:
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.util.TreeMap.comparator
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.lang.reflect.Proxy.h
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter (file:lib/compile/xstream-1.4.9.jar) to method java.text.AttributedCharacterIterator$Attribute.getName()
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:lib/compile/xstream-1.4.9.jar) to field java.awt.font.TextAttribute.instanceMap
[junit] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
The simple workaround for this is to add these command line options to the invocation of java:
--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED
However, this is not a proper solution of course. Please revise the code and fix the warnings. Many thanks!
The text was updated successfully, but these errors were encountered: