Github user revans2 commented on the pull request:
https://github.com/apache/storm/pull/785#issuecomment-146926754
@jerrypeng Perhaps we can do a hybrid approach, where we have validation
for complex types made up of something that is a bit ugly, but expressive. And
a set of simple annotations for common types. for example
```
@Validate(type=Map.class, nullAllowed=false,
key=@Validate(type=String.class),
value=@Validate(type=Number.class, min=0, max=500))
public static final String MY_MAP_CONF="my.map.conf";
@Validate(type=List.class, value=@Validate(type=String.class))
public static final String MY_LIST_OF_STRINGS="my.list.of.strings";
@IntValidator(min=0, nullAllowed=false)
public static final String MY_INT_CONF="my.int.conf";
//And for the really strange types
@Validate(type=List.class, value=@Validate(type=Map.class,
validator=RegistryValidator.class))
public static final String TOPOLOGY_METRICS_CONSUMER_REGISTER =
"topology.metrics.consumer.register";
```
---
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.
---