Github user d2r commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/187#discussion_r14906679
--- Diff: storm-core/src/jvm/backtype/storm/ConfigValidation.java ---
@@ -82,6 +82,76 @@ public void validateField(String name, Object field)
public static Object MapsValidator =
FieldListValidatorFactory(Map.class);
/**
+ * Validates a Integer.
+ */
+ public static Object IntegerValidator = new FieldValidator() {
+ @Override
+ public void validateField(String name, Object o) throws
IllegalArgumentException {
+ if (o == null) {
+ // A null value is acceptable.
--- End diff --
@HeartSaVioR, you are correct, the null check was for the field's class and
not its value as you stated. I misremembered and misread my own code. :)
And I see in cc5f1f6 that you have added test code to cover the nil value
case for Integer, Integers, and Double.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---