Skip to content

Commit b45fb47

Browse files
committed
Notebook hangs when a static method signature is redefined #64
1 parent c760a8b commit b45fb47

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- #55 Working on POM in SNAPSHOT mode fails to work properly due to .ivy2 cache
66
- #57 Black error message in dark mode (e.g. VSCode) not easily readable
77
- #59 BaseKernel.eval(..) should not declare a checked exception
8+
- #64 Notebook hangs when a static method signature is redefined
89

910
## 1.0-a4
1011

jjava/src/main/java/org/dflib/jjava/execution/JJavaLoaderDelegate.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,13 @@ protected Class<?> findClass(String name) throws ClassNotFoundException {
105105
if (data == null) {
106106
return super.findClass(name);
107107
}
108-
return super.defineClass(name, data, 0, data.length, (CodeSource) null);
108+
try {
109+
return super.defineClass(name, data, 0, data.length, (CodeSource) null);
110+
} catch (LinkageError er) {
111+
// rethrow as ClassNotFoundException to let the caller properly handle this case
112+
// this error could be thrown in some cases (like static method signature change)
113+
throw new ClassNotFoundException(name, er);
114+
}
109115
}
110116
}
111117
}

0 commit comments

Comments
 (0)