You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Michael Jumper (JIRA)" <ji...@apache.org> on 2018/02/01 23:56:00 UTC

[jira] [Created] (GUACAMOLE-497) Ensure guacamole-client source is compatible with Java 9

Michael Jumper created GUACAMOLE-497:
----------------------------------------

             Summary: Ensure guacamole-client source is compatible with Java 9
                 Key: GUACAMOLE-497
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-497
             Project: Guacamole
          Issue Type: Task
          Components: guacamole-client
            Reporter: Michael Jumper


guacamole-client is intended to be compatible at a source level with Java 6 and later (though some Maven plugins require at least a version 7 JRE), however a number of functions and classes have been deprecated as of Java 9, resulting in warnings and a failed build:
 * Wrapper class constructors {{new Integer(String)}} and {{new Long(String)}} have been deprecated in favor of {{Integer.valueOf(String)}} and {{Long.valueOf(String)}}.
 * The {{XMLReaderFactory}} class used to parse {{user-mapping.xml}} has been deprecated in favor of {{SAXParserFactory}}.

Migrating away from the old functions and classes _should_ be safe, as they have been defined sinceĀ at leastĀ Java 6:

* [{{SAXParserFactory.newInstance()}}|https://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()],
 [{{SAXParserFactory.newSAXParser()}}|https://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newSAXParser()], and [{{SAXParser.parse()}}|https://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/SAXParser.html#parse(java.io.File, org.xml.sax.helpers.DefaultHandler)]
* [{{Integer.valueOf(String)}}|https://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String)]
* [{{Long.valueOf(String)}}|https://docs.oracle.com/javase/6/docs/api/java/lang/Long.html#valueOf(java.lang.String)]





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)