Skip to content

Commit c8df0bf

Browse files
committed
Fixed wrong type check and added support for Vector and Stack
1 parent 8b3f9b9 commit c8df0bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/javawebstack/abstractdata/mapper/DefaultMappers.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Object fromAbstract(MapperContext context, AbstractElement element, Class
5959
return element.string();
6060
}
6161
if(type.equals(char.class) || type.equals(Character.class)) {
62-
if(!element.isBoolean())
62+
if(!element.isString())
6363
throw new MapperWrongTypeException(context.getField().getName(), "string", Helpers.typeName(element));
6464
String s = element.string();
6565
if(s.length() != 1)
@@ -167,7 +167,9 @@ public Class<?>[] getSupportedTypes() {
167167
LinkedHashSet.class,
168168
CopyOnWriteArraySet.class,
169169
AbstractSet.class,
170-
ConcurrentSkipListSet.class
170+
ConcurrentSkipListSet.class,
171+
Vector.class,
172+
Stack.class
171173
};
172174
}
173175

0 commit comments

Comments
 (0)