lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (LUCENENET-8) Throwing an exception as a result of a normal situation is extremely bad in .net
Date Thu, 08 Mar 2007 18:11:24 GMT

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

George Aroush reassigned LUCENENET-8:
-------------------------------------

    Assignee:     (was: George Aroush)

> Throwing an exception as a result of a normal situation is extremely bad in .net
> --------------------------------------------------------------------------------
>
>                 Key: LUCENENET-8
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-8
>             Project: Lucene.Net
>          Issue Type: Task
>         Environment: Windows XP, Visual Studio 2003
>            Reporter: Jo Inge Arnes
>         Attachments: test.patch
>
>
> At the end of the FastCharStream.Refill() method, it says:
> int charsRead = input.Read(buffer, newPosition, buffer.Length - newPosition);
> if (charsRead <= 0)
>    throw new System.IO.IOException("read past eof");
> else
>    bufferLength += charsRead;
> When I run Lucene in the debugger, this causes an exception to be thrown all the time.
> To me it looks like it is thrown as a result of a normal situation, not because of some
critical error.
> Is this correct?
> If this is the case, then the code is horrible. Throwing an exception in .NET is extremely
slow, and should never be thrown as a result of a normal situation. I repeat: "extremely slow"

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


Mime
View raw message