Skip to content

Conversation

@snjeza
Copy link
Contributor

@snjeza snjeza commented Sep 27, 2025

Fixes #4444

@rgrunber
Copy link
Contributor

The zipfile part seems similar to some of the work done in #26 .

@stephan-herrmann
Copy link
Contributor

We get a new warning: "At least one of the problems in category 'resource' is not analysed ... " which is indeed a bit obscure here, but what it tries to convey: @SuppressWarnings("resource") is no longer necessary (but ecj isn't 100% sure about that).

I believe the issue arises with the proposed change, because flow analysis is less sure about zip because we no longer get a fresh ZipFile on each path.

Before the change the annotation suppresses this warning:

Resource 'zip' should be managed by try-with-resource

To sum up: removing the annotation should be fine and resolve the warning

@snjeza
Copy link
Contributor Author

snjeza commented Oct 16, 2025

To sum up: removing the annotation should be fine and resolve the warning

@stephan-herrmann I have removed it.

@stephan-herrmann
Copy link
Contributor

To sum up: removing the annotation should be fine and resolve the warning

@stephan-herrmann I have removed it.

Thanks.

Unfortunately we now have a failure in org.eclipse.jdt.core.tests.model.SearchTests.testConcurrentJob.

This might be an intermittent problem, but since the changes relate to indexing, a failure in a search test could hint at a real problem. Could your changes possibly introduce some kind of race condition?

@snjeza
Copy link
Contributor Author

snjeza commented Oct 17, 2025

Unfortunately we now have a failure in org.eclipse.jdt.core.tests.model.SearchTests.testConcurrentJob.

I can reproduce the issue. Trying to fix it.

@snjeza
Copy link
Contributor Author

snjeza commented Oct 19, 2025

Unfortunately we now have a failure in org.eclipse.jdt.core.tests.model.SearchTests.testConcurrentJob.
This might be an intermittent problem, but since the changes relate to indexing, a failure in a search test could hint at a real problem. Could your changes possibly introduce some kind of race condition?

The test failed because of a bug in JavaModelManager.getZipFile(IPath). If a zip file has been changed, JavaModelManager won't register that change.
@stephan-herrmann I have updated the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance Indexer performance

3 participants