elharo opened a new issue, #521:
URL: https://github.com/apache/maven-ear-plugin/issues/521

   ## Description
   
   In `EarMojo.java:563-568`, a whitespace-only classifier string is not 
properly handled:
   
   ```java
   if (classifier == null) {
       classifier = "";
   } else if (classifier.trim().length() > 0 && !classifier.startsWith("-")) {
       classifier = "-" + classifier;
   }
   ```
   
   If `classifier` is `"   "` (whitespace-only), `trim().length() > 0` is false 
(it becomes 0), so none of the branches apply. The classifier remains `"   "` 
with embedded spaces, and the resulting filename would be something like `myApp 
   .ear` with spaces.
   
   ## Expected behavior
   
   Trim the classifier before processing:
   
   ```java
   if (classifier != null) {
       classifier = classifier.trim();
   }
   ```
   


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