Add GaxPropertiesProvider as a utility class#250
Conversation
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
============================================
- Coverage 71.06% 70.78% -0.29%
Complexity 527 527
============================================
Files 75 76 +1
Lines 2592 2601 +9
Branches 268 268
============================================
- Hits 1842 1841 -1
- Misses 647 656 +9
- Partials 103 104 +1
Continue to review full report at Codecov.
|
| package com.google.api.gax.grpc; | ||
|
|
||
| import com.google.api.gax.core.CredentialsProvider; | ||
| import com.google.api.gax.utils.PropertiesProvider; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @@ -0,0 +1,73 @@ | |||
| /* | |||
| * Copyright 2016, Google Inc. All rights reserved. | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| /** | ||
| * Provides meta-data properties stored in gax.properties | ||
| */ | ||
| public class PropertiesProvider { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
973a287 to
b454532
Compare
|
PTAL @garrettjonesgoogle |
garrettjonesgoogle
left a comment
There was a problem hiding this comment.
Be sure to update the commit message (the class name is out of date)
| try { | ||
| if (gaxProperties.isEmpty()) { | ||
| gaxProperties.load( | ||
| InstantiatingChannelProvider.class |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| */ | ||
| package com.google.api.gax.core; | ||
|
|
||
| import com.google.api.gax.grpc.InstantiatingChannelProvider; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Commit msg updated. PTAL |
|
LGTM after tests pass. |
Separate the property loading functionality as a utility class so it can be easily reused in google-cloud-java.
More context: https://github.com/GoogleCloudPlatform/google-cloud-java/pull/1790/files