You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2013/12/18 13:22:56 UTC

[21/50] [abbrv] git commit: Code cleanup.

Code cleanup.

git-svn-id: https://svn.apache.org/repos/asf/karaf/cellar/trunk@1476942 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/07228e7c
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/07228e7c
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/07228e7c

Branch: refs/heads/master
Commit: 07228e7c67064c24b0f65766a28e9e0953fc9201
Parents: 4ad329d
Author: jbonofre <jb...@13f79535-47bb-0310-9956-ffa450edef68>
Authored: Mon Apr 29 09:39:22 2013 +0000
Committer: jbonofre <jb...@13f79535-47bb-0310-9956-ffa450edef68>
Committed: Mon Apr 29 09:39:22 2013 +0000

----------------------------------------------------------------------
 .../karaf/cellar/webconsole/CellarPlugin.java   | 23 +++++---------------
 .../OSGI-INF/blueprint/webconsole-cellar.xml    |  1 -
 webconsole/src/main/resources/res/ui/cellar.js  |  2 +-
 3 files changed, 6 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/07228e7c/webconsole/src/main/java/org/apache/karaf/cellar/webconsole/CellarPlugin.java
----------------------------------------------------------------------
diff --git a/webconsole/src/main/java/org/apache/karaf/cellar/webconsole/CellarPlugin.java b/webconsole/src/main/java/org/apache/karaf/cellar/webconsole/CellarPlugin.java
index 03f58cb..974ca2d 100644
--- a/webconsole/src/main/java/org/apache/karaf/cellar/webconsole/CellarPlugin.java
+++ b/webconsole/src/main/java/org/apache/karaf/cellar/webconsole/CellarPlugin.java
@@ -11,7 +11,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.karaf.cellar.webconsole;
 
 import org.apache.felix.webconsole.AbstractWebConsolePlugin;
@@ -36,11 +35,6 @@ import java.util.Set;
 
 public class CellarPlugin extends AbstractWebConsolePlugin {
 
-    /**
-     * Pseudo class version ID to keep the IDE quite.
-     */
-    private static final long serialVersionUID = 1L;
-
     private static final transient Logger LOGGER = LoggerFactory.getLogger(CellarPlugin.class);
 
     public static final String NAME = "cellar";
@@ -56,10 +50,6 @@ public class CellarPlugin extends AbstractWebConsolePlugin {
 
     private BundleContext bundleContext;
 
-    //
-    // Blueprint lifecycle callback methods
-    //
-
     public void start() {
         super.activate(bundleContext);
 
@@ -73,18 +63,17 @@ public class CellarPlugin extends AbstractWebConsolePlugin {
         super.deactivate();
     }
 
-    //
-    // AbstractWebConsolePlugin interface
-    //
-
+    @Override
     public String getLabel() {
         return NAME;
     }
 
+    @Override
     public String getTitle() {
         return LABEL;
     }
 
+    @Override
     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
         boolean success = false;
 
@@ -117,6 +106,7 @@ public class CellarPlugin extends AbstractWebConsolePlugin {
         }
     }
 
+    @Override
     protected void renderContent(HttpServletRequest request, HttpServletResponse response) throws IOException {
         // get request info from request attribute
         final PrintWriter pw = response.getWriter();
@@ -143,9 +133,6 @@ public class CellarPlugin extends AbstractWebConsolePlugin {
         pw.println("</script>");
     }
 
-    //
-    // Additional methods
-    //
     protected URL getResource(String path) {
         path = path.substring(NAME.length() + 1);
         URL url = this.classLoader.getResource(path);
@@ -154,7 +141,7 @@ public class CellarPlugin extends AbstractWebConsolePlugin {
             try {
                 ins = url.openStream();
                 if (ins == null) {
-                    this.LOGGER.error("Failed to open {}", url);
+                    this.LOGGER.error("failed to open {}", url);
                     url = null;
                 }
             } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/07228e7c/webconsole/src/main/resources/OSGI-INF/blueprint/webconsole-cellar.xml
----------------------------------------------------------------------
diff --git a/webconsole/src/main/resources/OSGI-INF/blueprint/webconsole-cellar.xml b/webconsole/src/main/resources/OSGI-INF/blueprint/webconsole-cellar.xml
index e9f0ddf..3aa8b8f 100644
--- a/webconsole/src/main/resources/OSGI-INF/blueprint/webconsole-cellar.xml
+++ b/webconsole/src/main/resources/OSGI-INF/blueprint/webconsole-cellar.xml
@@ -29,7 +29,6 @@
         <property name="groupManager" ref="groupManager"/>
         <property name="clusterManager" ref="clusterManager"/>
     </bean>
-
     <service ref="cellarPlugin" interface="javax.servlet.Servlet">
         <service-properties>
             <entry key="felix.webconsole.label" value="cellar"/>

http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/07228e7c/webconsole/src/main/resources/res/ui/cellar.js
----------------------------------------------------------------------
diff --git a/webconsole/src/main/resources/res/ui/cellar.js b/webconsole/src/main/resources/res/ui/cellar.js
index 8d7d044..faad344 100644
--- a/webconsole/src/main/resources/res/ui/cellar.js
+++ b/webconsole/src/main/resources/res/ui/cellar.js
@@ -105,7 +105,7 @@ function renderGroupTableData(/* array of Objects */ data) {
 }
 
 /**
- * Adds under the parent element a group/member/actions row
+ * Add under the parent element a group/member/actions row
  * @param parent
  * @param group
  */