Skip to content

Commit

Permalink
Removed the try-catch block for URISyntaxException and added it to th…
Browse files Browse the repository at this point in the history
…e throws clause
  • Loading branch information
anusreelakshmi934 committed Jan 28, 2025
1 parent cf7ec94 commit 3638520
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,13 @@ private static Set<PsiClass> getAllJaxRsTypes(Module javaProject, IPsiUtils util
return jaxrsTypes;
}

private static SymbolInformation createSymbol(JaxRsMethodInfo methodInfo, IPsiUtils utils) throws MalformedURLException {
private static SymbolInformation createSymbol(JaxRsMethodInfo methodInfo, IPsiUtils utils) throws MalformedURLException, URISyntaxException {
TextRange sourceRange = methodInfo.getJavaMethod().getNameIdentifier().getTextRange();
Range r = utils.toRange(methodInfo.getJavaMethod(), sourceRange.getStartOffset(), sourceRange.getLength());
Location location = new Location(methodInfo.getDocumentUri(), r);

StringBuilder nameBuilder = new StringBuilder("@");
URL url;
try {
url = new URI(methodInfo.getUrl()).toURL();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
URL url = new URI(methodInfo.getUrl()).toURL();
String path = url.getPath();
nameBuilder.append(path);
nameBuilder.append(": ");
Expand Down

0 comments on commit 3638520

Please sign in to comment.