[jira] Created: (NET-318) Article.references field is never updated; extremely inefficient implementation

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

[jira] Created: (NET-318) Article.references field is never updated; extremely inefficient implementation

JIRA jira@apache.org
Article.references field is never updated; extremely inefficient implementation
-------------------------------------------------------------------------------

                 Key: NET-318
                 URL: https://issues.apache.org/jira/browse/NET-318
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Sebb


Article.references is a private StringBuffer instance.

The method addReference(String) inserts the reference into the buffer followed by a tab.
However, as far as I can tell, this is never called.

The method getReferences() - which is used - has to parse the StringBuffer in order to find the references.
Since the buffer is only used in the add and get methods, it does not make sense to handle the references this way.
Even if the buffer were used (e.g. as part of a toString() method) it would still be better to store the references as a List or Array.


--
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-318) Article.references field is never updated; extremely inefficient implementation

JIRA jira@apache.org

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

Rory Winston updated NET-318:
-----------------------------

    Priority: Minor  (was: Major)

> Article.references field is never updated; extremely inefficient implementation
> -------------------------------------------------------------------------------
>
>                 Key: NET-318
>                 URL: https://issues.apache.org/jira/browse/NET-318
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sebb
>            Priority: Minor
>
> Article.references is a private StringBuffer instance.
> The method addReference(String) inserts the reference into the buffer followed by a tab.
> However, as far as I can tell, this is never called.
> The method getReferences() - which is used - has to parse the StringBuffer in order to find the references.
> Since the buffer is only used in the add and get methods, it does not make sense to handle the references this way.
> Even if the buffer were used (e.g. as part of a toString() method) it would still be better to store the references as a List or Array.

--
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-318) Article.references field is never updated; extremely inefficient implementation

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Sebb updated NET-318:
---------------------

    Component/s: NNTP

> Article.references field is never updated; extremely inefficient implementation
> -------------------------------------------------------------------------------
>
>                 Key: NET-318
>                 URL: https://issues.apache.org/jira/browse/NET-318
>             Project: Commons Net
>          Issue Type: Bug
>          Components: NNTP
>    Affects Versions: 2.0
>            Reporter: Sebb
>            Priority: Minor
>
> Article.references is a private StringBuffer instance.
> The method addReference(String) inserts the reference into the buffer followed by a tab.
> However, as far as I can tell, this is never called.
> The method getReferences() - which is used - has to parse the StringBuffer in order to find the references.
> Since the buffer is only used in the add and get methods, it does not make sense to handle the references this way.
> Even if the buffer were used (e.g. as part of a toString() method) it would still be better to store the references as a List or Array.

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