Skip to content

Commit a8c087b

Browse files
authored
Merge branch 'main' into fix/handle-nosuchmethoderror-isMainMethodCandidate
2 parents 24e81fb + 07b1e4c commit a8c087b

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,7 @@ private String getContents(IClassFile cf) {
466466
}
467467

468468
private static String getFileURI(IClassFile classFile) {
469-
String packageName = classFile.getParent().getElementName();
470-
String jarName = classFile.getParent().getParent().getElementName();
471-
try {
472-
return new URI(JDT_SCHEME, "contents", PATH_SEPARATOR + jarName + PATH_SEPARATOR + packageName
473-
+ PATH_SEPARATOR + classFile.getElementName(), classFile.getHandleIdentifier(), null)
474-
.toASCIIString();
475-
} catch (URISyntaxException e) {
476-
return null;
477-
}
469+
return JDTUtils.toUri(classFile);
478470
}
479471

480472
private static String getFileURI(IResource resource) {

0 commit comments

Comments
 (0)