GH-8869: Fix NPE in RedisLockRegistry.setExecutor
Fixes: #8869 Do not set the `redisMessageListenerContainer`'s executor in the setter method since the Redis Message Listener container is not initialised during configuration due to lazy loading **Cherry-pick to `6.2.x` & `6.0.x`**
This commit is contained in:
committed by
Artem Bilan
parent
35f3a87109
commit
62fd3e6c20
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2023 the original author or authors.
|
||||
* Copyright 2014-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -198,8 +198,6 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl
|
||||
public void setExecutor(Executor executor) {
|
||||
this.executor = executor;
|
||||
this.executorExplicitlySet = true;
|
||||
this.redisMessageListenerContainer.setTaskExecutor(this.executor);
|
||||
this.redisMessageListenerContainer.setSubscriptionExecutor(this.executor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user