Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -672,15 +672,13 @@ public static ProjectDependenciesResult getProjectDependencies(List<Object> argu
return new ProjectDependenciesResult(ProjectDependenciesErrorReason.INVALID_URI, fileUri);
}

// Validate URI format
String parsedPath = null;
// Validate URI format using JDTUtils
try {
java.net.URI uri = new java.net.URI(fileUri);
parsedPath = uri.getPath();
if (parsedPath == null) {
return new ProjectDependenciesResult(ProjectDependenciesErrorReason.URI_PARSE_FAILED, parsedPath);
java.net.URI uri = JDTUtils.toURI(fileUri);
if (uri == null) {
return new ProjectDependenciesResult(ProjectDependenciesErrorReason.URI_PARSE_FAILED, fileUri);
}
} catch (java.net.URISyntaxException e) {
} catch (Exception e) {
return new ProjectDependenciesResult(ProjectDependenciesErrorReason.MALFORMED_URI, fileUri);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*******************************************************************************
/*******************************************************************************
* Copyright (c) 2018 Microsoft Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down
Loading