Copilot commented on code in PR #561:
URL: https://github.com/apache/maven-ear-plugin/pull/561#discussion_r4360217902


##########
src/test/java/org/apache/maven/plugins/ear/EarModuleTest.java:
##########
@@ -40,4 +40,16 @@ void testCleanArchivePath() {
         assertEquals("", AbstractEarModule.cleanArchivePath(""));
         assertNull(AbstractEarModule.cleanArchivePath(null));
     }
+
+    @Test
+    void gettersDoNotModifyConfiguredPaths() {
+        AbstractEarModule module = new JarModule();
+        module.bundleDir = "/APP-INF/lib";
+        module.libDirectory = "/libraries";
+
+        assertEquals("APP-INF/lib/", module.getBundleDir());
+        assertEquals("/APP-INF/lib", module.bundleDir);
+        assertEquals("libraries/", module.getLibDir());
+        assertEquals("/libraries", module.libDirectory);

Review Comment:
   This test verifies getters don’t mutate configured fields after a single 
access, but it doesn’t exercise *repeated* access (idempotence) as described in 
the PR summary. Consider calling `getBundleDir()`/`getLibDir()` at least twice 
and asserting (1) the returned value remains stable across calls and (2) 
`bundleDir`/`libDirectory` remain unchanged after each call.



-- 
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