Community
Participate
Working Groups
Created attachment 193774 [details] Screenshot: Debugger Just invoked Eclipse Help and stopped with a NPE in this method. If the passed url is null the method should return null. However, the problem arised also before in FileLocator#resolve(URL), but there it would handle the null pointer properly if the Activator returns it. Maybe attached screenshots from the debugger help to locate the original cause. Thread [438284608@qtp-340964251-6 - /help/topic/org.eclipse.help.base/doc/help_home.html] (Suspended (exception NullPointerException)) Activator.getURLConverter(URL) line: 313 FileLocator.resolve(URL) line: 227 ResourceLocator.getErrorPath(String, String, String) line: 483 TocFileProvider.getTocContributions(String) line: 60 TocManager.getAndCacheTocContributions(String, Map) line: 210 TocManager.getTocContributionsForToc(String) line: 199 TocManager.getRootTocContributions(String, Set) line: 306 TocManager.getTocs(String) line: 68 TocManager.getTopic(String, String) line: 123 TocManager.getTopicPath(String, String) line: 138 UrlUtil.getTopicPath(String, String) line: 190 BreadcrumbsFilter.filter(HttpServletRequest, OutputStream) line: 75 EclipseConnector.transfer(HttpServletRequest, HttpServletResponse) line: 185 ContentServlet.doGet(HttpServletRequest, HttpServletResponse) line: 45 ContentServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 707 ContentServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 820 ServletManager$ServletWrapper.service(ServletRequest, ServletResponse) line: 180 ServletRegistration.service(HttpServletRequest, HttpServletResponse) line: 61 HttpServiceServlet(ProxyServlet).processAlias(HttpServletRequest, HttpServletResponse, String, String) line: 126 HttpServiceServlet(ProxyServlet).service(HttpServletRequest, HttpServletResponse) line: 68 HttpServiceServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 820 HttpServerManager$InternalHttpServiceServlet.service(ServletRequest, ServletResponse) line: 318 ServletHolder.handle(ServletRequest, ServletResponse) line: 511 ServletHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 390 SessionHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 182 Context(ContextHandler).handle(String, HttpServletRequest, HttpServletResponse, int) line: 765 Server(HandlerWrapper).handle(String, HttpServletRequest, HttpServletResponse, int) line: 152 Server.handle(HttpConnection) line: 322 HttpConnection.handleRequest() line: 542 HttpConnection$RequestHandler.headerComplete() line: 924 HttpParser.parseNext() line: 549 HttpParser.parseAvailable() line: 212 HttpConnection.handle() line: 404 SelectChannelConnector$ConnectorEndPoint(SelectChannelEndPoint).run() line: 409 QueuedThreadPool$PoolThread.run() line: 582
Created attachment 193775 [details] Screenshot: Debugger
Created attachment 193776 [details] Screenshot: Debugger
Moving to user assistance for comment or close. org.eclipse.help.internal.util.ResourceLocator.getErrorPath(String, String, String) may call org.eclipse.core.runtime.FileLocator.resolve(URL) with a null URL. The javadoc for FileLocator.resolve does not indicate that null is a valid argument and it is valid to throw a NullPointerException in my opinion. ResourceLocator.getErrorPath catches all exceptions so this NPE is never surfaced to the user.
I agree with Tom, the exception is caught and not written out to the log so a user would not run into this outside of the debugger.