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

Prevent aggressive classpath updates when jars don't change #1078

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

jdneo
Copy link
Contributor

@jdneo jdneo commented Jun 25, 2019

Signed-off-by: Sheng Chen sheche@microsoft.com

It seems that here the Arrays.equals() is intended to be used, since the original condition in the if-block will always return true.

Signed-off-by: Sheng Chen <sheche@microsoft.com>
@fbricon
Copy link
Contributor

fbricon commented Jul 1, 2019

Indeed this is the proper comparison method. Do you have a reference to a bug this is fixing? Unit test would be a plus too.

@jdneo
Copy link
Contributor Author

jdneo commented Jul 2, 2019

@fbricon I just found this issue when I was reading the codes.

From my understanding, always executing javaProject.setRawClasspath(newClasspath, monitor); does no harm actually, but it's a redundent execution if newClasspath and rawClasspath and exactly the same.

Should I file an issue for this PR as a reference?

@fbricon
Copy link
Contributor

fbricon commented Jul 2, 2019

No it's ok.

@fbricon fbricon added the bug label Jul 2, 2019
@fbricon fbricon changed the title Use Arrays.equals() to compare two arrays Prevent aggressive classpath updates when jars don't change Jul 2, 2019
@fbricon fbricon merged commit 672dc6f into eclipse-jdtls:master Jul 2, 2019
@fbricon fbricon added this to the Mid July 2019 milestone Jul 2, 2019
@jdneo jdneo deleted the cs/array-equal branch July 3, 2019 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants