[ 
https://issues.apache.org/jira/browse/STORM-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987590#comment-14987590
 ] 

ASF GitHub Bot commented on STORM-1143:
---------------------------------------

Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/825#discussion_r43772643
  
    --- Diff: 
storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java ---
    @@ -558,9 +566,14 @@ public static void validateFields(Map conf) throws 
IllegalAccessException, Insta
          * @param conf        map of configs
          * @param configClass config class
          */
    -    public static void validateFields(Map conf, Class configClass) throws 
IllegalAccessException, InstantiationException, NoSuchFieldException, 
NoSuchMethodException, InvocationTargetException {
    +    public static void validateFields(Map conf, Class configClass) {
             for (Field field : configClass.getFields()) {
    -            Object keyObj = field.get(null);
    +            Object keyObj = null;
    +            try {
    +                keyObj = field.get(null);
    +            } catch (IllegalAccessException e) {
    +                throw new IllegalStateException("ConfigValidation failed 
due to: " + e.getMessage() + "\n" + e.getStackTrace().toString());
    --- End diff --
    
    Same here, if we just don't want checked exceptions, we can wrap `e` in a 
RTE.


> Validate topology Configs during topology submission
> ----------------------------------------------------
>
>                 Key: STORM-1143
>                 URL: https://issues.apache.org/jira/browse/STORM-1143
>             Project: Apache Storm
>          Issue Type: Improvement
>            Reporter: Boyang Jerry Peng
>            Assignee: Boyang Jerry Peng
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to