File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
jdtls.ext/com.microsoft.jdtls.ext.core/src/com/microsoft/jdtls/ext/core Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -672,15 +672,13 @@ public static ProjectDependenciesResult getProjectDependencies(List<Object> argu
672672 return new ProjectDependenciesResult (ProjectDependenciesErrorReason .INVALID_URI , fileUri );
673673 }
674674
675- // Validate URI format
676- String parsedPath = null ;
675+ // Validate URI format using JDTUtils
677676 try {
678- java .net .URI uri = new java .net .URI (fileUri );
679- parsedPath = uri .getPath ();
680- if (parsedPath == null ) {
681- return new ProjectDependenciesResult (ProjectDependenciesErrorReason .URI_PARSE_FAILED , parsedPath );
677+ java .net .URI uri = JDTUtils .toURI (fileUri );
678+ if (uri == null ) {
679+ return new ProjectDependenciesResult (ProjectDependenciesErrorReason .URI_PARSE_FAILED , fileUri );
682680 }
683- } catch (java . net . URISyntaxException e ) {
681+ } catch (Exception e ) {
684682 return new ProjectDependenciesResult (ProjectDependenciesErrorReason .MALFORMED_URI , fileUri );
685683 }
686684
Original file line number Diff line number Diff line change 1- /*******************************************************************************
1+ /*******************************************************************************
22 * Copyright (c) 2018 Microsoft Corporation and others.
33 * All rights reserved. This program and the accompanying materials
44 * are made available under the terms of the Eclipse Public License v1.0
You can’t perform that action at this time.
0 commit comments