File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ public void test13935() throws Exception
268268 String [] args = new String [] { };
269269 try
270270 {
271- CommandLine line = parser .parse (opts , args );
271+ parser .parse (opts , args );
272272 }
273273 catch (ParseException exp )
274274 {
@@ -285,7 +285,7 @@ public void test13935() throws Exception
285285 args = new String [] { "-s" };
286286 try
287287 {
288- CommandLine line = parser .parse (opts , args );
288+ parser .parse (opts , args );
289289 }
290290 catch (ParseException exp )
291291 {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ public void testIllegalOptions() {
127127
128128 // bad character in option string
129129 try {
130- Option opt = OptionBuilder .create ( "opt`" );
130+ OptionBuilder .create ( "opt`" );
131131 fail ( "IllegalArgumentException not caught" );
132132 }
133133 catch ( IllegalArgumentException exp ) {
@@ -136,7 +136,7 @@ public void testIllegalOptions() {
136136
137137 // valid option
138138 try {
139- Option opt = OptionBuilder .create ( "opt" );
139+ OptionBuilder .create ( "opt" );
140140 // success
141141 }
142142 catch ( IllegalArgumentException exp ) {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public void testMistakenArgument() throws Exception {
6767 public void testLackOfError () throws Exception {
6868 String [] args = new String [] { "-k" , "-a" , "Caesar" };
6969 try {
70- CommandLine line = parser .parse ( options , args );
70+ parser .parse ( options , args );
7171 fail ("MissingArgumentException expected" );
7272 } catch (MissingArgumentException e ) {
7373 assertEquals ("option missing an argument" , "k" , e .getOption ().getOpt ());
You can’t perform that action at this time.
0 commit comments