fix(gateway): Check the correct assignable type
Closes gravitee-io/issues#532
@@ -161,7 +161,7 @@ public class ResourceManagerImpl extends AbstractLifecycleComponent<ResourceMana
return null;
}
- if (resource.getClass().isAssignableFrom(requiredType)) {
+ if (requiredType.isAssignableFrom(resource.getClass())) {
return (T) resource;
} else {
throw new IllegalArgumentException("Required type parameter does not match the resource type");
