commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [net] NullPointerException from nntp.Threader.thread() when all messages in a derived thread are missing.
Date Wed, 02 Apr 2014 22:24:56 GMT
On 2 April 2014 21:55, Elliot Shank <code@galumph.com> wrote:
> Using v3.3, I'm getting problems like
>
> Exception in thread "main" java.lang.NullPointerException
>     at
> org.apache.commons.net.nntp.Threader.gatherSubjects(Threader.java:342)
>     at org.apache.commons.net.nntp.Threader.thread(Threader.java:81)
>     at org.apache.commons.net.nntp.Threader.thread(Threader.java:47)
>
> when a particular thread branch has no actual messages in it.

Ideally this should please be reported as a JIRA issue.

> What happens is that the graph returned by findRootSet() at line 71 will
> look something like
>
>     ...
>     <ThreadContainer A with Threadable>
>         ...
>     <ThreadContainer B without Threadable>
>         <ThreadContainer ... without Threadable>
>             <ThreadContainer ... without Threadable>
>             <ThreadContainer ... without Threadable>
>         <ThreadContainer ... without Threadable>
>             <ThreadContainer ... without Threadable>
>                 <ThreadContainer ... without Threadable>
>     <ThreadContainer C with Threadable>
>         ...
>     ...
>
> And, after pruneEmptyContainers() has had its way with things on line 75,
> the graph will be
>
>     ...
>     <ThreadContainer A with Threadable>
>         ...
>     <ThreadContainer B without Threadable>
>     <ThreadContainer C with Threadable>
>         ...
>     ...
>
> when it should be
>
>     ...
>     <ThreadContainer A with Threadable>
>         ...
>     <ThreadContainer C with Threadable>
>         ...
>     ...
>
> I.e., ThreadContainer B should be eliminated entirely.
>
> As it is, with ThreadContainer B present, but not containing any children or
> a Threadable, gatherSubjects() chokes.

Can you provide a sample news group that shows the problem?
For example using the example program:

examples.nntp.MessageThreading


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message