@Test public void validConversions() throws Exception { for (TypeConverter pc : pcs) { Object obj = pc.convert("0"); Assert.assertEquals(obj, TypeConverterUtil.convert("0", obj.getClass())); Assert.assertEquals(Short.valueOf((short)0), pc.convert("0")); Assert.assertEquals(Short.valueOf((short)-32768), pc.convert("-32768")); Assert.assertEquals(Short.valueOf((short)32767), pc.convert("32767")); Assert.assertEquals(Short.valueOf((short)0), pc.convert("0x0")); Assert.assertEquals(Short.valueOf((short)0), pc.convert("0X0")); Assert.assertEquals(Short.valueOf((short)32767), pc.convert("0x7FFF")); Assert.assertEquals(Short.valueOf((short)0xFFFF), pc.convert("0xFFFF")); } }
@Override public Object convert(String value) throws ConversionException { return (Short)super.convert(value); }
ShortTypeConverter extends ShortPrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Short)super.convert(value); } }
ShortTypeConverter extends ShortPrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Short)super.convert(value); }  }
ShortTypeConverter extends ShortPrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Short)super.convert(value); }  @Override Object convert(String value); }
ShortTypeConverter extends ShortPrimitiveTypeConverter { @Override public Object convert(String value) throws ConversionException { return (Short)super.convert(value); }  @Override Object convert(String value);  }