[java-shib-profile] branch main updated: Checkstyle.

Scott Cantor cantor.2 at osu.edu
Wed Jan 10 22:12:17 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-shib-profile.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-profile.git;a=commit;h=d69e7fc57208cc5c5a7cccd2e81424f9b9af48b1

The following commit(s) were added to refs/heads/main by this push:
     new d69e7fc  Checkstyle.
d69e7fc is described below

commit d69e7fc57208cc5c5a7cccd2e81424f9b9af48b1
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jan 10 17:12:15 2024 -0500

    Checkstyle.
---
 .../java/net/shibboleth/profile/module/AbstractModule.java   |  9 ++++++---
 .../src/main/java/net/shibboleth/profile/module/Module.java  | 12 ++++++------
 .../net/shibboleth/profile/module/PropertyDrivenModule.java  |  7 ++++---
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/module/AbstractModule.java b/shib-profile-api/src/main/java/net/shibboleth/profile/module/AbstractModule.java
index fdcdffd..597cf66 100644
--- a/shib-profile-api/src/main/java/net/shibboleth/profile/module/AbstractModule.java
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/module/AbstractModule.java
@@ -101,6 +101,7 @@ public abstract class AbstractModule implements Module {
         }
     }
     
+// Checkstyle: CyclomaticComplexity OFF
     /** {@inheritDoc} */
     public boolean isEnabled(@Nonnull final ModuleContext moduleContext) {
         
@@ -149,9 +150,11 @@ public abstract class AbstractModule implements Module {
         log.debug("Module {} is enabled", getId());
         return true;
     }
+// Checkstyle: CyclomaticComplexity ON
     
     /** {@inheritDoc} */
-    @Nonnull @Unmodifiable @NotLive public Map<ModuleResource, ResourceResult> enable(@Nonnull final ModuleContext moduleContext)
+    @Nonnull @Unmodifiable @NotLive public Map<ModuleResource, ResourceResult> enable(
+            @Nonnull final ModuleContext moduleContext)
             throws ModuleException {
         
         if (moduleContext.getInstallLocation().startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
@@ -431,8 +434,8 @@ public abstract class AbstractModule implements Module {
             try {
                 log.debug("Module {} fetching HTTP resource {}", getId(), uri);
                 final HttpGet request = new HttpGet(uri);
-                response = Constraint.isNotNull(
-                        moduleContext.getHttpClient(), "HttpClient cannot be null").executeOpen(null, request, clientContext);
+                response = Constraint.isNotNull(moduleContext.getHttpClient(),
+                        "HttpClient cannot be null").executeOpen(null, request, clientContext);
                 HttpClientSecuritySupport.checkTLSCredentialEvaluated(clientContext, request.getScheme());
                 if (response.getCode() != 200) {
                     throw new IOException("HTTP request was unsuccessful");
diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/module/Module.java b/shib-profile-api/src/main/java/net/shibboleth/profile/module/Module.java
index 7e05301..d84649b 100644
--- a/shib-profile-api/src/main/java/net/shibboleth/profile/module/Module.java
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/module/Module.java
@@ -104,8 +104,8 @@ public interface Module extends IdentifiedComponent {
      *
      * @throws ModuleException if not successful 
      */
-    @Nonnull @Unmodifiable @NotLive Map<ModuleResource,ResourceResult> enable(@Nonnull final ModuleContext moduleContext)
-            throws ModuleException;
+    @Nonnull @Unmodifiable @NotLive Map<ModuleResource,ResourceResult> enable(
+            @Nonnull final ModuleContext moduleContext) throws ModuleException;
 
     /**
      * Disable the module.
@@ -120,8 +120,8 @@ public interface Module extends IdentifiedComponent {
      *
      * @throws ModuleException if not successful 
      */
-    @Nonnull @Unmodifiable @NotLive Map<ModuleResource,ResourceResult> disable(@Nonnull final ModuleContext moduleContext,
-            final boolean clean) throws ModuleException;
+    @Nonnull @Unmodifiable @NotLive Map<ModuleResource,ResourceResult> disable(
+            @Nonnull final ModuleContext moduleContext, final boolean clean) throws ModuleException;
 
     /** Return the extension that the module manager will use to preserve user files.
      * @return the string.
@@ -136,7 +136,7 @@ public interface Module extends IdentifiedComponent {
     /**
      * Interface to a resource managed by the module.
      */
-    public interface ModuleResource {
+    interface ModuleResource {
 
         /**
          * Gets the source location of the resource.
@@ -192,7 +192,7 @@ public interface Module extends IdentifiedComponent {
     }
 
     /** Resource management outcome. */
-    public enum ResourceResult {
+    enum ResourceResult {
         /** Resource was created. */
         CREATED,
 
diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/module/PropertyDrivenModule.java b/shib-profile-api/src/main/java/net/shibboleth/profile/module/PropertyDrivenModule.java
index 20c4506..5b18657 100644
--- a/shib-profile-api/src/main/java/net/shibboleth/profile/module/PropertyDrivenModule.java
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/module/PropertyDrivenModule.java
@@ -126,7 +126,7 @@ public abstract class PropertyDrivenModule extends AbstractModule implements Mod
      * @throws IOException if unable to read file
      * @throws ModuleException if the module is not in a valid state
      */
-    public PropertyDrivenModule(@Nullable String version, @Nonnull final Class<? extends Module> claz)
+    public PropertyDrivenModule(@Nullable final String version, @Nonnull final Class<? extends Module> claz)
             throws IOException, ModuleException {
         this(version, claz.getResourceAsStream(DEFAULT_RESOURCE));
     }
@@ -140,7 +140,7 @@ public abstract class PropertyDrivenModule extends AbstractModule implements Mod
      * @throws IOException if unable to read file
      * @throws ModuleException if the module is not in a valid state
      */
-    public PropertyDrivenModule(@Nullable String version, @Nonnull final InputStream inputStream)
+    public PropertyDrivenModule(@Nullable final String version, @Nonnull final InputStream inputStream)
             throws IOException, ModuleException {
         super(version);
         locales = CollectionSupport.emptyList();
@@ -159,7 +159,8 @@ public abstract class PropertyDrivenModule extends AbstractModule implements Mod
      * 
      * @throws ModuleException if the module is not in a valid state
      */
-    public PropertyDrivenModule(@Nullable String version, @Nonnull final Properties properties) throws ModuleException {
+    public PropertyDrivenModule(@Nullable final String version, @Nonnull final Properties properties)
+            throws ModuleException {
         super(version);
         locales = CollectionSupport.emptyList();
         moduleProperties = Constraint.isNotNull(properties, "Properties cannot be null");

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list