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

Wrong logic to find project when it's multi-module #2866

Open
jdneo opened this issue Sep 21, 2023 · 0 comments
Open

Wrong logic to find project when it's multi-module #2866

jdneo opened this issue Sep 21, 2023 · 0 comments
Labels

Comments

@jdneo
Copy link
Contributor

jdneo commented Sep 21, 2023

In the code base, there are some places that we use the path length to find the container and get the project. This may be not correct:

Arrays.sort(targetContainers, (Comparator<IContainer>) (IContainer a, IContainer b) -> {
return a.getFullPath().toPortableString().length() - b.getFullPath().toPortableString().length();
});

and

https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/91ebb5f9798946294c27d53e4eccebd847b650a3/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommand.java#L281C1-L284

More details and analysis can be found in microsoft/vscode-java-dependency#788

@jdneo jdneo added the bug label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant