diff options
Diffstat (limited to 'processing')
-rw-r--r-- | processing/src/main/java/com/yahoo/processing/request/Properties.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/processing/src/main/java/com/yahoo/processing/request/Properties.java b/processing/src/main/java/com/yahoo/processing/request/Properties.java index 250e7214881..095a0e51ce0 100644 --- a/processing/src/main/java/com/yahoo/processing/request/Properties.java +++ b/processing/src/main/java/com/yahoo/processing/request/Properties.java @@ -411,8 +411,8 @@ public class Properties implements Cloneable { if (value == null) return defaultValue; - if (value instanceof Integer) - return (Integer) value; + if (value instanceof Number) + return ((Number)value).intValue(); String stringValue = value.toString(); if (stringValue.isEmpty()) @@ -420,7 +420,7 @@ public class Properties implements Cloneable { return Integer.valueOf(stringValue); } catch (IllegalArgumentException e) { - throw new NumberFormatException("Not a valid integer"); + throw new NumberFormatException("'" + value + "' is not a valid integer"); } } |