[Title] Code quilification as static analysis
authorBon-Yong Lee <bonyong.lee@samsung.com>
Fri, 24 Aug 2012 02:23:26 +0000 (11:23 +0900)
committerBon-Yong Lee <bonyong.lee@samsung.com>
Fri, 24 Aug 2012 02:23:26 +0000 (11:23 +0900)
[Type]      Enhancement
[Module]    Sub
[Priority]  Minor
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.cli/src/org/tizen/cli/exec/ConsolePrompter.java [changed mode: 0644->0755]
org.tizen.cli/src/org/tizen/cli/exec/PolicyRegistryFactory.java [changed mode: 0644->0755]
org.tizen.cli/src/org/tizen/cli/exec/sign/Main.java [changed mode: 0644->0755]
org.tizen.cli/test/src/org/tizen/cli/exec/sign/MainTest.java [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index c81314f..1e7cd59
@@ -70,11 +70,6 @@ implements Prompter
        protected final BufferedReader reader;
        
        /**
-        * Flag about cancellation
-        */
-       protected boolean bCancel = false;
-       
-       /**
         * Constructor with {@link PrintStream} and {@link Reader}
         * 
         * @param out {@link PrintStream} for output
@@ -193,7 +188,6 @@ implements Prompter
        @Override
        public void cancel()
        {
-               bCancel = true;
        }
 
        /* (non-Javadoc)
old mode 100644 (file)
new mode 100755 (executable)
index 11efdb3..3fd56d2
  */
 package org.tizen.cli.exec;
 
-import static org.tizen.common.core.command.Policy.EXCEPTION_UNHANDLED;
 import static org.tizen.common.core.command.Policy.EXIST_OUT_FILE;
 import static org.tizen.common.core.command.Policy.NONEXIST_IN_FILE;
 
-import java.lang.Thread.UncaughtExceptionHandler;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.tizen.common.Factory;
old mode 100644 (file)
new mode 100755 (executable)
index 5ef173a..4283cff
@@ -263,6 +263,8 @@ extends AbstractLauncher
                }
 
                final SignCommand command = new SignCommand( baseDir, profileName, readProfile.getProfileItems() );
+               command.setIncludes( includes );
+               command.setExcludes( excludes );
                getExecutor().execute( command );
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index 9f94ddd..400e8f0
@@ -73,6 +73,9 @@ extends AbstractMainTest
                parser.parse( opts, new String[] {
                        "--help", "--quiet", "--profile", "test:/test/profiles.xml"
                } );
+               parser.parse( opts, new String[] {
+                   "--help", "--quiet", "--profile", "test:/test/profiles.xml", "--include", "*.xml", "--exclude", "*.jpg"
+               } );
                
                parser.parse( opts, new String[] {
                        "-h", "-q", "-p", "test:/test/profiles.xml"
@@ -119,21 +122,30 @@ extends AbstractMainTest
        test_run()
        throws Exception
        {
-               final AtomicBoolean result = new AtomicBoolean( false );
-               
-               final Main main = new Main()
-               {
-                       protected Executor getExecutor() {
-                               return MainTest.this.executor;
-                       }
-                       
-                       protected void execute( final CommandLine cmdLine ) throws Exception {
-                               result.set( true );
-                       }
-               };
+           {
+               final AtomicBoolean result = new AtomicBoolean( false );
+
+               final Main main = new Main()
+               {
+                   protected Executor getExecutor() {
+                       return MainTest.this.executor;
+                   }
+
+                   protected
+                   void
+                   execute(
+                       final CommandLine cmdLine
+                   )
+                   throws Exception
+                   {
+                       result.set( true );
+                   }
+               };
+
+               main.run( "-p", "test" );
+               assertTrue( result.get() );
+           }
                
-               main.run( "-p", "test" );
-               assertTrue( result.get() );
        }
        
 }