now gets using isType method
@@ -33,11 +33,11 @@ public class TypeConverterRegistry {
@Nullable
public static <T> TypeConverter<T> get(Class<?> type) {
try {
- return (TypeConverter<T>) REGISTRY.get(type);
- } catch (Throwable t) {
+ for(TypeConverter<?> converter : REGISTRY.values()) if(converter.isType(type))
+ return (TypeConverter<T>)converter;
+ } catch (Throwable t) {}
return null;
}
- }
static {
registerAll(TypeConverters.BOOLEAN, boolean.class);
