On 22/08/2013 20:48, Rainer Jung wrote:
> On 22.08.2013 13:24, ma...@apache.org wrote:
>> Author: markt
>> Date: Thu Aug 22 11:24:07 2013
>> New Revision: 1516416
>>
>> URL: http://svn.apache.org/r1516416
>> Log:
>> Fix NPE observed in testing logs
>>
>> Modified:
>>     tomcat/trunk/java/org/apache/juli/OneLineFormatter.java
>>
>> Modified: tomcat/trunk/java/org/apache/juli/OneLineFormatter.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/OneLineFormatter.java?rev=1516416&r1=1516415&r2=1516416&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/juli/OneLineFormatter.java (original)
>> +++ tomcat/trunk/java/org/apache/juli/OneLineFormatter.java Thu Aug 22 
>> 11:24:07 2013
>> @@ -191,7 +191,9 @@ public class OneLineFormatter extends Fo
>>              }
>>              ThreadInfo threadInfo =
>>                      threadMxBean.getThreadInfo(logRecordThreadId);
>> -            result = threadInfo.getThreadName();
> 
> Maybe you didn't want to delete that line but keep it below the null
> check? Otherwise I don't see where the MXBean gets used after the check
> and the cache won't get filled with anything useful.

Spot on. Thanks for the catch. Fixed.

Mark


> 
>> +            if (threadInfo == null) {
>> +                return Long.toString(logRecordThreadId);
>> +            }
>>          }
>>  
>>          cache.put(Integer.valueOf(logRecordThreadId), result);
> 
> Regards,
> 
> Rainer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to