TransportUtils NullPointerException When Logger Category is DEBUG
-----------------------------------------------------------------
Key: AXIS2-3411
URL: https://issues.apache.org/jira/browse/AXIS2-3411
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: kernel
Affects Versions: 1.3
Environment: Windows XP, Eclipse3.2
Reporter: Owen Tong
Priority: Minor
When trying the RESTClient, a NullPointerException would be thrown out from
TransportUtils if Logger category is set as "DEBUG". This was caused by the
following code starting at line 154:
......
Builder builder = BuilderUtil.getBuilderFromSelector(type,
msgContext);
if (log.isDebugEnabled()) {
log.debug("createSOAPEnvelope using Builder (" +
builder.getClass() + ") selected from type (" + type
+")");
}
if (builder != null) {
documentElement = builder.processDocument(inStream,
contentType, msgContext);
}
......
At line 154, the builder could be null. If the DEBUG log is enabled at the
same time, the "builder.getClass() will throw NullPointerException.
The logging code should be moved inside "if(builder!=null){".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]