[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog....
noreply at shibboleth.net
noreply at shibboleth.net
Fri Nov 6 18:18:39 EST 2015
Author: scantor
Date: Fri Nov 6 18:18:39 2015
New Revision: 7964
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7964&view=rev
Log:
Add null checks.
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog.java?rev=7964&r1=7963&r2=7964&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/audit/impl/WriteFTICKSLog.java Fri Nov 6 18:18:39 2015
@@ -205,6 +205,7 @@
}
+// Checkstyle: CyclomaticComplexity OFF
/** {@inheritDoc} */
@Override
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
@@ -215,25 +216,25 @@
record.append(federationId).append("/1.0#TS=").append(System.currentTimeMillis() / 1000);
String field = relyingPartyLookupStrategy.apply(profileRequestContext);
- if (!field.isEmpty()) {
+ if (field != null && !field.isEmpty()) {
record.append("#RP=").append(field);
}
field = responderLookupStrategy.apply(profileRequestContext);
- if (!field.isEmpty()) {
+ if (field != null && !field.isEmpty()) {
record.append("#AP=").append(field);
}
field = usernameLookupStrategy.apply(profileRequestContext);
- if (!field.isEmpty()) {
+ if (field != null && !field.isEmpty()) {
field = digester.apply(field);
- if (!field.isEmpty()) {
+ if (field != null && !field.isEmpty()) {
record.append("#PN=").append(field);
}
}
field = authenticationMethodLookupStrategy.apply(profileRequestContext);
- if (!field.isEmpty()) {
+ if (field != null && !field.isEmpty()) {
record.append("#AM=").append(field);
}
@@ -248,5 +249,6 @@
record.append("#");
LoggerFactory.getLogger(FTICKS_LOG_CATEGORY).info(record.toString());
}
+// Checkstyle: CyclomaticComplexity ON
}
More information about the commits
mailing list