You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by cd...@apache.org on 2017/11/06 20:08:51 UTC

[1/3] incubator-edgent git commit: - Addressed the SonarQube issues reported for ConsoleJobServlet.java

Repository: incubator-edgent
Updated Branches:
  refs/heads/develop d2e471040 -> 17bcbb2c7


- Addressed the SonarQube issues reported for ConsoleJobServlet.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/98bc09f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/98bc09f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/98bc09f8

Branch: refs/heads/develop
Commit: 98bc09f8a81b28c8f852691c3c45edcdf11ab85d
Parents: ab1f04a
Author: Christofer Dutz <ch...@c-ware.de>
Authored: Sun Nov 5 17:55:13 2017 +0100
Committer: Christofer Dutz <ch...@c-ware.de>
Committed: Sun Nov 5 17:55:13 2017 +0100

----------------------------------------------------------------------
 .../console/servlets/ConsoleJobServlet.java     | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/98bc09f8/console/servlets/src/main/java/org/apache/edgent/console/servlets/ConsoleJobServlet.java
----------------------------------------------------------------------
diff --git a/console/servlets/src/main/java/org/apache/edgent/console/servlets/ConsoleJobServlet.java b/console/servlets/src/main/java/org/apache/edgent/console/servlets/ConsoleJobServlet.java
index d1b1fb9..94bc913 100644
--- a/console/servlets/src/main/java/org/apache/edgent/console/servlets/ConsoleJobServlet.java
+++ b/console/servlets/src/main/java/org/apache/edgent/console/servlets/ConsoleJobServlet.java
@@ -50,32 +50,31 @@ public class ConsoleJobServlet extends HttpServlet {
         boolean jobsInfo = false;
         boolean jobGraph = false;
         for(Map.Entry<String,String[]> entry : parameterMap.entrySet()) {
-                if (entry.getKey().equals("jobsInfo")) {
+                if ("jobsInfo".equals(entry.getKey())) {
                         String[] vals = entry.getValue();
-                        if (vals[0].equals("true")) {
+                        if ("true".equals(vals[0])) {
                                 jobsInfo = true;
                         }
-                } else if (entry.getKey().equals("jobgraph")) {
+                } else if ("jobgraph".equals(entry.getKey())) {
                         String[] vals = entry.getValue();
-                        if (vals[0].equals("true")) {
+                        if ("true".equals(vals[0])) {
                                 jobGraph = true;
                         }
-                } else if (entry.getKey().equals("jobId")) {
+                } else if ("jobId".equals(entry.getKey())) {
                         String[] ids = entry.getValue();
                         if (ids.length == 1) {
                                 jobId = ids[0];
                         }
                 }
         }
-        
 
-        StringBuffer sbuf = new StringBuffer();
+        StringBuilder sbuf = new StringBuilder();
         sbuf.append("*:interface=");
         sbuf.append(ObjectName.quote("org.apache.edgent.execution.mbeans.JobMXBean"));
         sbuf.append(",type=");
         sbuf.append(ObjectName.quote("job"));
         
-        if (!jobId.equals("")) {
+        if (!jobId.isEmpty()) {
         	sbuf.append(",id=");
         	sbuf.append(ObjectName.quote(jobId));
         } 
@@ -90,13 +89,16 @@ public class ConsoleJobServlet extends HttpServlet {
         String jsonString = "";
         if (jobsInfo) {
         	jsonString = JobUtil.getJobsInfo(jobObjName);
-        } else if (jobGraph && !(jobId.equals("")) && !(jobId.equals("undefined"))) {
+        } else if (jobGraph && !(jobId.isEmpty()) && !("undefined".equals(jobId))) {
             jsonString = JobUtil.getJobGraph(jobObjName);
         }
 
         response.setContentType("application/json");
         response.setCharacterEncoding("UTF-8");
-        response.getWriter().write(jsonString);
-        
+        try {
+            response.getWriter().write(jsonString);
+        } catch (IOException e) {
+            throw new ServletException(e);
+        }
 	}		
 }


[2/3] incubator-edgent git commit: Merge remote-tracking branch 'origin/develop' into develop

Posted by cd...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/9f75a0f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/9f75a0f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/9f75a0f7

Branch: refs/heads/develop
Commit: 9f75a0f723fd38cdf7e251e093a2b7d8102778fa
Parents: 98bc09f d2e4710
Author: Christofer Dutz <ch...@c-ware.de>
Authored: Mon Nov 6 21:03:47 2017 +0100
Committer: Christofer Dutz <ch...@c-ware.de>
Committed: Mon Nov 6 21:03:47 2017 +0100

----------------------------------------------------------------------
 RELEASE_NOTES     | 77 +++++++++++++++++++++++++++++---------------------
 samples/README.md |  3 +-
 2 files changed, 46 insertions(+), 34 deletions(-)
----------------------------------------------------------------------



[3/3] incubator-edgent git commit: - Removed some testfile prior to branching

Posted by cd...@apache.org.
- Removed some testfile prior to branching


Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/17bcbb2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/17bcbb2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/17bcbb2c

Branch: refs/heads/develop
Commit: 17bcbb2c712d00cf709b7bb1eec6eebaee3c0fbd
Parents: 9f75a0f
Author: Christofer Dutz <ch...@c-ware.de>
Authored: Mon Nov 6 21:08:43 2017 +0100
Committer: Christofer Dutz <ch...@c-ware.de>
Committed: Mon Nov 6 21:08:43 2017 +0100

----------------------------------------------------------------------
 Failing Tests.txt | 26 --------------------------
 1 file changed, 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/17bcbb2c/Failing Tests.txt
----------------------------------------------------------------------
diff --git a/Failing Tests.txt b/Failing Tests.txt
deleted file mode 100644
index 37856f3..0000000
--- a/Failing Tests.txt	
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-
-List of tests I have observed to fail every now and then ... could use
-some investigation on why they are failing.
-
-connectors/mqtt:
-    MqttStreamsTestManual.testConnectRetryPub
-connectors/websocket
-    WebSocketClientTest.testSslPublicServer
\ No newline at end of file