Commit d0f841ed authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story 1840. Simplified code.

parent 83def454
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -200,8 +200,7 @@ public class CmdLineParser
        }
    }
    
    protected boolean isValid(final ArgumentMap am, final PrintStream outStream,
        final PrintStream errStream) throws UsageException
    protected boolean isValid(final ArgumentMap am) throws UsageException
    {
    	int count = 0;
    	
@@ -253,8 +252,6 @@ public class CmdLineParser
                    	
    	if (count == 1)
    	{
            this.command.setSystemOut(outStream);
            this.command.setSystemErr(errStream);
            return true;
    	}
    	else
@@ -285,7 +282,7 @@ public class CmdLineParser
    {
        this.proceed = false;

        if (!am.isSet("h") && !am.isSet("help") && isValid(am, out, err))
        if (!am.isSet("h") && !am.isSet("help") && isValid(am))
        {
            Subject subject = CertCmdArgUtil.initSubject(am, true);
            
@@ -307,6 +304,10 @@ public class CmdLineParser
                    throw e;
            	}
            }
            
            // the following statements are executed only when proceed is true
            this.command.setSystemOut(out);
            this.command.setSystemErr(err);            
        }
    }