Skip to content

Commit

Permalink
Merge pull request #398 from jwshin/master
Browse files Browse the repository at this point in the history
Use user defined type's class loader, when creating proxy
  • Loading branch information
jknack committed Aug 12, 2015
2 parents b901fff + 4d0a473 commit 238cf90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public <T> TypeSafeTemplate<T> as() {
* @return A new {@link TypeSafeTemplate}.
*/
private static Object newTypeSafeTemplate(final Class<?> rootType, final Template template) {
return Proxy.newProxyInstance(template.getClass().getClassLoader(), new Class[]{rootType },
return Proxy.newProxyInstance(rootType.getClassLoader(), new Class[]{rootType },
new InvocationHandler() {
private Map<String, Object> attributes = new HashMap<String, Object>();

Expand Down

0 comments on commit 238cf90

Please sign in to comment.