mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17: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) {
|
public static String format(Integer i) {
|
||||||
|
|
||||||
|
// Return null if no value provided
|
||||||
if (i == null)
|
if (i == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// Convert to string
|
||||||
return i.toString();
|
return i.toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -74,9 +76,11 @@ public class NumericField extends Field {
|
|||||||
*/
|
*/
|
||||||
public static Integer parse(String str) throws NumberFormatException {
|
public static Integer parse(String str) throws NumberFormatException {
|
||||||
|
|
||||||
|
// Return null if no value provided
|
||||||
if (str == null || str.isEmpty())
|
if (str == null || str.isEmpty())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// Parse as integer
|
||||||
return new Integer(str);
|
return new Integer(str);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user