apache/incubator-storm — pull request #187 by HeartSaVioR (2014-07-11 16:15:17+00:00)
Title: STORM-328 : More restrictive to Config, strict range check within Utils.getInt()

Related Issue : https://issues.apache.org/jira/browse/STORM-328

There're some reasons to make this change.

1. We use Utils.getInt() to read configuration parameters.
2. Utils.getInt() uses Long.intValue(). It just convert long to int by narrow conversion, using lowest 4 bytes so it would be weird value.
http://www.myhowto.org/java/60-understanding-the-primitive-numeric-type-conversions-in-java/
3. based on 2. we need to restrict configuration parameters using strict type validation.
(clojure seems to use long instead of int, so it should be with range check.)

I checked parameter's type.
int is enough for most of these, topology sample rate needs double.
So I introduce IntegerValidator, IntegersValidator (for ports, etc), DoubleValidator.