Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7509D987E for ; Mon, 30 Apr 2012 20:51:37 +0000 (UTC) Received: (qmail 92844 invoked by uid 500); 30 Apr 2012 20:51:37 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 92805 invoked by uid 500); 30 Apr 2012 20:51:37 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 92798 invoked by uid 99); 30 Apr 2012 20:51:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 20:51:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 20:51:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7962A23889EC; Mon, 30 Apr 2012 20:51:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1332379 - in /cxf/fediz/trunk: ./ examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/ plugins/core/src/main/java/org/apa... Date: Mon, 30 Apr 2012 20:51:15 -0000 To: commits@cxf.apache.org From: owulff@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120430205115.7962A23889EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: owulff Date: Mon Apr 30 20:51:14 2012 New Revision: 1332379 URL: http://svn.apache.org/viewvc?rev=1332379&view=rev Log: Maven PMD plugin enabled and fixed PMD violations Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java cxf/fediz/trunk/pom.xml cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpServlet.java Modified: cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java (original) +++ cxf/fediz/trunk/examples/wsclientWebapp/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java Mon Apr 30 20:51:14 2012 @@ -39,7 +39,7 @@ import org.apache.ws.security.util.DOM2W */ public class ThreadLocalCallbackHandler implements CallbackHandler { - private static Logger log = LoggerFactory.getLogger(ThreadLocalCallbackHandler.class); + private final static Logger log = LoggerFactory.getLogger(ThreadLocalCallbackHandler.class); public void handle(Callback[] callbacks) Modified: cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java (original) +++ cxf/fediz/trunk/examples/wsclientWebapp/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java Mon Apr 30 20:51:14 2012 @@ -17,16 +17,18 @@ package org.apache.cxf.fediz.examples.service; -import java.util.logging.Logger; import java.security.Principal; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import javax.annotation.Resource; import javax.xml.ws.WebServiceContext; import org.apache.hello_world_soap_http.Greeter; public class GreeterImpl implements Greeter { - private static final Logger LOG = Logger.getLogger(GreeterImpl.class.getPackage().getName()); + private final static Logger LOG = LoggerFactory.getLogger(GreeterImpl.class.getPackage().getName()); @Resource WebServiceContext context = null; Modified: cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java (original) +++ cxf/fediz/trunk/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FederationContext.java Mon Apr 30 20:51:14 2012 @@ -101,27 +101,26 @@ public class FederationContext { public URI getRoleURI() { ProtocolType pt = config.getProtocol(); - if (pt != null && pt instanceof FederationProtocolType) { + if (pt == null) { + throw new IllegalConfigurationException("Missing ProtocolType"); + } + if (pt instanceof FederationProtocolType) { try { return new URI(((FederationProtocolType) pt).getRoleURI()); } catch (URISyntaxException e) { throw new IllegalConfigurationException("Invalid Role URI", e); } } - if (pt != null && !(pt instanceof FederationProtocolType)) { + else { throw new IllegalConfigurationException( "Unknown Protocoltype, only FederationProtocolType is currently suported"); } - if (pt == null) { - throw new IllegalConfigurationException("Missing ProtocolType"); - } - return null; } public String getRoleDelimiter() { ProtocolType pt = config.getProtocol(); - if (pt != null && pt instanceof FederationProtocolType) { + if (pt != null && (pt instanceof FederationProtocolType)) { return ((FederationProtocolType) pt).getRoleDelimiter(); } throw new IllegalConfigurationException( @@ -150,8 +149,7 @@ public class FederationContext { "Only one Trusted Issuer Keystore supported"); } TrustManagersType trustManager = managers.get(0); - KeyStoreType storeType = trustManager.getKeyStore(); - return storeType; + return trustManager.getKeyStore(); } public void setRelativePath(String relativePath) { Modified: cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java (original) +++ cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationTest.java Mon Apr 30 20:51:14 2012 @@ -15,7 +15,6 @@ public class FedizConfigurationTest { private static final String ISSUER = "http://url_to_the_issuer"; private static final String PROTOCOL_VERSION = "1.0.0"; - private static final String REQUEST = "request value"; private static final String REPLY = "reply value"; private static final String TARGET_REALM = "target realm"; private static final String HOME_REALM_CLASS = "org.apache.fediz.realm.MyHomeRealm.class"; @@ -167,8 +166,7 @@ public class FedizConfigurationTest { jaxbContext.createMarshaller().marshal(configOut, writer); StringReader reader = new StringReader(writer.toString()); - FedizConfig configIn = (FedizConfig) jaxbContext.createUnmarshaller() - .unmarshal(reader); + jaxbContext.createUnmarshaller().unmarshal(reader); } @org.junit.Test Modified: cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java (original) +++ cxf/fediz/trunk/plugins/core/src/test/java/org/apache/cxf/fediz/core/config/FedizConfigurationWriterTest.java Mon Apr 30 20:51:14 2012 @@ -19,7 +19,6 @@ public class FedizConfigurationWriterTes private static final String ISSUER = "http://url_to_the_issuer"; private static final String PROTOCOL_VERSION = "1.0.0"; - private static final String REQUEST = "request value"; private static final String REPLY = "reply value"; private static final String TARGET_REALM = "target realm"; private static final String HOME_REALM_CLASS = "org.apache.fediz.realm.MyHomeRealm.class"; @@ -30,7 +29,6 @@ public class FedizConfigurationWriterTes private static final String KEYSTORE_FILE = "stsstore.jks"; private static final String FILE_TYPE = "file"; - private static final String RESOURCE_TYPE = "resource"; private static final String KEYSTORE_PASSWORD = "stsspass"; private static final String AUDIENCE_URI_1 = "http://host_one:port/url"; @@ -132,8 +130,7 @@ public class FedizConfigurationWriterTes jaxbContext.createMarshaller().marshal(configOut, writer); StringReader reader = new StringReader(writer.toString()); - FedizConfig configIn = (FedizConfig) jaxbContext.createUnmarshaller() - .unmarshal(reader); + jaxbContext.createUnmarshaller().unmarshal(reader); } @org.junit.Test Modified: cxf/fediz/trunk/pom.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/pom.xml?rev=1332379&r1=1332378&r2=1332379&view=diff ============================================================================== --- cxf/fediz/trunk/pom.xml (original) +++ cxf/fediz/trunk/pom.xml Mon Apr 30 20:51:14 2012 @@ -48,8 +48,6 @@ true - cxf-pmd-ruleset.xml - @@ -113,7 +111,7 @@ 2.8 true - 1.5 + ${jdk.version} true Apache Fediz 1.5 @@ -138,8 +136,8 @@ maven-compiler-plugin 2.3.2 - 1.5 - 1.5 + ${jdk.version} + ${jdk.version} 256M ${cxf.compiler.fork} UTF-8 @@ -316,6 +314,7 @@ +--> org.apache.maven.plugins maven-pmd-plugin @@ -333,7 +332,7 @@ ${fediz.resources.base.path}cxf-pmd-custom.xml UTF-8 - 1.5 + ${jdk.version} false true true @@ -351,7 +350,6 @@ ---> org.apache.maven.plugins maven-surefire-plugin @@ -408,7 +406,6 @@ --> - **/jaxb.index **/META-INF/MANIFEST **/src/test/**/*.txt @@ -431,6 +428,7 @@ +