gnodet-bot commented on code in PR #14076:
URL: https://github.com/apache/maven/pull/14076#discussion_r4626924968


##########
apache-maven/src/assembly/maven/bin/JvmConfigParser.java:
##########
@@ -77,10 +77,10 @@ public static void main(String[] args) {
                 System.out.print(result);
                 System.out.flush();
             }
-        } catch (IOException e) {
-            // If jvm.config exists but can't be read, this is a configuration 
error
+        } catch (IOException | IllegalArgumentException e) {
+            // If jvm.config exists but can't be read or parsed, this is a 
configuration error
             // Print clear error and exit with error code to prevent Maven 
from running
-            System.err.println("ERROR: Failed to read .mvn/jvm.config: " + 
e.getMessage());
+            System.err.println("ERROR: Failed to process .mvn/jvm.config: " + 
e.getMessage());
             System.err.println("Please check file permissions and syntax.");

Review Comment:
   🔎 **Nit:** This hint was written for `IOException` only but now also covers 
`IllegalArgumentException` (parse errors). "File permissions" is irrelevant for 
a parse error — the user gets a confusing hint.
   
   ```suggestion
               System.err.println("Please check that the file is readable and 
has valid syntax.");
   ```



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