NPE if User-Agent header is missing
-----------------------------------
Key: TRINIDAD-1751
URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 1.2.13-core
Reporter: Harald Kuhn
After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a
NullPointerException from one of our monitoring scripts.
Caused by: java.lang.NullPointerException
at
org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
at
org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
at
org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
at
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
at
org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
While tracking this issue further down it showed that the monitoring script
doesn't send a User-Agent header along with the request.
This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
The version from Trinidad 1.2.11 used to have the following code block:
if (userAgent == null)
{
_populateUnknownAgentImpl(null, agent);
return;
}
it looks has been changed/removed in this rev:
http://svn.apache.org/viewvc?view=revision&revision=820104
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.