SLING-10339 temporarily explicitly initialize FSPackageRegistry #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements a workaround for https://issues.apache.org/jira/browse/JCRVLT-517 : it is possible that the FSPackageRegistry didn't initialize it's stateCache and the FSPackageRegistry.contains() method, which us used from ExecutionBuilderImpl, doesn't initialize it's cache either - thus dependencies of packages aren't found and the execution plan fails.
The call to FSPackageRegistry.packages() forces the initialization of the stateCache of the registry, and now it works. Thus this can be used with Jackrabbit Vault 3.4.10 as well.
The test failed since the FSPackageRegistry didn't have a home directory set. I just replaced it with a mock, since, as far as I can tell, none of it's funktionality is actually used in the test.