Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated constructor 'URL.<init>(String)' changed to URI.toURL #1237

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Red Hat Inc. and others.
* Copyright (c) 2024, 2025 Red Hat Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -28,7 +28,9 @@
import org.eclipse.lsp4j.SymbolKind;

import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -112,7 +114,12 @@ private static SymbolInformation createSymbol(JaxRsMethodInfo methodInfo, IPsiUt
Location location = new Location(methodInfo.getDocumentUri(), r);

StringBuilder nameBuilder = new StringBuilder("@");
URL url = new URL(methodInfo.getUrl());
URL url;
try {
url = new URI(methodInfo.getUrl()).toURL();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
anusreelakshmi934 marked this conversation as resolved.
Show resolved Hide resolved
String path = url.getPath();
nameBuilder.append(path);
nameBuilder.append(": ");
Expand Down
Loading