GH-2285 - Unwrap invocation target exceptions in the AutoCloseableQueryRunner.
Closes #2285.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.neo4j.core;
|
||||
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.Collection;
|
||||
@@ -107,7 +108,11 @@ class DefaultNeo4jClient implements Neo4jClient {
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
return method.invoke(target, args);
|
||||
try {
|
||||
return method.invoke(target, args);
|
||||
} catch (InvocationTargetException ite) {
|
||||
throw ite.getCause();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user