Skip to content

Commit

Permalink
Merge branch 'resolve-npe' into 'main'
Browse files Browse the repository at this point in the history
Resolve NPE for upgraded Failed status condition that is missing a severity level

See merge request weblogic-cloud/weblogic-kubernetes-operator!4502
  • Loading branch information
rjeberhard committed Nov 15, 2023
2 parents 9e99c00 + b1da0a1 commit 31bdd1f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.google.gson.annotations.SerializedName;
import oracle.kubernetes.json.Obsoleteable;
import oracle.kubernetes.operator.helpers.EventHelper;
import org.apache.commons.lang3.ObjectUtils;

import static oracle.kubernetes.operator.helpers.EventHelper.EventItem.DOMAIN_AVAILABLE;
import static oracle.kubernetes.operator.helpers.EventHelper.EventItem.DOMAIN_COMPLETE;
Expand All @@ -21,7 +22,7 @@ public enum DomainConditionType implements Obsoleteable {
@Override
int compare(DomainCondition thisCondition, DomainCondition thatCondition) {
if (compareUsingSeverities(thisCondition, thatCondition)) {
return thisCondition.getSeverity().compareTo(thatCondition.getSeverity());
return ObjectUtils.compare(thisCondition.getSeverity(), thatCondition.getSeverity());
} else {
return super.compare(thisCondition, thatCondition);
}
Expand Down

0 comments on commit 31bdd1f

Please sign in to comment.