You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Nick Crowther (JIRA)" <ji...@apache.org> on 2009/07/06 13:26:14 UTC

[jira] Created: (LUCENENET-185) Parameters in interface TermDocs.Read() are not passed by reference

Parameters in interface TermDocs.Read() are not passed by reference
-------------------------------------------------------------------

                 Key: LUCENENET-185
                 URL: https://issues.apache.org/jira/browse/LUCENENET-185
             Project: Lucene.Net
          Issue Type: Bug
         Environment: Win XP SP3, .net framework 3.5
            Reporter: Nick Crowther
            Priority: Minor


The 'docs' and 'freqs' integer arrays passed in as parameters may be modified in classes that implement this method (e.g.: in class Lucene.Net.Index.SegmentTermDocs), so they should be passed by reference to allow calling classes to access the modifications.

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


[jira] Commented: (LUCENENET-185) Parameters in interface TermDocs.Read() are not passed by reference

Posted by "Digy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727609#action_12727609 ] 

Digy commented on LUCENENET-185:
--------------------------------

Hi Nick,
They are the same in Lucene.Java too. What is your motive to change them?  Maybe, it is possible to handle it in more  "Lucene's way".

DIGY

> Parameters in interface TermDocs.Read() are not passed by reference
> -------------------------------------------------------------------
>
>                 Key: LUCENENET-185
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-185
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Win XP SP3, .net framework 3.5
>            Reporter: Nick Crowther
>            Priority: Minor
>
> The 'docs' and 'freqs' integer arrays passed in as parameters may be modified in classes that implement this method (e.g.: in class Lucene.Net.Index.SegmentTermDocs), so they should be passed by reference to allow calling classes to access the modifications.

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


[jira] Closed: (LUCENENET-185) Parameters in interface TermDocs.Read() are not passed by reference

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

Nick Crowther closed LUCENENET-185.
-----------------------------------

    Resolution: Invalid

My mistake, as an array is a reference type variable, it doesn't require the use of the 'ref' modifier.

> Parameters in interface TermDocs.Read() are not passed by reference
> -------------------------------------------------------------------
>
>                 Key: LUCENENET-185
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-185
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Win XP SP3, .net framework 3.5
>            Reporter: Nick Crowther
>            Priority: Minor
>
> The 'docs' and 'freqs' integer arrays passed in as parameters may be modified in classes that implement this method (e.g.: in class Lucene.Net.Index.SegmentTermDocs), so they should be passed by reference to allow calling classes to access the modifications.

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


[jira] Commented: (LUCENENET-185) Parameters in interface TermDocs.Read() are not passed by reference

Posted by "Nick Crowther (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728084#action_12728084 ] 

Nick Crowther commented on LUCENENET-185:
-----------------------------------------

Hi Digy,

There's an example of using a custom filter in the Lucene In Action book from Manning that uses the 'docs' and 'freq' arrays after they've been passed into the TermDocs.Read() method, so I assumed that they should be passed by reference so any changes could be picked up. I've posted a question about it here: http://stackoverflow.com/questions/1079934

Nick

> Parameters in interface TermDocs.Read() are not passed by reference
> -------------------------------------------------------------------
>
>                 Key: LUCENENET-185
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-185
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Win XP SP3, .net framework 3.5
>            Reporter: Nick Crowther
>            Priority: Minor
>
> The 'docs' and 'freqs' integer arrays passed in as parameters may be modified in classes that implement this method (e.g.: in class Lucene.Net.Index.SegmentTermDocs), so they should be passed by reference to allow calling classes to access the modifications.

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