mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-830: Bring up to spec regarding comment level.
This commit is contained in:
@@ -51,9 +51,11 @@ public class NumericField extends Field {
|
||||
*/
|
||||
public static String format(Integer i) {
|
||||
|
||||
// Return null if no value provided
|
||||
if (i == null)
|
||||
return null;
|
||||
|
||||
// Convert to string
|
||||
return i.toString();
|
||||
|
||||
}
|
||||
@@ -74,9 +76,11 @@ public class NumericField extends Field {
|
||||
*/
|
||||
public static Integer parse(String str) throws NumberFormatException {
|
||||
|
||||
// Return null if no value provided
|
||||
if (str == null || str.isEmpty())
|
||||
return null;
|
||||
|
||||
// Parse as integer
|
||||
return new Integer(str);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user