You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2013/05/15 22:58:13 UTC

git commit: JCLOUDS-41: Using builder.build(context) instead of an explicit cast Aligns the change made in c94ed110a with the code in 1.6.x

Updated Branches:
  refs/heads/master 418a7c149 -> 6b75d5aa3


JCLOUDS-41: Using builder.build(context) instead of an explicit cast
  Aligns the change made in c94ed110a with the code in 1.6.x


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-karaf/commit/6b75d5aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-karaf/tree/6b75d5aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-karaf/diff/6b75d5aa

Branch: refs/heads/master
Commit: 6b75d5aa35749c6935fc0427a7b1d5a5bc50fa2f
Parents: 418a7c1
Author: Andrew Phillips <de...@yahoo.co.uk>
Authored: Wed May 15 16:22:28 2013 -0400
Committer: Andrew Phillips <an...@apache.org>
Committed: Wed May 15 16:57:50 2013 -0400

----------------------------------------------------------------------
 .../org/jclouds/karaf/chef/core/ChefHelper.java    |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds-karaf/blob/6b75d5aa/chef/core/src/main/java/org/jclouds/karaf/chef/core/ChefHelper.java
----------------------------------------------------------------------
diff --git a/chef/core/src/main/java/org/jclouds/karaf/chef/core/ChefHelper.java b/chef/core/src/main/java/org/jclouds/karaf/chef/core/ChefHelper.java
index 6450506..176ad7f 100644
--- a/chef/core/src/main/java/org/jclouds/karaf/chef/core/ChefHelper.java
+++ b/chef/core/src/main/java/org/jclouds/karaf/chef/core/ChefHelper.java
@@ -340,8 +340,8 @@ public class ChefHelper {
         builder = builder.name(name).modules(ImmutableSet.<Module>of(new SLF4JLoggingModule()));
         builder = builder.name(name).credentials(clientName, clientCredential).overrides(chefConfig);
 
-        // cast required for Java 6
-        ChefContext context = (ChefContext) builder.build();
+        // builder.build() does not compile on JDK 6
+        ChefContext context = builder.build(ChefContext.class);
         ChefService service = context.getChefService();
         return service;
     }