gyowoo1113 opened a new pull request, #5301: URL: https://github.com/apache/zeppelin/pull/5301
### What is this PR for? `InfluxDBInterpreter.open()` read the `influxdb.token` property and immediately called `toCharArray()` on the returned value. When the token was not configured, `getProperty(...)` returned `null`, causing a `NullPointerException` without explaining that the authentication token was missing. This PR validates the token before building the InfluxDB client. Missing, empty, and blank token values now throw an `InterpreterException` with a clear configuration message instead of a `NullPointerException`. Unit tests were added for absent, empty, and whitespace-only token values. Other InfluxDB properties and client creation behavior are unchanged. ### What type of PR is it? Bug Fix ### Todos * [x] Validate missing, empty, and blank `influxdb.token` values * [x] Throw `InterpreterException` with a clear error message * [x] Add unit tests for each invalid token case ### What is the Jira issue? [ZEPPELIN-6475](https://issues.apache.org/jira/browse/ZEPPELIN-6475) ### How should this be tested? `./mvnw test -pl influxdb` passes successfully. To run only the interpreter test: `./mvnw test -pl influxdb -Dtest=InfluxDBInterpeterTest` passes successfully. Missing, empty, and blank `influxdb.token` values throw `InterpreterException` instead of `NullPointerException`. ### Screenshots (if appropriate) N/A ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No -- 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]
