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

    https://github.com/apache/storm/pull/2583#discussion_r172665583
  
    --- Diff: storm-client/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -1030,8 +1034,35 @@ private static Object normalizeConfValue(Object obj) 
{
             return ret;
         }
     
    -    public static boolean isValidConf(Map<String, Object> topoConf) {
    -        return normalizeConf(topoConf).equals(normalizeConf((Map<String, 
Object>) JSONValue.parse(JSONValue.toJSONString(topoConf))));
    +    @SuppressWarnings("unchecked")
    +    public static boolean isValidConf(Map<String, Object> topoConfIn) {
    +   Map<String, Object> origTopoConf = normalizeConf(topoConfIn);
    +   Map<String, Object> deserTopoConf = normalizeConf(
    +           (Map<String, Object>) 
JSONValue.parse(JSONValue.toJSONString(topoConfIn)));
    +   return checkMapEquality(origTopoConf, deserTopoConf);
    +    }
    +
    +    @VisibleForTesting
    +    static boolean checkMapEquality(Map<String, Object> orig, Map<String, 
Object> deser) {
    --- End diff --
    
    Please rename this as it is not generic Map Equality.  It is very specific 
to `isValidConf` and it is confusing to have a generic name for it.


---

Reply via email to