Skip to content

Commit

Permalink
Ignore boolean null check in spotbugs
Browse files Browse the repository at this point in the history
Signed-off-by: Venkatesh Kannan <[email protected]>
  • Loading branch information
venkatesh2090 committed Nov 7, 2024
1 parent e91629e commit 225bc90
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package io.strimzi.operator.cluster.model;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.strimzi.api.kafka.model.common.template.ExternalTrafficPolicy;
import io.strimzi.api.kafka.model.common.template.IpFamily;
import io.strimzi.api.kafka.model.common.template.IpFamilyPolicy;
Expand Down Expand Up @@ -787,11 +788,11 @@ public static List<String> brokerExternalIPs(GenericKafkaListener listener, int
* @param listener Listener for which to allocate NodePorts
* @return Whether to allocate NodePorts for Service
*/
@SuppressFBWarnings(value = {"NP_BOOLEAN_RETURN_NULL"}, justification = "Null is being checked by the caller, so " +
"the Service defaults can takeover properly")
public static Boolean allocateLoadBalancerNodePorts(GenericKafkaListener listener) {
if (listener.getConfiguration() != null) {
return listener.getConfiguration().getAllocateLoadBalancerNodePorts();
} else {
return true;
}
return listener.getConfiguration() != null ?
listener.getConfiguration().getAllocateLoadBalancerNodePorts() :
null;
}
}

0 comments on commit 225bc90

Please sign in to comment.