felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Diotalevi <filippo.diotal...@gmail.com>
Subject Coding standard changed? [Re: svn commit: r815960 - /felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/SystemPropertiesCommandImpl.java]
Date Wed, 16 Sep 2009 21:02:04 GMT
Richard,
  are coding standard changed?

I use the Eclipse template file provided at
http://felix.apache.org/site/coding-standards.data/ApacheFelixCodingStandards.xml
(linked from http://felix.apache.org/site/coding-standards.html )

-- 
Filippo

On Wed, Sep 16, 2009 at 10:53 PM,  <rickhall@apache.org> wrote:
> 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