|
From: <lk...@us...> - 2004-11-10 19:20:19
|
Update of /cvsroot/openorb/OpenORB/src/compiler/org/openorb/compiler/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3632/src/compiler/org/openorb/compiler/doc Modified Files: IdlDoc.java Log Message: Fixed NPE in commandline parsing of IdlDoc tool. IMHO IdlDoc is still not production ready, though. Index: IdlDoc.java =================================================================== RCS file: /cvsroot/openorb/OpenORB/src/compiler/org/openorb/compiler/doc/IdlDoc.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IdlDoc.java 10 Nov 2004 17:44:07 -0000 1.5 +++ IdlDoc.java 10 Nov 2004 19:19:59 -0000 1.6 @@ -13,6 +13,7 @@ import java.net.URL; import java.util.Hashtable; import java.util.Vector; +import java.util.List; import org.openorb.compiler.CompilerProperties; import org.openorb.compiler.IdlCompiler; @@ -34,11 +35,6 @@ public static String [] idl_file_name; /** - * IDL files list - */ - public static java.util.Vector idl_file_name_list; - - /** * Generated package name */ public static String packageName = null; @@ -161,11 +157,13 @@ cp.setM_includeList(new Vector()); cp.setM_macros(new Hashtable()); + List idlFileNameList = new java.util.Vector(); + for ( int i = 0; i < args.length; i++ ) { if ( args[ i ].charAt( 0 ) != '-' ) { - idl_file_name_list.addElement( args[ i ] ); + idlFileNameList.add( args[ i ] ); } else if ( args[i].equals( "-h" ) ) { @@ -338,6 +336,9 @@ } } + idl_file_name = new String[idlFileNameList.size()]; + idlFileNameList.toArray(idl_file_name); + if ( packageName == null ) { packageName = "corba_pkg"; @@ -356,7 +357,6 @@ { IdlObject CompilationGraph; IdlParser Parser = null; - idl_file_name_list = new java.util.Vector(); CompilerProperties cp = new CompilerProperties(); // Scan the args if ( args.length != 0 ) |