Skip to content

Commit

Permalink
updated PointerIO to support ResolvedTypes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrimble committed Jan 18, 2017
1 parent bc06358 commit f88027a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/velocity/org/bridj/PointerIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ public static <P> PointerIO<P> getInstance(Type type) {
if (type == null)
return null;

PointerIO io = ios.get(type);
PointerIO io = null;

if( type instanceof ResolvedType ) {
io = ios.get(((ResolvedType) type).getErasedType());
}
if( io == null ) {
io = ios.get(type);
}
if (io == null) {
final Class<?> cl = Utils.getClass(type);
if (cl != null) {
Expand Down

0 comments on commit f88027a

Please sign in to comment.