Just clean up some log messages and remove unnecessary code 87/50587/1
authorRyan Goulding <ryandgoulding@gmail.com>
Wed, 18 Jan 2017 00:00:50 +0000 (19:00 -0500)
committerRyan Goulding <ryandgoulding@gmail.com>
Wed, 18 Jan 2017 00:01:20 +0000 (19:01 -0500)
Change-Id: If67440d7bdd9993614cc9923060512edbc667c85
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/ServiceProxy.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/filters/AAAFilter.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/filters/AAAShiroFilter.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/filters/AuthenticationListener.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/filters/ODLHttpAuthenticationFilter.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/realm/ODLJndiLdapRealm.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/realm/ODLJndiLdapRealmAuthNOnly.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/impl/shiro/realm/TokenAuthRealm.java

index e4485d733c4d662211f3d6313593469e425a1d0e..0f773c0367c0b8cbf36092f324e900c724d0010c 100644 (file)
@@ -71,8 +71,7 @@ public class ServiceProxy {
      */
     public synchronized void setEnabled(final boolean enabled) {
         this.enabled = enabled;
-        final String SERVICE_ENABLED_INFO_MESSAGE = "Setting ServiceProxy enabled to " + enabled;
-        LOG.info(SERVICE_ENABLED_INFO_MESSAGE);
+        LOG.info("Setting ServiceProxy enabled to {}", enabled);
         // check for null because of non-determinism in bundle load
         if (filter != null) {
             filter.setEnabled(enabled);
index 47dd95499b8813545692f61849d211f2bad7199c..0e6de17b9d8d6a75ade5e51c67bfc7ea3bcd5883 100644 (file)
@@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
  * delivering debug information; to enable these debug statements, please issue
  * the following in the karaf shell:
  *
- * <code>log:set debug org.opendaylight.aaa.shiro.filters.AAAFilter</code>
+ * <code>log:set DEBUG org.opendaylight.aaa.shiro.filters.AAAFilter</code>
  *
  * @author Ryan Goulding (ryandgoulding@gmail.com)
  * @see <code>javax.servlet.Filter</code>
@@ -29,9 +29,7 @@ public class AAAFilter extends ShiroFilter {
     private static final Logger LOG = LoggerFactory.getLogger(AAAFilter.class);
 
     public AAAFilter() {
-        super();
-        final String DEBUG_MESSAGE = "Creating the AAAFilter";
-        LOG.debug(DEBUG_MESSAGE);
+        LOG.debug("Creating the AAAFilter");
     }
 
     /*
@@ -46,8 +44,7 @@ public class AAAFilter extends ShiroFilter {
     @Override
     public void init() throws Exception {
         super.init();
-        final String DEBUG_MESSAGE = "Initializing the AAAFilter";
-        LOG.debug(DEBUG_MESSAGE);
+        LOG.debug("Initializing the AAAFilter");
         // sets the filter to the startup value. Because of non-determinism in
         // bundle loading, this passes an instance of itself along so that if
         // the
@@ -64,9 +61,8 @@ public class AAAFilter extends ShiroFilter {
      * org.apache.shiro.web.servlet.OncePerRequestFilter#setEnabled(boolean)
      */
     @Override
-    public void setEnabled(boolean enabled) {
+    public void setEnabled(final boolean enabled) {
         super.setEnabled(enabled);
-        final String DEBUG_MESSAGE = "Setting AAAFilter enabled to " + enabled;
-        LOG.debug(DEBUG_MESSAGE);
+        LOG.debug("Setting AAAFilter enabled to {}", enabled);
     }
 }
index 530acfac60640b2d2a7ef1528f7480da4ef555e2..851da4020e036686ca604e9bc815686ade937686 100644 (file)
@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
  * This class is also responsible for delivering debug information; to enable these
  * debug statements, please issue the following in the karaf shell:
  *
- * <code>log:set debug org.opendaylight.aaa.shiro.filters.AAAShiroFilter</code>
+ * <code>log:set DEBUG org.opendaylight.aaa.shiro.filters.AAAShiroFilter</code>
  *
  * @author Ryan Goulding (ryandgoulding@gmail.com)
  * @see <code>javax.servlet.Filter</code>
index 080ab1147e9e238ce1c1cdabba71fe2c17696d84..cd79efff5e97914571852feb94b110dd45c80586 100644 (file)
@@ -31,16 +31,14 @@ public class AuthenticationListener implements org.apache.shiro.authc.Authentica
     @Override
     public void onSuccess(final AuthenticationToken authenticationToken, final AuthenticationInfo authenticationInfo) {
         if (LOG.isDebugEnabled()) {
-            final String successMessage = AuthenticationTokenUtils.generateSuccessfulAuthenticationMessage(authenticationToken);
-            LOG.debug(successMessage);
+            LOG.debug(AuthenticationTokenUtils.generateSuccessfulAuthenticationMessage(authenticationToken));
         }
     }
 
     @Override
     public void onFailure(final AuthenticationToken authenticationToken, final AuthenticationException e) {
         if (LOG.isDebugEnabled()) {
-            final String failureMessage = AuthenticationTokenUtils.generateUnsuccessfulAuthenticationMessage(authenticationToken);
-            LOG.debug(failureMessage);
+            LOG.debug(AuthenticationTokenUtils.generateUnsuccessfulAuthenticationMessage(authenticationToken));
         }
     }
 
index 90b0101ed060ee9db55a164e98a2834f6ebb4e54..305dd6ab22bfd43a1db942d2a0d7c105cbaa3293 100644 (file)
@@ -42,7 +42,6 @@ public class ODLHttpAuthenticationFilter extends BasicHttpAuthenticationFilter {
     protected static final String OPTIONS_HEADER = "OPTIONS";
 
     public ODLHttpAuthenticationFilter() {
-        super();
         LOG.info("Creating the ODLHttpAuthenticationFilter");
     }
 
index f9d79228d01397892c21094054a39c6274d6dcd7..5710405d558b88708eafa3f9365e51ab48758311 100644 (file)
@@ -116,9 +116,7 @@ public class ODLJndiLdapRealm extends JndiLdapRealm implements Nameable {
      * Adds debugging information surrounding creation of ODLJndiLdapRealm
      */
     public ODLJndiLdapRealm() {
-        super();
-        final String DEBUG_MESSAGE = "Creating ODLJndiLdapRealm";
-        LOG.debug(DEBUG_MESSAGE);
+        LOG.debug("Creating ODLJndiLdapRealm");
     }
 
     /*
index 978266c55e2da161b2e98d9c492181253dcdd651..d8621ad334e5489a7023878a8134d27289eb6c6f 100644 (file)
@@ -46,7 +46,6 @@ public class ODLJndiLdapRealmAuthNOnly extends JndiLdapRealm {
      * Adds debugging information surrounding creation of ODLJndiLdapRealm
      */
     public ODLJndiLdapRealmAuthNOnly() {
-        super();
         LOG.debug("Creating ODLJndiLdapRealmAuthNOnly");
     }
 
index f9ae5051635dbbe757679c17ef21e40a2b83707f..a3bd2a68e109bc678c17d02358a5e44b09eab78b 100644 (file)
@@ -74,7 +74,6 @@ public class TokenAuthRealm extends AuthorizingRealm {
     private static final Logger LOG = LoggerFactory.getLogger(TokenAuthRealm.class);
 
     public TokenAuthRealm() {
-        super();
         super.setName(TOKEN_AUTH_REALM_DEFAULT_NAME);
     }