[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataR...

noreply at shibboleth.net noreply at shibboleth.net
Tue Sep 30 03:22:25 EDT 2014


Author: rdw
Date: Tue Sep 30 03:22:23 2014
New Revision: 4092

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4092&view=rev
Log:
checkstyle

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java?rev=4092&r1=4091&r2=4092&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java Tue Sep 30 03:22:23 2014
@@ -23,7 +23,6 @@
 import java.net.URISyntaxException;
 import java.util.Timer;
 
-import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -73,10 +72,10 @@
 
     /** The Last-Modified information provided when the currently cached metadata was fetched. */
     private String cachedMetadataLastModified;
-    
+
     /** HttpClient credentials provider. */
     private BasicCredentialsProvider credentialsProvider;
-    
+
     /**
      * Constructor.
      * 
@@ -122,10 +121,10 @@
     public String getMetadataURI() {
         return metadataURI.toASCIIString();
     }
-    
-    /**
-     * Sets the username and password used to access the metadata URL. To disable BASIC authentication pass 
-     * null for the credentials instance.
+
+    /**
+     * Sets the username and password used to access the metadata URL. To disable BASIC authentication pass null for the
+     * credentials instance.
      * 
      * An {@link AuthScope} will be generated based off the metadata URI's hostname and port.
      * 
@@ -134,20 +133,20 @@
     public void setBasicCredentials(@Nullable final UsernamePasswordCredentials credentials) {
         setBasicCredentialsWithScope(credentials, null);
     }
-    
-    /**
-     * Sets the username and password used to access the metadata URL. To disable BASIC authentication pass 
-     * null for the credentials instance.
+
+    /**
+     * Sets the username and password used to access the metadata URL. To disable BASIC authentication pass null for the
+     * credentials instance.
      * 
      * <p>
-     * If the <code>authScope</code> is null, an {@link AuthScope} will be generated based off
-     * the metadata URI's hostname and port.
+     * If the <code>authScope</code> is null, an {@link AuthScope} will be generated based off the metadata URI's
+     * hostname and port.
      * </p>
      * 
      * @param credentials the username and password credentials
      * @param scope the HTTP client auth scope with which to scope the credentials, may be null
      */
-    public void setBasicCredentialsWithScope(@Nullable final UsernamePasswordCredentials credentials, 
+    public void setBasicCredentialsWithScope(@Nullable final UsernamePasswordCredentials credentials,
             @Nullable final AuthScope scope) {
         ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
@@ -164,21 +163,23 @@
             log.debug("Either username or password were null, disabling basic auth");
             credentialsProvider = null;
         }
-        
+
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void doDestroy() {
         httpClient = null;
         credentialsProvider = null;
         metadataURI = null;
         cachedMetadataETag = null;
         cachedMetadataLastModified = null;
-        
+
         super.doDestroy();
     }
 
     /** {@inheritDoc} */
+    @Override
     protected String getMetadataIdentifier() {
         return metadataURI.toString();
     }
@@ -191,11 +192,12 @@
      * 
      * @throws ResolverException thrown if there is a problem retrieving the metadata from the remote server
      */
+    @Override
     protected byte[] fetchMetadata() throws ResolverException {
         final HttpGet httpGet = buildHttpGet();
         final HttpClientContext context = buildHttpClientContext();
         HttpResponse response = null;
-        
+
         try {
             log.debug("Attempting to fetch metadata document from '{}'", metadataURI);
             response = httpClient.execute(httpGet, context);
@@ -207,8 +209,8 @@
             }
 
             if (httpStatusCode != HttpStatus.SC_OK) {
-                final String errMsg = "Non-ok status code " + httpStatusCode
-                        + " returned from remote metadata source " + metadataURI;
+                final String errMsg =
+                        "Non-ok status code " + httpStatusCode + " returned from remote metadata source " + metadataURI;
                 log.error(errMsg);

[... 47 lines stripped ...]


More information about the commits mailing list