commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (NET-532) NPE in nntp.Threader.thread() when all messages in a derived thread are missing.
Date Wed, 16 Apr 2014 02:16:20 GMT

    [ https://issues.apache.org/jira/browse/NET-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13970353#comment-13970353
] 

Sebb edited comment on NET-532 at 4/16/14 2:15 AM:
---------------------------------------------------

I realise that, but as already noted I cannot reproduce the NPE with your test data.

I tried with both the tar.gz attachment and the header-only listing in the comments (BTW,
one reference is truncated in the comments).

Can you provide a complete test case that fails?

Note that the class was originally designed for use with NNTP, in particular XOVER responses.
It would be useful to know if these responses can trigger the bug, or if the response is adjusted
to remove any missing threads so the problem does not occur.


was (Author: sebb@apache.org):
I realise that, but as already noted I cannot reproduce the NPE with you test data.

I tried with both the tar.gz attachment and the header-only listing in the comments (BTW,
one reference is truncated in the comments).

Can you provide a complete test case that fails?

Note that the class was originally designed for use with NNTP, in particular XOVER responses.
It would be useful to know if these responses can trigger the bug, or if the response is adjusted
to remove any missing threads so the problem does not occur.

> NPE in nntp.Threader.thread() when all messages  in a derived thread are missing.
> ---------------------------------------------------------------------------------
>
>                 Key: NET-532
>                 URL: https://issues.apache.org/jira/browse/NET-532
>             Project: Commons Net
>          Issue Type: Bug
>          Components: NNTP
>    Affects Versions: 3.0, 3.3
>            Reporter: Elliot Shank
>         Attachments: messages-referencing-CANh-dXkxpwcgnCYP_tfvH0yXb6__mKbZfbcNoPeyUNZ_arv1SA@mail.gmail.com.tar.gz,
threader-3.3-debug.patch, threader.patch
>
>
> I'm threading emails using the References: header. When I've got an incomplete set of
messages (in this specific case, it's from one of the C++ standards committee lists) such
that I'm missing an entire thread, I get exceptions like this:
> {noformat}
> 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)
> {noformat}
> What happens is that the graph returned by findRootSet() at line 71 will look something
like
> {noformat}
>      ...
>      <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>
>          ...
>      ...
> {noformat}
> And, after pruneEmptyContainers() has had its way with things on line 75, the graph will
be
> {noformat}
>      ...
>      <ThreadContainer A with Threadable>
>          ...
>      <ThreadContainer B without Threadable>
>      <ThreadContainer C with Threadable>
>          ...
>      ...
> {noformat}
> when it should be
> {noformat}
>      ...
>      <ThreadContainer A with Threadable>
>          ...
>      <ThreadContainer C with Threadable>
>          ...
>      ...
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message