Skip to content

Commit 0afe859

Browse files
committed
rework after review
1 parent d360f25 commit 0afe859

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageDebugInfoProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private class NativeImageDebugCodeInfo implements DebugCodeInfo {
102102
this.compilation = compilation;
103103
SourceManager sourceManager = ImageSingletons.lookup(SourceManager.class);
104104
try (DebugContext.Scope s = debugContext.scope("DebugCodeInfo", declaringClass)) {
105-
fullFilePath = ImageSingletons.lookup(SourceManager.class).findAndCacheSource(javaType, clazz, debugContext);
105+
fullFilePath = sourceManager.findAndCacheSource(javaType, clazz, debugContext);
106106
this.cachePath = sourceManager.getCachePathForSource(javaType);
107107
} catch (Throwable e) {
108108
throw debugContext.handle(e);
@@ -316,9 +316,10 @@ private void computeFullFilePathAndCachePath() {
316316
if (declaringClass instanceof AnalysisType) {
317317
declaringClass = ((AnalysisType) declaringClass).getWrapped();
318318
}
319+
SourceManager sourceManager = ImageSingletons.lookup(SourceManager.class);
319320
try (DebugContext.Scope s = debugContext.scope("DebugCodeInfo", declaringClass)) {
320-
fullFilePath = ImageSingletons.lookup(SourceManager.class).findAndCacheSource(declaringClass, clazz, debugContext);
321-
cachePath = ImageSingletons.lookup(SourceManager.class).getCachePathForSource(declaringClass);
321+
fullFilePath = sourceManager.findAndCacheSource(declaringClass, clazz, debugContext);
322+
cachePath = sourceManager.getCachePathForSource(declaringClass);
322323
} catch (Throwable e) {
323324
throw debugContext.handle(e);
324325
}

0 commit comments

Comments
 (0)