Skip to content

Conversation

@miraleung
Copy link
Contributor

Fixes the following name conflict, which can occur in resource name helper classes. The relevant field in the example below is settingName.

 /** Builder for projects/{project_number}/settings/{setting_name}. */                              
public static class Builder {                                                                      
    private String projectNumber;                                                                    
    private String settingName; 

    // Existing code here.                                                                 
                                                                                                                                                                                                                                          
    private Builder(SettingName settingName) {                                                       
      Preconditions.checkArgument(                                                                   
          Objects.equals(settingName.pathTemplate, PROJECT_NUMBER_SETTING_NAME),                     
          "toBuilder is only supported when SettingName has the pattern of projects/{project_number}/settings/{setting_name}");
      projectNumber = settingName.projectNumber;                                                
      settingName = settingName.settingName;                                                    
    }                                                                                             
}    

@miraleung miraleung requested a review from a team June 15, 2021 22:04
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 15, 2021
@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #769 (c61aeae) into master (4f187b1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #769   +/-   ##
=======================================
  Coverage   91.71%   91.71%           
=======================================
  Files         140      140           
  Lines       14794    14795    +1     
  Branches     1052     1052           
=======================================
+ Hits        13568    13569    +1     
  Misses        942      942           
  Partials      284      284           
Impacted Files Coverage Δ
.../resourcename/ResourceNameHelperClassComposer.java 91.99% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f187b1...c61aeae. Read the comment docs.

Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

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

LGTM

@miraleung miraleung merged commit edac844 into master Jun 16, 2021
@miraleung miraleung deleted the fix/resnames_this branch June 16, 2021 16:25
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release *beep* *boop*
---


## [3.0.1](googleapis/java-shared-dependencies@v3.0.0...v3.0.1) (2022-08-02)


### Dependencies

* update dependency com.google.code.gson:gson to v2.9.1 ([#766](googleapis/java-shared-dependencies#766)) ([b0d531d](googleapis/java-shared-dependencies@b0d531d))
* update gax.version to v2.18.7 ([#767](googleapis/java-shared-dependencies#767)) ([02e98d5](googleapis/java-shared-dependencies@02e98d5))
* update google.core.version to v2.8.6 ([#770](googleapis/java-shared-dependencies#770)) ([3acea4b](googleapis/java-shared-dependencies@3acea4b))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
… to v1.41.5 (#769)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.http-client:google-http-client-bom](https://togithub.com/googleapis/google-http-java-client) | `1.41.4` -> `1.41.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.5/compatibility-slim/1.41.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.5/confidence-slim/1.41.4)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/google-http-java-client</summary>

### [`v1.41.5`](https://togithub.com/googleapis/google-http-java-client/blob/HEAD/CHANGELOG.md#&#8203;1415-httpsgithubcomgoogleapisgoogle-http-java-clientcomparev1414v1415-2022-03-21)

[Compare Source](https://togithub.com/googleapis/google-http-java-client/compare/v1.41.4...v1.41.5)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants