timuralp commented on a change in pull request #135:
URL: https://github.com/apache/jclouds/pull/135#discussion_r820367119
##########
File path: core/src/main/java/org/jclouds/ContextBuilder.java
##########
@@ -370,7 +371,11 @@ private Properties currentStateToUnexpandedProperties() {
defaults.setProperty(PROPERTY_CREDENTIAL, credential);
if (overrides.isPresent())
putAllAsString(overrides.get(), defaults);
-
putAllAsString(propertiesPrefixedWithJcloudsApiOrProviderId(getSystemProperties(),
apiMetadata.getId(), providerId), defaults);
+ Map<String, Object> system =
propertiesPrefixedWithJcloudsApiOrProviderId(getSystemProperties(),
apiMetadata.getId(), providerId);
+ if (Strings.isNullOrEmpty((String) system.get(PROPERTY_ENDPOINT))) {
+ system.remove(PROPERTY_ENDPOINT);
Review comment:
Maybe. I'll submit an s3proxy change for the same.
The above doesn't mutate `System.getProperties()` -- the map is populated
with the values from system properties, API metadata, and provider metadata and
then the key is removed from that map. Maybe I should've used a better variable
name, but I don't see how the global state is mutated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]