mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUACAMOLE-497: Merge remove usage of function/classes deprecated within Java 9.
This commit is contained in:
		| @@ -76,7 +76,7 @@ public class NumericField extends Field { | ||||
|             return null; | ||||
|  | ||||
|         // Parse as integer | ||||
|         return new Integer(str); | ||||
|         return Integer.valueOf(str); | ||||
|  | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -35,8 +35,7 @@ public abstract class IntegerGuacamoleProperty implements GuacamoleProperty<Inte | ||||
|             return null; | ||||
|  | ||||
|         try { | ||||
|             Integer integer = new Integer(value); | ||||
|             return integer; | ||||
|             return Integer.valueOf(value); | ||||
|         } | ||||
|         catch (NumberFormatException e) { | ||||
|             throw new GuacamoleServerException("Property \"" + getName() + "\" must be an integer.", e); | ||||
|   | ||||
| @@ -35,8 +35,7 @@ public abstract class LongGuacamoleProperty implements GuacamoleProperty<Long> { | ||||
|             return null; | ||||
|  | ||||
|         try { | ||||
|             Long longValue = new Long(value); | ||||
|             return longValue; | ||||
|             return Long.valueOf(value); | ||||
|         } | ||||
|         catch (NumberFormatException e) { | ||||
|             throw new GuacamoleServerException("Property \"" + getName() + "\" must be an long.", e); | ||||
|   | ||||
| @@ -84,6 +84,10 @@ public class DocumentHandler extends DefaultHandler { | ||||
|     public void startElement(String uri, String localName, String qName, | ||||
|         Attributes attributes) throws SAXException { | ||||
|  | ||||
|         // If the SAX implementation does not provide the local name, the | ||||
|         // qualified name should be used instead | ||||
|         String name = localName.isEmpty() ? qName : localName; | ||||
|  | ||||
|         // Get current state | ||||
|         DocumentHandlerState current = getCurrentState(); | ||||
|  | ||||
| @@ -94,7 +98,7 @@ public class DocumentHandler extends DefaultHandler { | ||||
|         if (current == null) { | ||||
|  | ||||
|             // Validate element name | ||||
|             if (!localName.equals(rootElementName)) | ||||
|             if (!name.equals(rootElementName)) | ||||
|                 throw new SAXException("Root element must be '" + rootElementName + "'"); | ||||
|  | ||||
|             handler = root; | ||||
| @@ -103,12 +107,12 @@ public class DocumentHandler extends DefaultHandler { | ||||
|         // Otherwise, get handler from parent | ||||
|         else { | ||||
|             TagHandler parent_handler = current.getTagHandler(); | ||||
|             handler = parent_handler.childElement(localName); | ||||
|             handler = parent_handler.childElement(name); | ||||
|         } | ||||
|  | ||||
|         // If no handler returned, the element was not expected | ||||
|         if (handler == null) | ||||
|             throw new SAXException("Unexpected element: '" + localName + "'"); | ||||
|             throw new SAXException("Unexpected element: '" + name + "'"); | ||||
|  | ||||
|         // Initialize handler | ||||
|         handler.init(attributes); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user