[Clara] Null pointer exception in BSTTTrackCandFinder
Sebastián Mancilla
smancill at jlab.org
Wed Nov 27 14:23:48 EST 2013
2013/11/27 Sebastián Mancilla <smancill at jlab.org>
>
>
> java.lang.NullPointerException
>> at
>>
>> trac.services.centraltracker.BSTTrackCandFinder.processEvent(BSTTrackCandFinder.java:265)
>> at
>>
>> trac.services.centraltracker.BSTTrackCandFinder.execute(BSTTrackCandFinder.java:361)
>> at
>>
>> org.jlab.coda.clara.core.CServiceContainer._executeService(CServiceContainer.java:534)
>> at
>>
>> org.jlab.coda.clara.core.CServiceContainer.access$1700(CServiceContainer.java:35)
>> at
>>
>> org.jlab.coda.clara.core.CServiceContainer$ServiceWorkerThread.run(CServiceContainer.java:1323)
>> at
>>
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:744)
>>
>
>
Hi
GetCTTrackCands_SimpleCuts.findTrackCands is returning null in lines
126-128:
//at least 3 hits required to fit a helix
if(NbNonEmptyReg<3)
return null;
When a method is returning a list, two things are recommended:
- return using the interface List (Effective Java, item 53)
- return an empty list instead of null (Effective Java, item 43)
In Eclipse, when you click over the return type in the function signature,
it will highlight all the lines where the method is returning.
--
Sebastian Mancilla Matta
CCTVal, UTFSM
Valparaíso, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/clara/attachments/20131127/9b1b3b2f/attachment.html
More information about the Clara
mailing list