[ 
https://issues.apache.org/jira/browse/ISIS-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16735177#comment-16735177
 ] 

Dan Haywood commented on ISIS-1692:
-----------------------------------

I wonder if this is still an issue?  Should be easy to fix, though.

> Should be more resilient if an implementation of TableColumnOrderingService 
> returns a non-existent property name.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-1692
>                 URL: https://issues.apache.org/jira/browse/ISIS-1692
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.14.0
>            Reporter: Dan Haywood
>            Priority: Minor
>             Fix For: 1.17.1
>
>
> at least in 1.15.0-SNAPSHOT, this gave me an NPE
> eg in Estatio, because of non-existent property in TableColumnOrderingService
> {code}
>  @DomainService(nature = NatureOfService.DOMAIN)
>     public static class TableColumnOrderServiceForCreditTransfer implements 
> TableColumnOrderService {
>         @Override
>         public List<String> orderParented(
>                 final Object parent,
>                 final String collectionId,
>                 final Class<?> collectionType,
>                 final List<String> propertyIds) {
>             if(parent instanceof PaymentBatch && 
> CreditTransfer.class.isAssignableFrom(collectionType)) {
>                 return Lists.newArrayList(
>                         "endToEndId",
>                         "seller",
>                         "sellerBankAccount",
>                         "amount",
>                         "remittanceInformation"
>                 );
>             }
>             return null;
>         }
>         @Override
>         public List<String> orderStandalone(final Class<?> collectionType, 
> final List<String> propertyIds) {
>             return null;
>         }
>     }
> {code}
> resulted in stack trace:
> {code}
> java.lang.NullPointerException
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTablePanel#createObjectAdapterPropertyColumn(CollectionContentsAsAjaxTablePanel.java:256)
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTablePanel#addPropertyColumnsIfRequired(CollectionContentsAsAjaxTablePanel.java:208)
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTablePanel#buildGui(CollectionContentsAsAjaxTablePanel.java:102)
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTablePanel#onInitialize(CollectionContentsAsAjaxTablePanel.java:80)
> org.apache.wicket.Component#fireInitialize(Component.java:878)
> org.apache.wicket.MarkupContainer#internalInitialize(MarkupContainer.java:1081)
> org.apache.wicket.MarkupContainer#addedComponent(MarkupContainer.java:1058)
> org.apache.wicket.MarkupContainer#add(MarkupContainer.java:241)
> org.apache.wicket.MarkupContainer#addOrReplace(MarkupContainer.java:265)
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.multiple.CollectionContentsMultipleViewsPanel#addUnderlyingViews(CollectionContentsMultipleViewsPanel.java:118)
> org.apache.isis.viewer.wicket.ui.components.collectioncontents.multiple.CollectionContentsMultipleViewsPanel#onInitialize(CollectionContentsMultipleViewsPanel.java:87)
> org.apache.wicket.Component#fireInitialize(Component.java:878)
> org.apache.wicket.MarkupContainer#internalInitialize(MarkupContainer.java:1081)
> org.apache.wicket.MarkupContainer#addedComponent(MarkupContainer.java:1058)
> org.apache.wicket.MarkupContainer#add(MarkupContainer.java:241)
> org.apache.wicket.MarkupContainer#addOrReplace(MarkupContainer.java:265)
> org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault#addOrReplaceComponent(ComponentFactoryRegistryDefault.java:107)
> org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanel#buildGui(CollectionPanel.java:87)
> org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanel#onInitialize(CollectionPanel.java:83)
> org.apache.wicket.Component#fireInitialize(Component.java:878)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1087)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1083)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:144)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:123)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:192)
> org.apache.wicket.MarkupContainer#visitChildren(MarkupContainer.java:983)
> org.apache.wicket.MarkupContainer#internalInitialize(MarkupContainer.java:1082)
> org.apache.wicket.MarkupContainer#addedComponent(MarkupContainer.java:1058)
> org.apache.wicket.MarkupContainer#add(MarkupContainer.java:241)
> org.apache.isis.viewer.wicket.ui.components.entity.collection.EntityCollectionPanel#onInitialize(EntityCollectionPanel.java:94)
> org.apache.wicket.Component#fireInitialize(Component.java:878)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1087)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1083)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:144)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:123)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:192)
> org.apache.wicket.MarkupContainer#visitChildren(MarkupContainer.java:983)
> org.apache.wicket.MarkupContainer#internalInitialize(MarkupContainer.java:1082)
> org.apache.wicket.MarkupContainer#addedComponent(MarkupContainer.java:1058)
> org.apache.wicket.MarkupContainer#replace(MarkupContainer.java:855)
> org.apache.wicket.MarkupContainer#addOrReplace(MarkupContainer.java:269)
> org.apache.wicket.extensions.markup.html.tabs.TabbedPanel#setCurrentTab(TabbedPanel.java:439)
> org.apache.wicket.extensions.markup.html.tabs.TabbedPanel#setSelectedTab(TabbedPanel.java:397)
> org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs.TabGroupPanel#setSelectedTab(TabGroupPanel.java:102)
> org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs.TabGroupPanel#setSelectedTabFromSessionIfAny(TabGroupPanel.java:113)
> org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs.TabGroupPanel#onInitialize(TabGroupPanel.java:95)
> org.apache.wicket.Component#fireInitialize(Component.java:878)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1087)
> org.apache.wicket.MarkupContainer$3#component(MarkupContainer.java:1083)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:144)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:162)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:123)
> org.apache.wicket.util.visit.Visits#visitChildren(Visits.java:192)
> org.apache.wicket.MarkupContainer#visitChildren(MarkupContainer.java:983)
> org.apache.wicket.MarkupContainer#internalInitialize(MarkupContainer.java:1082)
> org.apache.wicket.Page#isPageStateless(Page.java:465)
> org.apache.wicket.request.handler.render.WebPageRenderer#isPageStateless(WebPageRenderer.java:287)
> org.apache.wicket.request.handler.render.WebPageRenderer#shouldRenderPageAndWriteResponse(WebPageRenderer.java:329)
> org.apache.wicket.request.handler.render.WebPageRenderer#respond(WebPageRenderer.java:193)
> org.apache.wicket.core.request.handler.RenderPageRequestHandler#respond(RenderPageRequestHandler.java:175)
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
> org.eclipse.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1621)
> org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter#doFilter(IsisLogOnExceptionFilter.java:52)
> org.eclipse.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1621)
> org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
> org.eclipse.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1621)
> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
> org.eclipse.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1613)
> org.eclipse.jetty.servlet.ServletHandler#doHandle(ServletHandler.java:541)
> org.eclipse.jetty.server.handler.ScopedHandler#handle(ScopedHandler.java:143)
> org.eclipse.jetty.security.SecurityHandler#handle(SecurityHandler.java:548)
> org.eclipse.jetty.server.handler.HandlerWrapper#handle(HandlerWrapper.java:132)
> org.eclipse.jetty.server.handler.ScopedHandler#nextHandle(ScopedHandler.java:190)
> org.eclipse.jetty.server.session.SessionHandler#doHandle(SessionHandler.java:1593)
> org.eclipse.jetty.server.handler.ScopedHandler#nextHandle(ScopedHandler.java:188)
> org.eclipse.jetty.server.handler.ContextHandler#doHandle(ContextHandler.java:1239)
> org.eclipse.jetty.server.handler.ScopedHandler#nextScope(ScopedHandler.java:168)
> org.eclipse.jetty.servlet.ServletHandler#doScope(ServletHandler.java:481)
> org.eclipse.jetty.server.session.SessionHandler#doScope(SessionHandler.java:1562)
> org.eclipse.jetty.server.handler.ScopedHandler#nextScope(ScopedHandler.java:166)
> org.eclipse.jetty.server.handler.ContextHandler#doScope(ContextHandler.java:1141)
> org.eclipse.jetty.server.handler.ScopedHandler#handle(ScopedHandler.java:141)
> org.eclipse.jetty.server.handler.HandlerWrapper#handle(HandlerWrapper.java:132)
> org.eclipse.jetty.server.Server#handle(Server.java:564)
> org.eclipse.jetty.server.HttpChannel#handle(HttpChannel.java:320)
> org.eclipse.jetty.server.HttpConnection#onFillable(HttpConnection.java:251)
> org.eclipse.jetty.io.AbstractConnection$ReadCallback#succeeded(AbstractConnection.java:279)
> org.eclipse.jetty.io.FillInterest#fillable(FillInterest.java:110)
> org.eclipse.jetty.io.ChannelEndPoint$2#run(ChannelEndPoint.java:124)
> org.eclipse.jetty.util.thread.Invocable#invokePreferred(Invocable.java:122)
> org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy#invoke(ExecutingExecutionStrategy.java:58)
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume#produceConsume(ExecuteProduceConsume.java:201)
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume#run(ExecuteProduceConsume.java:133)
> org.eclipse.jetty.util.thread.QueuedThreadPool#runJob(QueuedThreadPool.java:672)
> org.eclipse.jetty.util.thread.QueuedThreadPool$2#run(QueuedThreadPool.java:590)
> java.lang.Thread#run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to