6.6.0 Tree getActions() Action.Handler has null target

I have upgraded from 6.5.7 to 6.6.0 and for some reason my main navigation Tree was failing with a null pointer.

I traced it my Action.Handler callback, in which the getActions(Object target, Object sender) is called. But the ‘target’ is null. The ‘sender’ is my Tree object.

What might cause this? Previously I didn’t have to protect my code from getting a null target object passed.

As a quick workaround, I just check if it’s null and if so return null. This seems to get by the NPE, but why would it even call my getActions on a null target? The next call shows target as ‘1’ so it appears to be at the start of the tree’s build.

Here’s the Eclipse debug stack if that helps:

Daemon Thread [http-80-5]
(Suspended (breakpoint at line 467 in MainNavigationTree))
MainNavigationTree.getActions(Object, Object) line: 467
MainNavigationTree(Tree).paintContent(PaintTarget) line: 575
MainNavigationTree(AbstractComponent).paint(PaintTarget) line: 755
HorizontalSplitPanel(AbstractSplitPanel).paintContent(PaintTarget) line: 235
HorizontalSplitPanel(AbstractComponent).paint(PaintTarget) line: 755
VerticalLayout(AbstractOrderedLayout).paintContent(PaintTarget) line: 171
VerticalLayout(AbstractComponent).paint(PaintTarget) line: 755
MainWindow(Panel).paintContent(PaintTarget) line: 255
MainWindow(Window).paintContent(PaintTarget) line: 632
MainWindow(AbstractComponent).paint(PaintTarget) line: 755
CommunicationManager(AbstractCommunicationManager).writeUidlResponce(AbstractCommunicationManager$Callback, boolean, PrintWriter, Window, boolean) line: 952
CommunicationManager(AbstractCommunicationManager).paintAfterVariableChanges(AbstractCommunicationManager$Request, AbstractCommunicationManager$Response, AbstractCommunicationManager$Callback, boolean, PrintWriter, Window, boolean) line: 839
CommunicationManager(AbstractCommunicationManager).doHandleUidlRequest(AbstractCommunicationManager$Request, AbstractCommunicationManager$Response, AbstractCommunicationManager$Callback, Window) line: 765
CommunicationManager.handleUidlRequest(HttpServletRequest, HttpServletResponse, AbstractApplicationServlet, Window) line: 296
ApplicationServlet(AbstractApplicationServlet).service(HttpServletRequest, HttpServletResponse) line: 501
ApplicationServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 717
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 290
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
StandardWrapperValve.invoke(Request, Response) line: 233
StandardContextValve.invoke(Request, Response) line: 191
StandardHostValve.invoke(Request, Response) line: 128
ErrorReportValve.invoke(Request, Response) line: 102
StandardEngineValve.invoke(Request, Response) line: 109
CoyoteAdapter.service(Request, Response) line: 293
Http11Processor.process(Socket) line: 849
Http11Protocol$Http11ConnectionHandler.process(Socket) line: 583
JIoEndpoint$Worker.run() line: 454
Thread.run() line: not available

Hi,

The reason for this is the new feature described here:
http://dev.vaadin.com/ticket/5992

I checked the release notes and there was no mention of this. There definitely should have been. Shame on us.

cheers,
matti

Ah, a nice feature, but yes, missing in the release notes.

Another nice feature related to this would be a “no rows” display for a table to show that the table actually has no rows. We use a table with search capabilities a lot and there’s no good indicator of a table that is empty before the search takes place, versus a search that resulted in no rows. This would be some sort of “display empty table” value.

Thanks for resolving the mystery, though!