From f2f57bb3877e8efbb43ecb6db9cd15e9cedf339d Mon Sep 17 00:00:00 2001 From: Emily McMullan Date: Wed, 20 Nov 2024 15:16:19 -0500 Subject: [PATCH] fix file uri for windows Signed-off-by: Emily McMullan --- .../pkg/java_external_provider/service_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external-providers/java-external-provider/pkg/java_external_provider/service_client.go b/external-providers/java-external-provider/pkg/java_external_provider/service_client.go index 84bce600..12fa4232 100644 --- a/external-providers/java-external-provider/pkg/java_external_provider/service_client.go +++ b/external-providers/java-external-provider/pkg/java_external_provider/service_client.go @@ -252,7 +252,7 @@ func (p *javaServiceClient) initialization(ctx context.Context) { //TODO(shawn-hurley): add ability to parse path to URI in a real supported way params := &protocol.InitializeParams{} - params.RootURI = fmt.Sprintf("file://%v", absLocation) + params.RootURI = string(uri.File(absLocation)) params.Capabilities = protocol.ClientCapabilities{} params.ExtendedClientCapilities = map[string]interface{}{ "classFileContentsSupport": true, @@ -261,7 +261,7 @@ func (p *javaServiceClient) initialization(ctx context.Context) { java8home := os.Getenv("JAVA8_HOME") params.InitializationOptions = map[string]interface{}{ "bundles": absBundles, - "workspaceFolders": []string{fmt.Sprintf("file://%v", absLocation)}, + "workspaceFolders": []string{string(uri.File(absLocation))}, "settings": map[string]interface{}{ "java": map[string]interface{}{ "configuration": map[string]interface{}{