8000 fix(spring): fix and refactor class names for autoconfiguration and properties by emmileaf · Pull Request #1091 · googleapis/sdk-platform-java · GitHub
[go: up one dir, main page]

Skip to content

fix(spring): fix and refactor class nam 8000 es for autoconfiguration and properties #1091

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

Merged
merged 6 commits into from
Nov 18, 2022

Conversation

emmileaf
Copy link
Contributor
@emmileaf emmileaf commented Nov 10, 2022

In this PR:

  • In logging code and autoconfig registration file: fixed class name from <Service>SpringAutoConfig to <Service>SpringAutoConfiguration
  • Also refactored class names for <Service>SpringAutoConfiguration and <Service>SpringProperties classes into utils to reduce potential inconsistency in the composer code

This PR was originally opened to track and (patch where applicable) some missing items (from compiling/testing against the generated module for language):

Fixing through separate PRs:

@emmileaf emmileaf added the spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch. label Nov 10, 2022
@@ -138,7 +138,7 @@ static String buildAutoConfigRegistrationString(GapicContext context) {
service ->
sb.add(
String.format(
"%s.spring.%sSpringAutoConfig", service.pakkage(), service.name())));
"%s.spring.%sSpringAutoConfiguration", service.pakkage(), service.name())));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Now I wonder if it's worth to extract this name and the properties class name into a util, so in case we change it in the future, they stay consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea - I'll work on refactoring in this PR to something more future-proof. This is likely the only issue that will be patched here (since all of the other items are being addressed separately) so I'll update the description and title when ready for review.

@emmileaf emmileaf changed the title fix(spring): patches for compiling and testing generated code fix(spring): fix and refactor class names for autoconfiguration and properties Nov 16, 2022
@emmileaf emmileaf marked this pull request as ready for review November 16, 2022 14:31
@emmileaf emmileaf requested review from a team as code owners November 16, 2022 14:31
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@emmileaf emmileaf merged commit d5d626a into autoconfig-gen-draft2 Nov 18, 2022
@emmileaf emmileaf deleted the spring-generated-patch branch November 18, 2022 20:03
zhumin8 added a commit that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0