diff --git a/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java b/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java index 00f68e9f..ad6a4735 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java +++ b/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java @@ -1,5 +1,5 @@ // -// $Id: ValueMarshaller.java,v 1.1 2001/11/26 23:44:40 mdb Exp $ +// $Id: ValueMarshaller.java,v 1.2 2001/12/11 01:38:08 mdb Exp $ package com.samskivert.util; @@ -27,7 +27,7 @@ public class ValueMarshaller Parser parser = (Parser)_parsers.get(type); if (parser == null) { String errmsg = "Don't know how to convert strings into " + - "values of type '" + type + "]."; + "values of type '" + type + "'."; throw new Exception(errmsg); } return parser.parse(source); @@ -67,6 +67,13 @@ public class ValueMarshaller } }); + // and booleans + _parsers.put(Boolean.TYPE, new Parser() { + public Object parse (String source) throws Exception { + return Boolean.valueOf(source); + } + }); + // and int arrays _parsers.put(INT_ARRAY_PROTOTYPE.getClass(), new Parser() { public Object parse (String source) throws Exception {