GUAC-830: Bring up to spec regarding comment level.
This commit is contained in:
1 parent
b253a11483
commit
e733052fa4
1 file changed
+4
@@ -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