Skip to content

Commit d2b8cfa

Browse files
committed
Issue #76 - Change the comparaison method of toString
1 parent 0d678bf commit d2b8cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ch/powerunit/extensions/exceptions/InternalHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private InternalHelper() {
3535
public static <T extends ExceptionHandlerSupport<?, ?, ?>> T documented(T target, Supplier<String> toString) {
3636
return (T) Proxy.newProxyInstance(target.getClass().getClassLoader(),
3737
allInterfaces(target.getClass()).stream().distinct().toArray(Class[]::new), (proxy, method, args) -> {
38-
if (method.getName().equals("toString") && method.getParameterCount() == 0) {
38+
if (method.toString().endsWith(".toString()")) {
3939
return toString.get();
4040
}
4141
try {

0 commit comments

Comments
 (0)