JeonDaehong opened a new pull request, #8398:
URL: https://github.com/apache/gravitino/pull/8398
**What would you like to be improved?**
In server/src/main/java/org/apache/gravitino/server/GravitinoServer.java,
the main method could throw an ArrayIndexOutOfBoundsException if the
GRAVITINO_TEST environment variable is set but args is empty.
**How should we improve?**
Check if args.length < 1 and log an error, then exit safely.
```java
String confPath = "";
if (System.getenv("GRAVITINO_TEST") != null) {
if (args.length < 1) {
LOG.error("Missing argument for GRAVITINO_TEST conf path.");
System.exit(1);
}
confPath = args[0];
}
```
This ensures that even if GRAVITINO_TEST is set and args is empty, no
exception will be thrown.
Fixes #8305
--
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]