File tree Expand file tree Collapse file tree
src/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,8 +93,6 @@ public class CommandLine {
9393
9494 /** Map of unique options for ease to get complete list of options */
9595 private Map hashcodeMap = new HashMap ();
96- private List optionList = new ArrayList ();
97- private List keyList = new ArrayList ();
9896
9997 /** the processed options */
10098 private Option [] optionsArray ;
@@ -288,12 +286,10 @@ void addArg(String arg) {
288286 void addOption ( Option opt ) {
289287 hashcodeMap .put ( new Integer ( opt .hashCode () ), opt );
290288
291- optionList .add ( opt );
292289 String key = opt .getOpt ();
293290 if ( " " .equals (key ) ) {
294291 key = opt .getLongOpt ();
295292 }
296- keyList .add ( key );
297293
298294 if ( options .get ( key ) != null ) {
299295 ((java .util .List )options .get ( key )).add ( opt );
@@ -329,14 +325,4 @@ public Option[] getOptions( ) {
329325 return (Option []) processed .toArray ( optionsArray );
330326 }
331327
332- public Option [] getOptions2 () {
333- System .out .println ( "--2--" );
334- Collection processed = optionList ;
335- // reinitialise array
336- optionsArray = new Option [ processed .size () ];
337-
338- // return the array
339- return (Option []) processed .toArray ( optionsArray );
340- }
341-
342328}
You can’t perform that action at this time.
0 commit comments