mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-07-04 14:25:32 +02:00
Fix NullPointerException when creating a room bundle
This commit is contained in:
parent
40888f091c
commit
b6aeaa9f37
|
@ -589,24 +589,8 @@ public class CatalogManager {
|
||||||
return this.catalogPages.get(pageId);
|
return this.catalogPages.get(pageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CatalogPage getCatalogPage(final String captionSafe) {
|
public CatalogPage getCatalogPage(String captionSafe) {
|
||||||
final CatalogPage[] page = {null};
|
return this.catalogPages.valueCollection().stream().filter(p -> p.getPageName().equalsIgnoreCase(captionSafe)).findAny().orElse(null);
|
||||||
|
|
||||||
synchronized (this.catalogPages) {
|
|
||||||
this.catalogPages.forEachValue(new TObjectProcedure<CatalogPage>() {
|
|
||||||
@Override
|
|
||||||
public boolean execute(CatalogPage object) {
|
|
||||||
if (object.getPageName().equalsIgnoreCase(captionSafe)) {
|
|
||||||
page[0] = object;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return page[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user