rdblue commented on code in PR #9340:
URL: https://github.com/apache/iceberg/pull/9340#discussion_r1431850234
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/SparkTestBaseWithCatalog.java:
##########
@@ -87,7 +87,7 @@ public SparkTestBaseWithCatalog(
config.forEach(
(key, value) -> spark.conf().set("spark.sql.catalog." + catalogName +
"." + key, value));
- if (config.get("type").equalsIgnoreCase("hadoop")) {
+ if (null != config.get("type") &&
config.get("type").equalsIgnoreCase("hadoop")) {
Review Comment:
It is usually better to reverse the equals so that the method call is on the
constant:
```java
if ("hadoop".equalsIgnoreCase(config.get("type"))) {...}
```
That way it's always null-safe.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]