[jira] Created: (NET-289) StackOverflowError in Threader

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (NET-289) StackOverflowError in Threader

JIRA jira@apache.org
StackOverflowError in Threader
------------------------------

                 Key: NET-289
                 URL: https://issues.apache.org/jira/browse/NET-289
             Project: Commons Net
          Issue Type: Bug
            Reporter: Luc Claes
            Priority: Minor


The loop detection code in Threader.buildContainer() is currently:
                // Link references together in the order they appear in the References: header,
                // IF they dont have a have a parent already &&
                // IF it will not cause a circular reference
                if ((parentRef != null)
                    && (ref.parent == null)
                    && (parentRef != ref)
                    && !(parentRef.findChild(ref))) {
                    // Link ref into the parent's child list
Deep circular references where 'parentRef' is already a child of 'ref' and ref is the root container are possible.
The test should be:
               if ((parentRef != null)
                    && (ref.parent == null)
                    && (parentRef != ref)
                    && !(ref.findChild(parentRef))) {
                    // Link ref into the parent's child list


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (NET-289) StackOverflowError in Threader

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/NET-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-289:
---------------------

    Component/s: NNTP

> StackOverflowError in Threader
> ------------------------------
>
>                 Key: NET-289
>                 URL: https://issues.apache.org/jira/browse/NET-289
>             Project: Commons Net
>          Issue Type: Bug
>          Components: NNTP
>            Reporter: Luc Claes
>            Priority: Minor
>
> The loop detection code in Threader.buildContainer() is currently:
>                 // Link references together in the order they appear in the References: header,
>                 // IF they dont have a have a parent already &&
>                 // IF it will not cause a circular reference
>                 if ((parentRef != null)
>                     && (ref.parent == null)
>                     && (parentRef != ref)
>                     && !(parentRef.findChild(ref))) {
>                     // Link ref into the parent's child list
> Deep circular references where 'parentRef' is already a child of 'ref' and ref is the root container are possible.
> The test should be:
>                if ((parentRef != null)
>                     && (ref.parent == null)
>                     && (parentRef != ref)
>                     && !(ref.findChild(parentRef))) {
>                     // Link ref into the parent's child list

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.