From: Bon-Yong Lee Date: Fri, 24 Aug 2012 02:23:26 +0000 (+0900) Subject: [Title] Code quilification as static analysis X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cefed4bbe43ca4e6ece32a88feee311af953176;p=sdk%2Ftools%2Fcli.git [Title] Code quilification as static analysis [Type] Enhancement [Module] Sub [Priority] Minor [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/org.tizen.cli/src/org/tizen/cli/exec/ConsolePrompter.java b/org.tizen.cli/src/org/tizen/cli/exec/ConsolePrompter.java old mode 100644 new mode 100755 index c81314f..1e7cd59 --- a/org.tizen.cli/src/org/tizen/cli/exec/ConsolePrompter.java +++ b/org.tizen.cli/src/org/tizen/cli/exec/ConsolePrompter.java @@ -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) diff --git a/org.tizen.cli/src/org/tizen/cli/exec/PolicyRegistryFactory.java b/org.tizen.cli/src/org/tizen/cli/exec/PolicyRegistryFactory.java old mode 100644 new mode 100755 index 11efdb3..3fd56d2 --- a/org.tizen.cli/src/org/tizen/cli/exec/PolicyRegistryFactory.java +++ b/org.tizen.cli/src/org/tizen/cli/exec/PolicyRegistryFactory.java @@ -24,12 +24,9 @@ */ 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; diff --git a/org.tizen.cli/src/org/tizen/cli/exec/sign/Main.java b/org.tizen.cli/src/org/tizen/cli/exec/sign/Main.java old mode 100644 new mode 100755 index 5ef173a..4283cff --- a/org.tizen.cli/src/org/tizen/cli/exec/sign/Main.java +++ b/org.tizen.cli/src/org/tizen/cli/exec/sign/Main.java @@ -263,6 +263,8 @@ extends AbstractLauncher } final SignCommand command = new SignCommand( baseDir, profileName, readProfile.getProfileItems() ); + command.setIncludes( includes ); + command.setExcludes( excludes ); getExecutor().execute( command ); } diff --git a/org.tizen.cli/test/src/org/tizen/cli/exec/sign/MainTest.java b/org.tizen.cli/test/src/org/tizen/cli/exec/sign/MainTest.java old mode 100644 new mode 100755 index 9f94ddd..400e8f0 --- a/org.tizen.cli/test/src/org/tizen/cli/exec/sign/MainTest.java +++ b/org.tizen.cli/test/src/org/tizen/cli/exec/sign/MainTest.java @@ -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() ); } }