Skip to content

Conversation

@slachiewicz
Copy link
Member

@slachiewicz slachiewicz force-pushed the feature/j-unit-jupiter-best-practices branch from 5d95770 to f0db9f7 Compare November 3, 2025 16:08
@slachiewicz slachiewicz marked this pull request as ready for review November 3, 2025 16:09
@slachiewicz slachiewicz force-pushed the feature/j-unit-jupiter-best-practices branch from f0db9f7 to 4ec3931 Compare November 3, 2025 16:32
@slachiewicz slachiewicz requested a review from Copilot November 3, 2025 16:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request modernizes JUnit test code across multiple test classes by adopting Java 8+ language features and JUnit 5 conventions. The changes improve code readability and maintainability while standardizing test naming patterns.

  • Updated test class and method visibility from public to package-private (removing public modifier)
  • Renamed test methods to remove "test" prefix following JUnit 5 naming conventions
  • Simplified exception declarations from specific exceptions to generic Exception
  • Modernized Java syntax using diamond operators for generic type inference
  • Converted anonymous classes to lambda expressions where applicable
  • Removed unnecessary wrapper calls (e.g., Collections.unmodifiableList(Collections.singletonList(...)) to Collections.singletonList(...))
  • Cleaned up unused imports
  • Made fields final where appropriate

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
StringUtilsTest.java Updated class/method visibility and naming
FieldBasedObjectInterpolatorTest.java Modernized syntax with diamond operators, removed redundant Collections wrapper, updated visibility/naming
MultiDelimiterStringSearchInterpolatorTest.java Simplified exceptions, added diamond operators, lambda conversions, removed unused imports, updated naming
MultiDelimiterInterpolatorFilterReaderTest.java Comprehensive modernization including lambdas, diamond operators, updated visibility/naming
FixedStringSearchInterpolatorTest.java Lambda conversions, diamond operators, simplified exceptions, made field final, updated naming
EnvarBasedValueSourceTest.java Lambda conversions, diamond operators, removed license header, updated naming
StringSearchInterpolatorTest.java Extensive modernization including lambdas, diamond operators, made field final, removed license header
RegexBasedInterpolatorTest.java Lambda conversions, diamond operators, removed license header, updated naming
PropertiesBasedValueSourceTest.java Updated visibility and naming
PrefixedValueSourceWrapperTest.java Updated visibility and naming
PrefixedObjectValueSourceTest.java Updated visibility, naming, and diamond operators
PrefixAwareRecursionInterceptorTest.java Updated visibility, naming, and removed unnecessary array wrapper
InterpolatorFilterReaderTest.java Updated visibility, naming, and diamond operators
FeedbackingValueSourceTest.java Updated visibility, naming, and simplified exceptions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

RegexBasedInterpolator rbi = new RegexBasedInterpolator();

Map context = new HashMap();
Map<String, String> context = new HashMap();
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

Missing diamond operator '<>' for HashMap instantiation. Should be 'new HashMap<>()' to be consistent with other modernizations in this PR.

Suggested change
Map<String, String> context = new HashMap();
Map<String, String> context = new HashMap<>();

Copilot uses AI. Check for mistakes.
@slachiewicz slachiewicz merged commit 80e5f3c into codehaus-plexus:master Nov 3, 2025
17 checks passed
@slachiewicz slachiewicz deleted the feature/j-unit-jupiter-best-practices branch November 3, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant