From d08e2a768d15d1c356f6b4e40d3885636d9cc905 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Mon, 17 Jun 2024 10:49:42 +0800 Subject: [PATCH] Use org.eclipse.core.filesystem.URIUtil.toURI(...) to convert file path to URI --- .../jdt/internal/core/builder/AbstractImageBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java index d7f402f92d3..0f739005059 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java @@ -15,6 +15,7 @@ package org.eclipse.jdt.internal.core.builder; import org.eclipse.core.runtime.*; +import org.eclipse.core.filesystem.URIUtil; import org.eclipse.core.resources.*; import org.eclipse.jdt.core.*; @@ -653,7 +654,7 @@ private CompilerConfiguration prepareCompilerConfiguration(CompilerOptions optio classpaths.add(cpURI); } } else if (location instanceof ClasspathJar cpJar) { - URI cpURI = new File(cpJar.zipFilename).toURI(); + URI cpURI = URIUtil.toURI(cpJar.zipFilename, true); if (cpJar.isOnModulePath) { modulepaths.add(cpURI); } else {