krichter722 commented on a change in pull request #3050: STORM-3434: server: 
fix all checkstyle warnings
URL: https://github.com/apache/storm/pull/3050#discussion_r314818749
 
 

 ##########
 File path: storm-server/src/main/java/org/apache/storm/LocalCluster.java
 ##########
 @@ -462,6 +466,24 @@ public LocalTopology submitTopology(String topologyName, 
Map<String, Object> con
         return new LocalTopology(topologyName, topology);
     }
 
+    @Override
+    public LocalTopology submitTopology(String topologyName, Map<String, 
Object> conf, TrackedTopology topology)
+            throws TException {
+        return submitTopology(topologyName, conf, topology.getTopology());
+    }
+
+    @Override
+    public void submitTopology(String name, String uploadedJarLocation, String 
jsonConf, StormTopology topology)
+            throws AlreadyAliveException, InvalidTopologyException, 
AuthorizationException, TException {
+        try {
+            @SuppressWarnings("unchecked")
+            Map<String, Object> conf = (Map<String, Object>) 
JSONValue.parseWithException(jsonConf);
+            submitTopology(name, conf, topology);
+        } catch (ParseException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
 
 Review comment:
   > We've moved some code around here
   
   @d2r The reason is the check `OverloadMethodsDeclarationOrder` which is a 
good thing imo. The code moves are the outcome of the necessary rearrangement. 
Do you see an unnecessities?
   
   > but I also see we have suppressed a checkstyle warning
   
   Are you referrring to 
`@SuppressWarnings("checkstyle:VariableDeclarationUsageDistance")`? It is 
necessary for the method to work properly, see @srdo's resolved review comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to