From bf0b4a499936078564653c3daa013490d9539abf Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 6 Feb 2003 22:47:41 +0000 Subject: [PATCH] Add support for parsing shorts. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1054 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/ValueMarshaller.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java b/projects/samskivert/src/java/com/samskivert/util/ValueMarshaller.java index ee100fc7..f80e21d4 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.7 2003/01/29 10:34:06 mdb Exp $ +// $Id: ValueMarshaller.java,v 1.8 2003/02/06 22:47:41 mdb Exp $ package com.samskivert.util; @@ -63,6 +63,13 @@ public class ValueMarshaller } }); + // and shorts + _parsers.put(Short.TYPE, new Parser() { + public Object parse (String source) throws Exception { + return Short.valueOf(source); + } + }); + // and ints _parsers.put(Integer.TYPE, new Parser() { public Object parse (String source) throws Exception {