Format code of DockerUntrustedSSLContextSupplier to fit jclouds code 
conventions and checkstyle settings


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/288d3876
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/288d3876
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/288d3876

Branch: refs/heads/master
Commit: 288d38761025856fdb604610cc4c0707e1ff8512
Parents: 4e30886
Author: Josef Cacek <[email protected]>
Authored: Mon Sep 28 11:20:30 2015 +0200
Committer: Josef Cacek <[email protected]>
Committed: Mon Sep 28 11:20:30 2015 +0200

----------------------------------------------------------------------
 .../DockerUntrustedSSLContextSupplier.java      | 51 ++++++++++----------
 1 file changed, 26 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/288d3876/apis/docker/src/main/java/org/jclouds/docker/suppliers/DockerUntrustedSSLContextSupplier.java
----------------------------------------------------------------------
diff --git 
a/apis/docker/src/main/java/org/jclouds/docker/suppliers/DockerUntrustedSSLContextSupplier.java
 
b/apis/docker/src/main/java/org/jclouds/docker/suppliers/DockerUntrustedSSLContextSupplier.java
index 42efa13..880a48a 100644
--- 
a/apis/docker/src/main/java/org/jclouds/docker/suppliers/DockerUntrustedSSLContextSupplier.java
+++ 
b/apis/docker/src/main/java/org/jclouds/docker/suppliers/DockerUntrustedSSLContextSupplier.java
@@ -33,32 +33,33 @@ import static com.google.common.base.Throwables.propagate;
 
 @Singleton
 public class DockerUntrustedSSLContextSupplier implements Supplier<SSLContext> 
{
-    private final Supplier<Credentials> creds;
-    private final SSLModule.TrustAllCerts insecureTrustManager;
+   private final Supplier<Credentials> creds;
+   private final SSLModule.TrustAllCerts insecureTrustManager;
 
+   @Inject
+   DockerUntrustedSSLContextSupplier(@Provider Supplier<Credentials> creds,
+         SSLModule.TrustAllCerts insecureTrustManager) {
+      this.creds = creds;
+      this.insecureTrustManager = insecureTrustManager;
+   }
 
-    @Inject
-    DockerUntrustedSSLContextSupplier(@Provider Supplier<Credentials> creds, 
SSLModule.TrustAllCerts insecureTrustManager) {
-        this.creds = creds;
-        this.insecureTrustManager = insecureTrustManager;
-    }
-
-    @Override
-    public SSLContext get() {
-        Credentials currentCreds = creds.get();
-        try {
-            SSLContextBuilder builder = new SSLContextBuilder();
-            // check if identity and credential are files, to set up sslContext
-            if (currentCreds!=null && new File(currentCreds.identity).isFile() 
&& new File(currentCreds.credential).isFile()) {
-               builder.clientKeyAndCertificate(currentCreds.credential, 
currentCreds.identity);
-            }
-            builder.trustManager(insecureTrustManager);
-            return builder.build();
-        } catch (GeneralSecurityException e) {
-            throw propagate(e);
-        } catch (IOException e) {
-            throw propagate(e);
-        }
-    }
+   @Override
+   public SSLContext get() {
+      Credentials currentCreds = creds.get();
+      try {
+         SSLContextBuilder builder = new SSLContextBuilder();
+         // check if identity and credential are files, to set up sslContext
+         if (currentCreds != null && new File(currentCreds.identity).isFile()
+               && new File(currentCreds.credential).isFile()) {
+            builder.clientKeyAndCertificate(currentCreds.credential, 
currentCreds.identity);
+         }
+         builder.trustManager(insecureTrustManager);
+         return builder.build();
+      } catch (GeneralSecurityException e) {
+         throw propagate(e);
+      } catch (IOException e) {
+         throw propagate(e);
+      }
+   }
 
 }

Reply via email to