diff --git a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java index 5652b922..2c39425e 100644 --- a/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java +++ b/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtSourceLookUpProvider.java @@ -466,15 +466,7 @@ private String getContents(IClassFile cf) { } private static String getFileURI(IClassFile classFile) { - String packageName = classFile.getParent().getElementName(); - String jarName = classFile.getParent().getParent().getElementName(); - try { - return new URI(JDT_SCHEME, "contents", PATH_SEPARATOR + jarName + PATH_SEPARATOR + packageName - + PATH_SEPARATOR + classFile.getElementName(), classFile.getHandleIdentifier(), null) - .toASCIIString(); - } catch (URISyntaxException e) { - return null; - } + return JDTUtils.toUri(classFile); } private static String getFileURI(IResource resource) {