From 38ecd39020135920bd8c22a226a3b285b1ae7930 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Tue, 22 Jun 2010 19:36:24 +0000 Subject: [PATCH] --- pom.xml | 8 +------- .../authorization/jpa/JpaAuthorizationServiceTest.java | 6 ++++-- .../security/authentication/UserAdminInitializer.java | 4 ++-- .../security/authorization/AuthorizationInitializer.java | 4 ++-- .../security/authorization/UrlAuthorizationRule.java | 8 +++++--- .../authentication/UserAdministrationImplTest.java | 4 ++-- support/spring/pom.xml | 5 ----- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index f9bc751d..e1ec3797 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.mockito mockito-all - 1.8.0 + 1.8.5 test @@ -236,12 +236,6 @@ ${spring.version} - - - log4j - log4j - 1.2.8 - dom4j dom4j diff --git a/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java b/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java index a6f0ae33..43daaaf2 100644 --- a/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java +++ b/security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java @@ -15,7 +15,9 @@ */ package org.wamblee.security.authorization.jpa; -import org.apache.log4j.Logger; + +import java.util.logging.Logger; + import org.wamblee.security.authentication.jpa.SecurityPersistenceUnit; import org.wamblee.security.authorization.AuthorizationService; import org.wamblee.security.authorization.AuthorizationServiceTest; @@ -29,7 +31,7 @@ import org.wamblee.support.persistence.TransactionProxyFactory; */ public class JpaAuthorizationServiceTest extends AuthorizationServiceTest { private static final Logger LOGGER = Logger - .getLogger(JpaAuthorizationServiceTest.class); + .getLogger(JpaAuthorizationServiceTest.class.getName()); private static final String SERVICE_TABLE = "SEC_AUTH_SVC"; diff --git a/security/usermgt/src/main/java/org/wamblee/security/authentication/UserAdminInitializer.java b/security/usermgt/src/main/java/org/wamblee/security/authentication/UserAdminInitializer.java index 3c33319a..31a4d465 100644 --- a/security/usermgt/src/main/java/org/wamblee/security/authentication/UserAdminInitializer.java +++ b/security/usermgt/src/main/java/org/wamblee/security/authentication/UserAdminInitializer.java @@ -15,7 +15,7 @@ */ package org.wamblee.security.authentication; -import org.apache.log4j.Logger; +import java.util.logging.Logger; /** * User administration initializer. It populates the user administration with a @@ -25,7 +25,7 @@ import org.apache.log4j.Logger; */ public class UserAdminInitializer { private static final Logger LOGGER = Logger - .getLogger(UserAdminInitializer.class); + .getLogger(UserAdminInitializer.class.getName()); /** * Initializes the user administration in case no users are present. diff --git a/security/usermgt/src/main/java/org/wamblee/security/authorization/AuthorizationInitializer.java b/security/usermgt/src/main/java/org/wamblee/security/authorization/AuthorizationInitializer.java index 4ec00cdd..3c6e7c7d 100644 --- a/security/usermgt/src/main/java/org/wamblee/security/authorization/AuthorizationInitializer.java +++ b/security/usermgt/src/main/java/org/wamblee/security/authorization/AuthorizationInitializer.java @@ -15,7 +15,7 @@ */ package org.wamblee.security.authorization; -import org.apache.log4j.Logger; +import java.util.logging.Logger; /** * Inititializer class for authorization rules. This class initializes the @@ -23,7 +23,7 @@ import org.apache.log4j.Logger; */ public class AuthorizationInitializer { private static final Logger LOGGER = Logger - .getLogger(AuthorizationInitializer.class); + .getLogger(AuthorizationInitializer.class.getName()); /** * Initializes authorization rules in case none are present. diff --git a/security/usermgt/src/main/java/org/wamblee/security/authorization/UrlAuthorizationRule.java b/security/usermgt/src/main/java/org/wamblee/security/authorization/UrlAuthorizationRule.java index c6845755..2aa759cb 100644 --- a/security/usermgt/src/main/java/org/wamblee/security/authorization/UrlAuthorizationRule.java +++ b/security/usermgt/src/main/java/org/wamblee/security/authorization/UrlAuthorizationRule.java @@ -17,6 +17,9 @@ package org.wamblee.security.authorization; import static org.wamblee.security.authorization.AuthorizationResult.*; +import java.util.logging.Level; +import java.util.logging.Logger; + import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.CascadeType; @@ -26,7 +29,6 @@ import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Transient; -import org.apache.log4j.Logger; import org.wamblee.security.authentication.UserAdministration; /** @@ -52,7 +54,7 @@ import org.wamblee.security.authentication.UserAdministration; @Access(AccessType.PROPERTY) public abstract class UrlAuthorizationRule extends AbstractAuthorizationRule { private static final Logger LOGGER = Logger - .getLogger(UrlAuthorizationRule.class); + .getLogger(UrlAuthorizationRule.class.getName()); /** * Result that the rule will return in case there is a match. @@ -252,7 +254,7 @@ public abstract class UrlAuthorizationRule extends AbstractAuthorizationRule { try { resourceClass = Class.forName(aResourceClass); } catch (ClassNotFoundException e) { - LOGGER.error("Cannot find resource class '" + aResourceClass + "'", + LOGGER.log(Level.SEVERE, "Cannot find resource class '" + aResourceClass + "'", e); throw new IllegalArgumentException(e.getMessage(), e); } diff --git a/security/usermgt/src/test/java/org/wamblee/security/authentication/UserAdministrationImplTest.java b/security/usermgt/src/test/java/org/wamblee/security/authentication/UserAdministrationImplTest.java index 3bdcbf8d..a0b32fea 100644 --- a/security/usermgt/src/test/java/org/wamblee/security/authentication/UserAdministrationImplTest.java +++ b/security/usermgt/src/test/java/org/wamblee/security/authentication/UserAdministrationImplTest.java @@ -16,10 +16,10 @@ package org.wamblee.security.authentication; import java.util.List; +import java.util.logging.Logger; import junit.framework.TestCase; -import org.apache.log4j.Logger; import org.wamblee.security.authentication.UserMgtException.Reason; import org.wamblee.security.encryption.Md5HexMessageDigester; @@ -30,7 +30,7 @@ import org.wamblee.security.encryption.Md5HexMessageDigester; */ public class UserAdministrationImplTest extends TestCase { private static final Logger LOGGER = Logger - .getLogger(UserAdministrationImplTest.class); + .getLogger(UserAdministrationImplTest.class.getName()); private static final String USER1 = "piet"; diff --git a/support/spring/pom.xml b/support/spring/pom.xml index c2c0288f..f4406f1e 100644 --- a/support/spring/pom.xml +++ b/support/spring/pom.xml @@ -44,11 +44,6 @@ org.springframework spring-aop - - - log4j - log4j - dom4j dom4j -- 2.31.1