Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Corrected an annotation in `PatchRequest` which did not mark `Operations` with a
Fixed an issue where Jackson `JsonReadFeature` properties were not used despite the property being
set on the MapperFactory.

Fixed `hashCode()` implementations in `Session.java` and `ExternalIdentity.java` which previously
did not include the values of `id` and `meta`.

## 6.0.0 - 2026-May-11
The UnboundID SCIM SDK has been updated to use version 3 of the Jackson library (this release ships
with v3.1.3). This change aligns the SCIM SDK with HTTP libraries such as Spring Framework 7/Spring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,29 +496,13 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

BaseScimResource that = (BaseScimResource) o;
if (!schemaUrns.equals(that.schemaUrns))
{
return false;
}
if (!Objects.equals(id, that.id))
{
return false;
}
if (!Objects.equals(externalId, that.externalId))
{
return false;
}
if (!Objects.equals(meta, that.meta))
{
return false;
}
return Objects.equals(extensionObjectNode, that.extensionObjectNode);
return o instanceof BaseScimResource that
&& schemaUrns.equals(that.schemaUrns)
&& Objects.equals(id, that.id)
&& Objects.equals(externalId, that.externalId)
&& Objects.equals(meta, that.meta)
&& Objects.equals(extensionObjectNode, that.extensionObjectNode);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,13 @@ public String toString()
@Override
public boolean equals(@Nullable final Object o)
{
if (!(o instanceof GenericScimResource resource))
if (this == o)
{
return false;
return true;
}

// Null nodes should not occur, but we should be defensive about this
// possibility.
return Objects.equals(objectNode, resource.getObjectNode());
return o instanceof GenericScimResource resource
&& Objects.equals(objectNode, resource.getObjectNode());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

Element element = (Element) o;

if (!toLowerCase(attribute).equals(toLowerCase(element.attribute)))
{
return false;
}
return Objects.equals(valueFilter, element.valueFilter);
return o instanceof Element element
&& Objects.equals(valueFilter, element.valueFilter)
&& attribute.equalsIgnoreCase(element.attribute);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this to equalsIgnoreCase() since it's more efficient.

}

/**
Expand Down Expand Up @@ -669,18 +660,11 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

Path path = (Path) o;
if (schemaUrn != null ? !schemaUrn.equalsIgnoreCase(path.schemaUrn) :
path.schemaUrn != null)
{
return false;
}
return elements.equals(path.elements);
return o instanceof Path path
&& (schemaUrn == null ? path.schemaUrn == null :
schemaUrn.equalsIgnoreCase(path.schemaUrn))
&& elements.equals(path.elements);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,12 +832,9 @@ public boolean equals(@Nullable final Object o)
{
return true;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have been folded in with a ternary operator in the return statement, but it wasn't worthwhile in my opinion.

}
if (!(o instanceof BulkOperation that))
{
return false;
}

return Objects.equals(method, that.method)
return o instanceof BulkOperation that
&& Objects.equals(method, that.method)
&& Objects.equals(path, that.path)
&& Objects.equals(bulkId, that.bulkId)
&& Objects.equals(version, that.version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (!(o instanceof BulkOperationResult that))
{
return false;
}

return Objects.equals(location, that.location)
return o instanceof BulkOperationResult that
&& Objects.equals(location, that.location)
&& method.equals(that.method)
&& Objects.equals(bulkId, that.bulkId)
&& Objects.equals(version, that.version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (!(o instanceof BulkRequest that))
{
return false;
}

return Objects.equals(failOnErrors, that.failOnErrors)
return o instanceof BulkRequest that
&& Objects.equals(failOnErrors, that.failOnErrors)
&& operations.equals(that.getOperations());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (!(o instanceof BulkResponse that))
{
return false;
}

return operations.equals(that.operations);
return o instanceof BulkResponse that
&& operations.equals(that.operations);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,12 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
if (!super.equals(o))
{
return false;
}

ErrorResponse that = (ErrorResponse) o;
if (status != that.status)
{
return false;
}
if (!Objects.equals(detail, that.detail))
{
return false;
}
return Objects.equals(scimType, that.scimType);
return o instanceof ErrorResponse that
&& super.equals(o)
&& status == that.status
&& Objects.equals(detail, that.detail)
&& Objects.equals(scimType, that.scimType);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,37 +468,15 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
if (!super.equals(o))
{
return false;
}

ListResponse<?> that = (ListResponse<?>) o;
if (totalResults != that.totalResults)
{
return false;
}
if (!Objects.equals(itemsPerPage, that.itemsPerPage))
{
return false;
}
if (!Objects.equals(startIndex, that.startIndex))
{
return false;
}
if (!Objects.equals(previousCursor, that.previousCursor))
{
return false;
}
if (!Objects.equals(nextCursor, that.nextCursor))
{
return false;
}
return resources.equals(that.resources);
return o instanceof ListResponse<?> that
&& super.equals(o)
&& totalResults == that.totalResults
&& Objects.equals(itemsPerPage, that.itemsPerPage)
&& Objects.equals(startIndex, that.startIndex)
&& Objects.equals(previousCursor, that.previousCursor)
&& Objects.equals(nextCursor, that.nextCursor)
&& resources.equals(that.resources);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,17 +561,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

AddOperation that = (AddOperation) o;
if (!Objects.equals(getPath(), that.getPath()))
{
return false;
}
return value.equals(that.value);
return o instanceof AddOperation that
&& Objects.equals(getPath(), that.getPath())
&& value.equals(that.value);
}

/**
Expand Down Expand Up @@ -766,18 +758,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

RemoveOperation that = (RemoveOperation) o;
if (!Objects.equals(value, that.value))
{
return false;
}

return Objects.equals(getPath(), that.getPath());
return o instanceof RemoveOperation that
&& Objects.equals(value, that.value)
&& Objects.equals(getPath(), that.getPath());
}

/**
Expand Down Expand Up @@ -884,17 +867,9 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}

ReplaceOperation that = (ReplaceOperation) o;
if (!Objects.equals(getPath(), that.getPath()))
{
return false;
}
return value.equals(that.value);
return o instanceof ReplaceOperation that
&& Objects.equals(getPath(), that.getPath())
&& value.equals(that.value);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,10 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
if (!super.equals(o))
{
return false;
}

PatchRequest that = (PatchRequest) o;
return operations.equals(that.operations);
return o instanceof PatchRequest that
&& super.equals(o)
&& operations.equals(that.operations);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,45 +356,17 @@ public boolean equals(@Nullable final Object o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
if (!super.equals(o))
{
return false;
}

SearchRequest that = (SearchRequest) o;
if (!Objects.equals(attributes, that.attributes))
{
return false;
}
if (!Objects.equals(excludedAttributes, that.excludedAttributes))
{
return false;
}
if (!Objects.equals(filter, that.filter))
{
return false;
}
if (!Objects.equals(sortBy, that.sortBy))
{
return false;
}
if (sortOrder != that.sortOrder)
{
return false;
}
if (!Objects.equals(startIndex, that.startIndex))
{
return false;
}
if (!Objects.equals(cursor, that.cursor))
{
return false;
}
return Objects.equals(count, that.count);
return o instanceof SearchRequest that
&& super.equals(o)
&& Objects.equals(filter, that.filter)
&& Objects.equals(sortBy, that.sortBy)
&& sortOrder == that.sortOrder
&& Objects.equals(startIndex, that.startIndex)
&& Objects.equals(cursor, that.cursor)
&& Objects.equals(count, that.count)
&& Objects.equals(attributes, that.attributes)
&& Objects.equals(excludedAttributes, that.excludedAttributes);
}

/**
Expand Down
Loading
Loading