Skip to content

Commit f88027a

Browse files
committed
updated PointerIO to support ResolvedTypes.
1 parent bc06358 commit f88027a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/velocity/org/bridj/PointerIO.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,14 @@ public static <P> PointerIO<P> getInstance(Type type) {
153153
if (type == null)
154154
return null;
155155

156-
PointerIO io = ios.get(type);
156+
PointerIO io = null;
157+
158+
if( type instanceof ResolvedType ) {
159+
io = ios.get(((ResolvedType) type).getErasedType());
160+
}
161+
if( io == null ) {
162+
io = ios.get(type);
163+
}
157164
if (io == null) {
158165
final Class<?> cl = Utils.getClass(type);
159166
if (cl != null) {

0 commit comments

Comments
 (0)