[Jukebox-cvs] CVS update: J4/src/java/gnu/j4/config Configuration.java
Brought to you by:
vtt
From: CVS B. <vt...@fr...> - 2000-07-25 17:42:31
|
User: vt Date: 00/07/25 10:42:28 Modified: src/java/gnu/j4/config Configuration.java Log: Now the request for the vector will return the comma separated values as different elements, not as a single string. Revision Changes Path 1.30 +19 -2 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.30&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/config/Configuration.java?rev=1.30&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.30&r2=1.29&cvsroot=jukebox4 ----------------------------------- Index: Configuration.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/config/Configuration.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Configuration.java 2000/07/10 21:20:11 1.29 +++ Configuration.java 2000/07/25 17:42:28 1.30 @@ -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.29 2000/07/10 21:20:11 vt Exp $ + * @version $Id: Configuration.java,v 1.30 2000/07/25 17:42:28 vt Exp $ */ public class Configuration extends Hashtable { @@ -381,7 +381,24 @@ Vector dummy = new Vector(); - dummy.addElement(found); + if ( found instanceof String ) { + + for ( StringTokenizer st = new StringTokenizer((String)found, ",; "); st.hasMoreTokens(); ) { + + String token = st.nextToken(); + + // VT: FIXME: Analyze the previous token for the escape + // symbols so we can include the separators into values as + // well + + dummy.addElement(token); + } + + } else { + + dummy.addElement(found); + } + return dummy; } |