[java-opensaml COMMIT] in /trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl: ServletRequestScopedS...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Mar 13 12:13:17 EDT 2017
Author: scantor
Date: Mon Mar 13 12:13:16 2017
New Revision: 4610
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4610&view=rev
Log:
Convert null/empty checks for style.
Modified:
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java
trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LoadClientStorageServices.java
Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java?rev=4610&r1=4609&r2=4610&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java Mon Mar 13 12:13:16 2017
@@ -74,6 +74,7 @@
import org.opensaml.storage.VersionMismatchException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testng.util.Strings;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
@@ -282,7 +283,7 @@
chain.doFilter(request, new OutputInterceptingHttpServletResponseProxy((HttpServletResponse) response));
}
-// Checkstyle: CyclomaticComplexity|MethodLength OFF
+// Checkstyle: CyclomaticComplexity|MethodLength|ReturnCount OFF
/**
* Reconstitute stored data.
*
@@ -315,7 +316,7 @@
}
});
- if (!cookie.isPresent() || cookie.get().getValue() == null || cookie.get().getValue().isEmpty()) {
+ if (!cookie.isPresent() || Strings.isNullOrEmpty(cookie.get().getValue())) {
return;
}
Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LoadClientStorageServices.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LoadClientStorageServices.java?rev=4610&r1=4609&r2=4610&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LoadClientStorageServices.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/LoadClientStorageServices.java Mon Mar 13 12:13:16 2017
@@ -35,6 +35,7 @@
import org.opensaml.storage.impl.client.ClientStorageService.ClientStorageSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testng.util.Strings;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
@@ -199,7 +200,7 @@
});
}
- if (!cookie.isPresent() || cookie.get().getValue() == null || cookie.get().getValue().isEmpty()) {
+ if (!cookie.isPresent() || Strings.isNullOrEmpty(cookie.get().getValue())) {
log.debug("{} No cookie data present, initializing StorageService '{}' to empty state", getLogPrefix(),
storageService.getId());
storageService.load(null, source);
More information about the commits
mailing list