You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Dillard (JIRA)" <ji...@apache.org> on 2008/03/27 21:03:28 UTC

[jira] Created: (LUCENE-1249) Bugs in org.apache.lucene.index.TermVectorsReader.clone()

Bugs in org.apache.lucene.index.TermVectorsReader.clone()
---------------------------------------------------------

                 Key: LUCENE-1249
                 URL: https://issues.apache.org/jira/browse/LUCENE-1249
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
    Affects Versions: 2.3.1
            Reporter: David Dillard
            Priority: Minor
             Fix For: 2.3.2


A couple of things:

- The implementation can return null which is not allowed.  It should throw a CloneNotSupportedException if that's the case.

- Part of the code reads:

    TermVectorsReader clone = null;
    try {
      clone = (TermVectorsReader) super.clone();
    } catch (CloneNotSupportedException e) {}

    clone.tvx = (IndexInput) tvx.clone();

If a CloneNotSupportedException is caught then "clone" will be null and the assignment to clone.tvx will fail with a null pointer exception.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1249) Bugs in org.apache.lucene.index.TermVectorsReader.clone()

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1249.
----------------------------------------

    Resolution: Fixed

Thanks David!

> Bugs in org.apache.lucene.index.TermVectorsReader.clone()
> ---------------------------------------------------------
>
>                 Key: LUCENE-1249
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1249
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: David Dillard
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>
> A couple of things:
> - The implementation can return null which is not allowed.  It should throw a CloneNotSupportedException if that's the case.
> - Part of the code reads:
>     TermVectorsReader clone = null;
>     try {
>       clone = (TermVectorsReader) super.clone();
>     } catch (CloneNotSupportedException e) {}
>     clone.tvx = (IndexInput) tvx.clone();
> If a CloneNotSupportedException is caught then "clone" will be null and the assignment to clone.tvx will fail with a null pointer exception.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-1249) Bugs in org.apache.lucene.index.TermVectorsReader.clone()

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless reassigned LUCENE-1249:
------------------------------------------

    Assignee: Michael McCandless

> Bugs in org.apache.lucene.index.TermVectorsReader.clone()
> ---------------------------------------------------------
>
>                 Key: LUCENE-1249
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1249
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: David Dillard
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>
> A couple of things:
> - The implementation can return null which is not allowed.  It should throw a CloneNotSupportedException if that's the case.
> - Part of the code reads:
>     TermVectorsReader clone = null;
>     try {
>       clone = (TermVectorsReader) super.clone();
>     } catch (CloneNotSupportedException e) {}
>     clone.tvx = (IndexInput) tvx.clone();
> If a CloneNotSupportedException is caught then "clone" will be null and the assignment to clone.tvx will fail with a null pointer exception.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1249) Bugs in org.apache.lucene.index.TermVectorsReader.clone()

Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Busch updated LUCENE-1249:
----------------------------------

    Fix Version/s:     (was: 2.3.2)
                   2.4

> Bugs in org.apache.lucene.index.TermVectorsReader.clone()
> ---------------------------------------------------------
>
>                 Key: LUCENE-1249
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1249
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: David Dillard
>            Priority: Minor
>             Fix For: 2.4
>
>
> A couple of things:
> - The implementation can return null which is not allowed.  It should throw a CloneNotSupportedException if that's the case.
> - Part of the code reads:
>     TermVectorsReader clone = null;
>     try {
>       clone = (TermVectorsReader) super.clone();
>     } catch (CloneNotSupportedException e) {}
>     clone.tvx = (IndexInput) tvx.clone();
> If a CloneNotSupportedException is caught then "clone" will be null and the assignment to clone.tvx will fail with a null pointer exception.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org