Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 281843

Summary: [Branding] NPE if favIcon is invalid
Product: [RT] RAP Reporter: Benjamin Muskalla <b.muskalla>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Benjamin Muskalla CLA 2009-06-29 08:05:42 EDT
In the case the favIcon specified in the plugin.xml for a branding is not found during runtime (wrong name, forgot to include in the build), there is currently an NPE thrown.
We should rather throw a IllegalArgumentException so users have better chances to spot the error.

Stacktrace:
java.lang.NullPointerException
	at org.eclipse.rap.ui.internal.branding.Branding.registerResources(Branding.java:171)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConfigurer.registerBrandingResources(LifeCycleServiceHandlerConfigurer.java:260)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConfigurer.applyBranding(LifeCycleServiceHandlerConfigurer.java:222)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandlerConfigurer.getTemplateOfStartupPage(LifeCycleServiceHandlerConfigurer.java:64)
	at org.eclipse.rwt.internal.service.BrowserSurvey.renderScript(BrowserSurvey.java:90)
	at org.eclipse.rwt.internal.service.BrowserSurvey.sendBrowserSurvey(BrowserSurvey.java:51)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.internalService(LifeCycleServiceHandler.java:197)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.access$1(LifeCycleServiceHandler.java:185)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler$LifeCycleServiceHandlerSync.doService(LifeCycleServiceHandler.java:150)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync.service(RWTLifeCycleServiceHandlerSync.java:36)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:157)
	at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:101)
	at org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelegate.java:63)
	at org.eclipse.rap.ui.internal.servlet.RequestHandler.service(RequestHandler.java:51)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
Comment 1 Ivan Furnadjiev CLA 2010-01-12 04:11:12 EST
The current state (RAP 1.3M4) of this bug is that a "java.io.IOException: Cannot find icons/favicon.ico" is thrown if the specified favIcon in the plugin.xml is not found during runtime. Benny, do you think that we can close it?
Comment 2 Benjamin Muskalla CLA 2010-01-12 05:33:06 EST
Yep, closing this as WORKSFORME as the described behavior of M4 is what I'd have expected.