[Jukebox-cvs] CVS update: J4/src/java/gnu/j4/config Configuration.java
Brought to you by:
vtt
From: CVS B. <vt...@fr...> - 2000-05-15 02:16:13
|
User: vt Date: 00/05/14 19:16:10 Modified: src/java/gnu/j4/config Configuration.java Log: But of course! If the confpath is not set, I get NullPointerException... Fixed. Revision Changes Path 1.27 +11 -9 J4/src/java/gnu/j4/config/Configuration.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/config/Configuration.java?annotate=1.27&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/config/Configuration.java?rev=1.27&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/config/Configuration.java.diff?r1=1.27&r2=1.26&cvsroot=jukebox4 ----------------------------------- Index: Configuration.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/config/Configuration.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- Configuration.java 2000/05/13 00:20:31 1.26 +++ Configuration.java 2000/05/15 02:16:10 1.27 @@ -25,7 +25,7 @@ * target=_top>Java-Apache Project</a> in general and code written by <a * href="mailto:st...@ap...">Stefano Mazzocchi</a> in particular. * - * @version $Id: Configuration.java,v 1.26 2000/05/13 00:20:31 vt Exp $ + * @version $Id: Configuration.java,v 1.27 2000/05/15 02:16:10 vt Exp $ */ public class Configuration extends Hashtable { @@ -124,17 +124,19 @@ String confPath = System.getProperty("jukebox.confpath"); - StringTokenizer st = new StringTokenizer(confPath, File.pathSeparator); - - while ( st.hasMoreTokens() ) { - - String item = st.nextToken(); + if ( confPath != null ) { + + StringTokenizer st = new StringTokenizer(confPath, File.pathSeparator); - File confFile = new File(item, base.toString()); + while ( st.hasMoreTokens() ) { - path.addElement(confFile); + String item = st.nextToken(); + + File confFile = new File(item, base.toString()); + + path.addElement(confFile); + } } - // Read $HOME/.jukebox/... third |