[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/Endpoin...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 5 20:32:35 EDT 2016
Author: putmanb
Date: Wed Oct 5 20:32:35 2016
New Revision: 4518
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4518&view=rev
Log:
Add some missing annotations and 'final'.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/EndpointMetadataIndex.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/EndpointMetadataIndex.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/EndpointMetadataIndex.java?rev=4518&r1=4517&r2=4518&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/EndpointMetadataIndex.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/EndpointMetadataIndex.java Wed Oct 5 20:32:35 2016
@@ -65,7 +65,7 @@
private Logger log = LoggerFactory.getLogger(EndpointMetadataIndex.class);
/** The predicate which selects which endpoints to index. */
- private Predicate<Endpoint> endpointSelectionPredicate;
+ @Nonnull private Predicate<Endpoint> endpointSelectionPredicate;
/**
* Constructor.
@@ -83,36 +83,36 @@
*
* @param endpointPredicate the predicate which selects which endpoints to index
*/
- public EndpointMetadataIndex(Predicate<Endpoint> endpointPredicate) {
+ public EndpointMetadataIndex(@Nonnull final Predicate<Endpoint> endpointPredicate) {
endpointSelectionPredicate = Constraint.isNotNull(endpointPredicate,
"Endpoint selection predicate may not be null");
}
/** {@inheritDoc} */
@Nullable @NonnullElements @Unmodifiable @NotLive
- public Set<MetadataIndexKey> generateKeys(@Nonnull EntityDescriptor descriptor) {
+ public Set<MetadataIndexKey> generateKeys(@Nonnull final EntityDescriptor descriptor) {
Constraint.isNotNull(descriptor, "EntityDescriptor was null");
- HashSet<MetadataIndexKey> result = new HashSet<>();
- for (RoleDescriptor role : descriptor.getRoleDescriptors()) {
+ final HashSet<MetadataIndexKey> result = new HashSet<>();
+ for (final RoleDescriptor role : descriptor.getRoleDescriptors()) {
QName roleType = role.getSchemaType();
if (roleType == null) {
roleType = role.getElementQName();
}
- for (Endpoint endpoint : role.getEndpoints()) {
+ for (final Endpoint endpoint : role.getEndpoints()) {
QName endpointType = endpoint.getSchemaType();
if (endpointType == null) {
endpointType = endpoint.getElementQName();
}
if (endpointSelectionPredicate.apply(endpoint)) {
- String location = StringSupport.trimOrNull(endpoint.getLocation());
+ final String location = StringSupport.trimOrNull(endpoint.getLocation());
if (location != null) {
log.trace("Indexing Endpoint: role '{}', endpoint type '{}', location '{}'",
roleType, endpointType, location);
result.add(new EndpointMetadataIndexKey(roleType, endpointType, location, false));
}
- String responseLocation = StringSupport.trimOrNull(endpoint.getResponseLocation());
+ final String responseLocation = StringSupport.trimOrNull(endpoint.getResponseLocation());
if (responseLocation != null) {
log.trace("Indexing response Endpoint - role '{}', endpoint type '{}', response location '{}'",
roleType, endpointType, responseLocation);
@@ -126,7 +126,7 @@
/** {@inheritDoc} */
@Nullable @NonnullElements @Unmodifiable @NotLive
- public Set<MetadataIndexKey> generateKeys(@Nonnull CriteriaSet criteriaSet) {
+ public Set<MetadataIndexKey> generateKeys(@Nonnull final CriteriaSet criteriaSet) {
// TODO Auto-generated method stub
return null;
}
@@ -138,7 +138,7 @@
public static class DefaultEndpointSelectionPredicate implements Predicate<Endpoint> {
/** The indexable endpoint types. */
- private Map<QName, Set<QName>> endpointTypes;
+ @Nonnull private Map<QName, Set<QName>> endpointTypes;
/**
* Constructor.
@@ -152,17 +152,17 @@
*
* @param indexableTypes a map controlling the types of endpoints to index
*/
- public DefaultEndpointSelectionPredicate(Map<QName, Set<QName>> indexableTypes) {
+ public DefaultEndpointSelectionPredicate(@Nonnull final Map<QName, Set<QName>> indexableTypes) {
endpointTypes = Constraint.isNotNull(indexableTypes, "Indexable endpoint types map was null");
}
/** {@inheritDoc} */
[... 39 lines stripped ...]
More information about the commits
mailing list