Copilot commented on code in PR #91:
URL: https://github.com/apache/maven-jmod-plugin/pull/91#discussion_r2639588424


##########
src/main/java/org/apache/maven/plugins/jmod/JModCreateMojo.java:
##########
@@ -345,7 +345,7 @@ private void deleteOutputIfAlreadyExists(File 
resultingJModFile) throws MojoFail
     private void failIfParametersAreNotInTheirValidValueRanges() throws 
MojoFailureException {
         if (warnIfResolved != null) {
             String x = warnIfResolved.toLowerCase().trim();
-            if (!"deprecated".equals(x) && "deprecated-for-removal".equals(x) 
&& "incubating".equals(x)) {
+            if (!"deprecated".equals(x) && !"deprecated-for-removal".equals(x) 
&& !"incubating".equals(x)) {

Review Comment:
   This validation logic for warnIfResolved parameter values lacks test 
coverage. Consider adding an integration test to verify that invalid values are 
properly rejected and valid values ('deprecated', 'deprecated-for-removal', 
'incubating') are accepted. This would help prevent similar bugs in the future.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to