Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EncodedResource does not include charset in equals() implementation [SPR-12767] #17364

Closed
spring-issuemaster opened this issue Feb 28, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Feb 28, 2015

Sam Brannen opened SPR-12767 and commented

Status Quo

EncodedResource supports an encoding or a Charset for reading from the underlying Resource; however, the implementation of equals() is based solely on the resource and encoding. Thus, if a Charset is specified instead of an encoding, invocations of equals() will not work as expected.

Deliverables

  1. Include the Charset in the implementation of equals() in EncodedResource.

Affects: 3.2.1

Referenced from: commits 93c70b7, 1f9bc50, 6c93745

Backported to: 3.2.14

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 28, 2015

Sam Brannen commented

Fixed as described in GitHub commits for Spring Framework releases 4.2, 4.1.6, and 3.2.14.

Include charset in EncodedResource.equals()

Prior to this commit, the implementation of equals() in EncodedResource
was based solely on the resource and encoding. Thus, if a Charset were
specified instead of an encoding, invocations of equals() would not
work as expected.

This commit addresses this issue by including the charset in the
implementation of equals() and introducing corresponding tests in a new
EncodedResourceTests class. Furthermore, this commit makes
EncodedResource immutable and updates all Javadoc to reflect support
for the encoding and charset properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.