This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new cfd8e84  fix: inline constants in error messages in ResourceRef 
constructor (#525)
cfd8e84 is described below

commit cfd8e8486d671624c2baec3743ec3a20ab5cc846
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Fri Jul 17 11:03:04 2026 +0000

    fix: inline constants in error messages in ResourceRef constructor (#525)
---
 src/main/java/org/apache/maven/plugins/ear/ResourceRef.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java 
b/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java
index 4dde094..b65fac2 100644
--- a/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java
+++ b/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java
@@ -69,10 +69,9 @@ public class ResourceRef {
      */
     public ResourceRef(String name, String type, String auth, String 
lookupName) {
         if (name == null || name.isEmpty()) {
-            throw new IllegalArgumentException(
-                    RESOURCE_REF_NAME + " in " + RESOURCE_REF_NAME + " element 
cannot be null.");
+            throw new IllegalArgumentException("res-ref-name in resource-ref 
element cannot be null.");
         } else if ((type == null || type.isEmpty()) && (auth == null || 
auth.isEmpty())) {
-            throw new IllegalArgumentException(RESOURCE_TYPE + " in " + 
RESOURCE_REF_NAME + " element cannot be null ");
+            throw new IllegalArgumentException("res-type in resource-ref 
element cannot be null");
         }
 
         this.name = name;

Reply via email to