mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01: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);
|
||||
}
|
||||
|
||||
public CatalogPage getCatalogPage(final String captionSafe) {
|
||||
final CatalogPage[] page = {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];
|
||||
}
|
||||
public CatalogPage getCatalogPage(String captionSafe) {
|
||||
return this.catalogPages.valueCollection().stream().filter(p -> p.getPageName().equalsIgnoreCase(captionSafe)).findAny().orElse(null);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user