[Geoserver-devel] [jira] Created: (GEOS-4900) map decoration layout fails on empty layer title

map decoration layout fails on empty layer title
------------------------------------------------

                 Key: GEOS-4900
                 URL: https://jira.codehaus.org/browse/GEOS-4900
             Project: GeoServer
          Issue Type: Bug
    Affects Versions: 2.1.2
            Reporter: Hajo Kliemeck
            Assignee: Andrea Aime
         Attachments: LegendDecoration.patch

as described on the title, the map decoration will fail with an empty (null) layer title:

{quote}
09 Dez 16:12:32 WARN [wms.responses] - Couldn't make a legend for http://gis.markenmehrwert.com/:zipcode
java.lang.NullPointerException: String is null
  at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2795)
  at org.geoserver.wms.decoration.LegendDecoration.paint(LegendDecoration.java:185)
  at org.geoserver.wms.decoration.MapDecorationLayout$Block.paint(MapDecorationLayout.java:215)
  at org.geoserver.wms.decoration.MapDecorationLayout.paint(MapDecorationLayout.java:338)
  at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:492)
  at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:249)
  at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:124)
  at org.geoserver.wms.GetMap.run(GetMap.java:377)
  at org.geoserver.wms.GetMap.run(GetMap.java:107)
  at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:353)
  at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
  at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:60)
  at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:34)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:58)
  at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:40)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:51)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  at $Proxy20.getMap(Unknown Source)
  at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:630)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:234)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
  at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
  at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
  at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
  at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
  at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:324)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
  at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
  at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
{quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira