Skip to content

Commit 36bb502

Browse files
authored
IGNITE-29000 NPE can be raised from GridCachePartitionExchangeManager#lastAffinityChangedTopologyVersion (#13504)
1 parent e682825 commit 36bb502

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,11 +1052,14 @@ public boolean hasPendingServerExchange() {
10521052
}
10531053

10541054
/**
1055-
*
10561055
* @param topVer Topology version.
1057-
* @return Last topology version before the provided one when affinity was modified.
1056+
* @return Last topology version before the provided one when affinity was modified or {@link AffinityTopologyVersion#NONE}
1057+
* if {@code topVer} is null.
10581058
*/
10591059
public AffinityTopologyVersion lastAffinityChangedTopologyVersion(AffinityTopologyVersion topVer) {
1060+
if (topVer == null)
1061+
return NONE;
1062+
10601063
if (topVer.topologyVersion() <= 0)
10611064
return topVer;
10621065

0 commit comments

Comments
 (0)