Repository: jclouds Updated Branches: refs/heads/master 3659a5f58 -> 3fdb6d2e9
Avoid extra copy with Splitter result Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/3fdb6d2e Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/3fdb6d2e Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/3fdb6d2e Branch: refs/heads/master Commit: 3fdb6d2e9114e2834d15df8ce7706cb2f8262de5 Parents: 3659a5f Author: Andrew Gaul <[email protected]> Authored: Mon Jul 7 23:34:16 2014 -0700 Committer: Andrew Gaul <[email protected]> Committed: Mon Jul 7 23:36:22 2014 -0700 ---------------------------------------------------------------------- core/src/main/java/org/jclouds/ContextBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/3fdb6d2e/core/src/main/java/org/jclouds/ContextBuilder.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/jclouds/ContextBuilder.java b/core/src/main/java/org/jclouds/ContextBuilder.java index 69331f6..ac547bf 100644 --- a/core/src/main/java/org/jclouds/ContextBuilder.java +++ b/core/src/main/java/org/jclouds/ContextBuilder.java @@ -94,10 +94,10 @@ import com.google.common.base.Predicate; import com.google.common.base.Splitter; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap.Builder; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; import com.google.common.reflect.TypeToken; import com.google.common.util.concurrent.ExecutionList; import com.google.inject.Guice; @@ -399,15 +399,15 @@ public class ContextBuilder { modules.add(new LifeCycleModule()); modules.add(new BindProviderMetadataContextAndCredentials(providerMetadata, creds)); modules.add(new BindNameToContext(name)); - Injector returnVal = Guice.createInjector(Stage.PRODUCTION, modules); + Injector returnVal = Guice.createInjector(GUICE_STAGE, modules); returnVal.getInstance(ExecutionList.class).execute(); return returnVal; } static Properties resolveProperties(Properties mutable, String providerId, Set<String> keys, Set<String> optionalKeys) throws NoSuchElementException { for (String key : keys) { + String scopedProperty = Iterables.get(Splitter.on('.').split(key), 1); try { - String scopedProperty = ImmutableList.copyOf(Splitter.on('.').split(key)).get(1); mutable.setProperty(key, searchPropertiesForProviderScopedProperty(mutable, providerId, scopedProperty)); } catch (NoSuchElementException e) { if (!optionalKeys.contains(key))
