Fix NPE in Permissible#recalculatePermissions

This commit is contained in:
Luck committed 2019-12-13 14:30:37 +00:00
1 parent bd349ac4a3
commit 9093385de3
2 files changed
+6 -2

No files matched your search

@@ -308,7 +308,9 @@ public class LPPermissible extends PermissibleBase {
// because we encapsulate op status within QueryOptions, we need to invalidate
// the contextmanager cache when op status changes.
// (#invalidate is a fast call)
this.queryOptionsSupplier.invalidate();
if (this.queryOptionsSupplier != null) { // this method is called by the super class constructor, before this class has fully initialised
this.queryOptionsSupplier.invalidate();
}
// but we don't need to do anything else in this method, unlike the CB impl.
}
@@ -294,7 +294,9 @@ public class LPPermissible extends PermissibleBase {
// because we encapsulate op status within QueryOptions, we need to invalidate
// the contextmanager cache when op status changes.
// (#invalidate is a fast call)
this.queryOptionsSupplier.invalidate();
if (this.queryOptionsSupplier != null) { // this method is called by the super class constructor, before this class has fully initialised
this.queryOptionsSupplier.invalidate();
}
// but we don't need to do anything else in this method, unlike the CB impl.
}