mirror of https://github.com/apache/nifi.git
NIFI-11963 Added null check in system test for instance cache method
- Timing issues in system integration tests could sometimes fail with a NullPointerException when calling the poison method multiple times This closes #7618 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
680acf89ed
commit
25d775b965
|
@ -103,6 +103,9 @@ public class NiFiInstanceCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void poison(final NiFiInstance toPoison) {
|
public void poison(final NiFiInstance toPoison) {
|
||||||
|
if (this.instance == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final NiFiInstance rawInstance = this.instance.getRawInstance();
|
final NiFiInstance rawInstance = this.instance.getRawInstance();
|
||||||
|
|
||||||
if (Objects.equals(rawInstance, toPoison)) {
|
if (Objects.equals(rawInstance, toPoison)) {
|
||||||
|
|
Loading…
Reference in New Issue