felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r815960 - /felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java
Date Wed, 16 Sep 2009 20:53:29 GMT
Author: rickhall
Date: Wed Sep 16 20:53:28 2009
New Revision: 815960

URL: http://svn.apache.org/viewvc?rev=815960&view=rev
Log:
Reformatted code to Felix coding style (mostly removed extra whitespace).

Modified:
    felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java

Modified: felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java?rev=815960&r1=815959&r2=815960&view=diff
==============================================================================
--- felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java
(original)
+++ felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java
Wed Sep 16 20:53:28 2009
@@ -18,14 +18,12 @@
  */
 package org.apache.felix.shell.impl;
 
-
 import java.io.PrintStream;
 import java.util.Iterator;
 import java.util.StringTokenizer;
 
 import org.apache.felix.shell.Command;
 
-
 /**
  * Command to display, set and modify system properties
  * Usage:
@@ -35,61 +33,55 @@
  */
 public class SystemPropertiesCommandImpl implements Command
 {
-
-    public void execute( String line, PrintStream out, PrintStream err )
+    public void execute(String line, PrintStream out, PrintStream err)
     {
-        StringTokenizer st = new StringTokenizer( line );
+        StringTokenizer st = new StringTokenizer(line);
         int tokens = st.countTokens();
 
-        if ( tokens == 1 )
+        if (tokens == 1)
         {
-            printAll( out );
+            printAll(out);
         }
         else
         {
             st.nextToken();
             String propertyKey = st.nextToken();
 
-            if ( tokens == 2 )
+            if (tokens == 2)
             {
-                out.println( propertyKey + "=" + System.getProperty( propertyKey ) );
+                out.println(propertyKey + "=" + System.getProperty(propertyKey));
             }
             else
             {
                 String value = st.nextToken();
-                System.setProperty( propertyKey, value );
-                out.println( "Set " + propertyKey + "=" + value );
+                System.setProperty(propertyKey, value);
+                out.println("Set " + propertyKey + "=" + value);
             }
         }
     }
 
-
-    private void printAll( PrintStream out )
+    private void printAll(PrintStream out)
     {
-        out.println( "-------System properties------" );
-        for ( Iterator keyIterator = System.getProperties().keySet().iterator(); keyIterator.hasNext();
)
+        out.println("-------System properties------");
+        for (Iterator keyIterator = System.getProperties().keySet().iterator(); keyIterator.hasNext();
)
         {
             Object key = keyIterator.next();
-            out.println( key.toString() + "=" + System.getProperty( key.toString() ) );
+            out.println(key.toString() + "=" + System.getProperty(key.toString()));
         }
     }
 
-
     public String getName()
     {
         return "sysprop";
     }
 
-
     public String getShortDescription()
     {
         return "Display, set and modify system properties";
     }
 
-
     public String getUsage()
     {
         return "sysprop [<key>] [<value>]";
     }
-
-}
+}
\ No newline at end of file



Mime
View raw message