Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Add GaxPropertiesProvider as a utility class#250

Merged
shinfan merged 11 commits intogoogleapis:masterfrom
shinfan:master
Mar 22, 2017
Merged

Add GaxPropertiesProvider as a utility class#250
shinfan merged 11 commits intogoogleapis:masterfrom
shinfan:master

Conversation

@shinfan
Copy link
Copy Markdown
Contributor

@shinfan shinfan commented Mar 22, 2017

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

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 22, 2017

Codecov Report

Merging #250 into master will decrease coverage by 0.28%.
The diff coverage is 64.7%.

@@             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
Impacted Files Coverage Δ Complexity Δ
...gle/api/gax/grpc/InstantiatingChannelProvider.java 49.42% <100%> (-4.43%) 10 <0> (-4)
...com/google/api/gax/core/GaxPropertiesProvider.java 53.84% <53.84%> (ø) 5 <5> (?)
...java/com/google/api/gax/grpc/RetryingCallable.java 85.18% <0%> (-1.86%) 6% <0%> (ø)
...om/google/api/gax/retrying/RetryingFutureImpl.java 82.25% <0%> (-1.62%) 13% <0%> (-1%)

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 b454532...226447d. Read the comment docs.

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.

@@ -0,0 +1,73 @@
/*
* Copyright 2016, Google Inc. All rights reserved.

This comment was marked as spam.

This comment was marked as spam.

/**
* Provides meta-data properties stored in gax.properties
*/
public class PropertiesProvider {

This comment was marked as spam.

This comment was marked as spam.

@shinfan
Copy link
Copy Markdown
Contributor Author

shinfan commented Mar 22, 2017

PTAL @garrettjonesgoogle

Copy link
Copy Markdown
Contributor

@garrettjonesgoogle garrettjonesgoogle left a comment

Choose a reason for hiding this comment

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

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.

@shinfan shinfan changed the title Add PropertiesProvider as a utility class Add GaxPropertiesProvider as a utility class Mar 22, 2017
*/
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.

@shinfan
Copy link
Copy Markdown
Contributor Author

shinfan commented Mar 22, 2017

Commit msg updated. PTAL

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

LGTM after tests pass.

@shinfan shinfan merged commit 97eccff into googleapis:master Mar 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants