Bugfix
(User-visible)
Detail
#28355
Error message when right-clicking on tile context table
In a tile cockpit, a tile context selection table is offered after selecting a tile.
In this layout, a context menu can be opened by right-clicking *next* to the table.
Problem
Right-clicking *on* the table produces an error message (because the table does not provide any commands?):
caused by: java.lang.NullPointerException: Cannot invoke "java.util.Collection.stream()" because the return value of "com.top_logic.mig.html.layout.LayoutComponent.getCommands()" is null at com.top_logic.layout.basic.contextmenu.component.factory.SelectableContextMenuFactory$Provider.lambda$createButtons$2(SelectableContextMenuFactory.java:75) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1689) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.top_logic.layout.basic.contextmenu.component.factory.SelectableContextMenuFactory$Provider.createButtons(SelectableContextMenuFactory.java:78) at com.top_logic.layout.basic.contextmenu.component.factory.TypeBasedContextMenuFactory$Provider.getContextMenu(TypeBasedContextMenuFactory.java:145) at com.top_logic.layout.basic.contextmenu.component.factory.adapter.TypeBasedContextMenuProvider.getContextMenu(TypeBasedContextMenuProvider.java:74) at com.top_logic.layout.table.control.TableControl.createContextMenu(TableControl.java:453) at com.top_logic.layout.basic.contextmenu.control.ContextMenuOpener.execute(ContextMenuOpener.java:62) at com.top_logic.layout.basic.AbstractControlBase.executeCommand(AbstractControlBase.java:981) at com.top_logic.layout.basic.component.ControlSupport.executeCommand(ControlSupport.java:223) at com.top_logic.layout.basic.component.ControlComponent$DispatchAction.handleCommand(ControlComponent.java:233) at com.top_logic.tool.boundsec.CommandHandlerUtil.handleCommand(CommandHandlerUtil.java:31) at com.top_logic.mig.html.layout.LayoutComponent.dispatchCommand(LayoutComponent.java:3063) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:196) ... 45 more
Test
In Technical Demo > Components > Tiles, right-click in the "Resource table".