Skip to content

Commit 9c21703

Browse files
fixup! Ensure method in interpreter root is unique.
1 parent cd90c5a commit 9c21703

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

substratevm/src/com.oracle.svm.interpreter/src/com/oracle/svm/interpreter/InterpreterFeature.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
227227

228228
private static AnalysisMethod getUniqueMethod(Class<?> cls, FeatureImpl.BeforeAnalysisAccessImpl accessImpl) {
229229
AnalysisMethod[] declaredMethods = accessImpl.getMetaAccess().lookupJavaType(cls).getDeclaredMethods(false);
230-
VMError.guarantee(declaredMethods.length == 1, "Expected exactly one method in " + cls + ", found: " + Arrays.toString(declaredMethods));
230+
if (declaredMethods.length != 1) {
231+
throw VMError.shouldNotReachHere("Expected exactly one method in " + cls + ", found: " + Arrays.toString(declaredMethods));
232+
}
231233
return declaredMethods[0];
232234
}
233235

0 commit comments

Comments
 (0)