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

Fix comparisons against null in PathSource.equals #2026

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Jan 5, 2025

No description provided.

@elharo elharo requested a review from gnodet January 5, 2025 19:57
@elharo elharo marked this pull request as ready for review January 6, 2025 12:20
@elharo elharo changed the title Fix comparisons against null Fix comparisons against null in PathSource.equals Jan 6, 2025

import static org.junit.jupiter.api.Assertions.assertFalse;

public class PathSourceTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Test classes should not be public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. They used to have to be. Did that change in JUnit 5?

public class PathSourceTest {

@Test
public void testEquals() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Test methods don't need to be public either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

The best practices lead to using package private classes / methods.

@elharo elharo merged commit 99452bb into master Jan 8, 2025
13 checks passed
@elharo elharo deleted the pathsource branch January 8, 2025 15:51
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