rymarm commented on PR #2859:
URL: https://github.com/apache/drill/pull/2859#issuecomment-1873939057
> Are the two removed null checks not needed?
@jnturton Yes, they are redundant.
``` java
if (locatorPlugins != null) {
bootstrapPlugins.putAll(locatorPlugins);
}
```
It is redundant, because `StoragePlugins#putAll` himself checks the
argument nullability:
https://github.com/apache/drill/blob/15c446d7e8ebe6d97fc879103e1710d733318c6d/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/StoragePlugins.java#L114-L117
```java
if (upgraded != null) {
upgraded.putAll(locatorPlugins);
}
```
It is redundant, because `upgraded` is just initialized with a constructor
just a few lines above and not overridden.
--
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]