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

Upgrade hamcrest from 1.3 to 3.0 #1305

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Upgrade hamcrest from 1.3 to 3.0 #1305

merged 1 commit into from
Aug 20, 2024

Conversation

sikeoka
Copy link
Contributor

@sikeoka sikeoka commented Aug 13, 2024

This is a test dependency upgrade.

This PR adds the hamcrest 3.0 dependency to the root pom.xml and removes all hamcrest-core, hamcrest-library and hamcrest-integration dependencies. The version is set to 3.0 for hamcrest-core and hamcrest-library in case there is another transitive dependency on it (these are empty jar files). hamcrest-integration has no version beyond 1.3.

Some code changes were required for deprecated or removed API.

public void appendTo(StringBuffer buffer) {
matcher.describeTo(new StringDescription(buffer));
}
});
return null;
Copy link
Member

Choose a reason for hiding this comment

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

This bit has me confused.. if we return null, is the object being built in the previous step even used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The old and new code both return null here. I think that easymock is adding the matcher to a static field so the return value isn't very important. I personally find mockito to be clearer and easier to use even though geoserver uses easymock more.

@aaime aaime merged commit 0d2fc0b into GeoWebCache:main Aug 20, 2024
7 checks passed
@sikeoka sikeoka deleted the dep-hamcr branch August 20, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants