refactor: extract Firestore emulator credentials to separate emulator package - #4607
Open
lqiu96 wants to merge 1 commit into
Open
refactor: extract Firestore emulator credentials to separate emulator package#4607lqiu96 wants to merge 1 commit into
lqiu96 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refactors the Firestore emulator credentials implementation in
GcpFirestoreEmulatorAutoConfiguration:Credentialsimplementation from an anonymous inner class incom.google.cloud.spring.autoconfigure.firestoreintocom.google.cloud.spring.autoconfigure.emulator.FirestoreEmulatorCredentials.excludeFilterspreviously added toFirestoreRepositoriesAutoConfigureRegistrar.Rationale
In Java 8 runtimes, Spring Data's repository component scanning inspects all classes in the auto-configuration package. An anonymous inner class extending
com.google.auth.Credentials(which now carries JSpecify 1.0.0 annotations targeting Java 9ElementType.MODULE) triggered anArrayStoreExceptionon Java 8. Moving this internal credentials class to a dedicatedemulatorpackage prevents Spring Data from scanning it as a repository candidate without requiring any regex filters or test package modifications.Compatibility
Zero breaking impact. The previous class was a
privateanonymous inner class; its return type, public API, and header injection behavior (Authorizationandgoogle-cloud-resource-prefix) remain identical.