You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Michael Garski (JIRA)" <ji...@apache.org> on 2010/02/04 23:11:28 UTC

[jira] Created: (LUCENENET-339) FilterCleaner throws exception

FilterCleaner throws exception
------------------------------

                 Key: LUCENENET-339
                 URL: https://issues.apache.org/jira/browse/LUCENENET-339
             Project: Lucene.Net
          Issue Type: Bug
            Reporter: Michael Garski


The FilterCleaner that is used by the FilterManager to purge filters throws an exception when called:

System.InvalidCastException: Objects are not Map.Entry: a is System.Int32; b is System.Int32
   at Lucene.Net.Search.FilterManager.FilterCleaner.AnonymousClassComparator.Compare(Object a, Object b) in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 210
   at System.Collections.Generic.SortedDictionary`2.KeyValuePairComparer.Compare(KeyValuePair`2 x, KeyValuePair`2 y)
   at System.Collections.Generic.TreeSet`1.Add(T item)
   at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)
   at Lucene.Net.Search.FilterManager.FilterCleaner.Run() in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 251
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

I'm working on a patch and will post it shortly.


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


[jira] Resolved: (LUCENENET-339) FilterCleaner throws exception

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

Michael Garski resolved LUCENENET-339.
--------------------------------------

    Resolution: Fixed

Resolved with revision 911185

> FilterCleaner throws exception
> ------------------------------
>
>                 Key: LUCENENET-339
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-339
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Michael Garski
>         Attachments: LUCENENET-339.patch
>
>
> The FilterCleaner that is used by the FilterManager to purge filters throws an exception when called:
> System.InvalidCastException: Objects are not Map.Entry: a is System.Int32; b is System.Int32
>    at Lucene.Net.Search.FilterManager.FilterCleaner.AnonymousClassComparator.Compare(Object a, Object b) in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 210
>    at System.Collections.Generic.SortedDictionary`2.KeyValuePairComparer.Compare(KeyValuePair`2 x, KeyValuePair`2 y)
>    at System.Collections.Generic.TreeSet`1.Add(T item)
>    at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)
>    at Lucene.Net.Search.FilterManager.FilterCleaner.Run() in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 251
>    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
>    at System.Threading.ThreadHelper.ThreadStart()
> I'm working on a patch and will post it shortly.

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


[jira] Updated: (LUCENENET-339) FilterCleaner throws exception

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

Michael Garski updated LUCENENET-339:
-------------------------------------

    Attachment: LUCENENET-339.patch

Patch attached.

There is no unit test for the FilterCleaner functionality currently, which is why this issue was not caught until I placed more than 100 filters in the FilterManager (the default value to trigger the cleaning).  I did not create a new unit test for the FilterCleaner yet.

> FilterCleaner throws exception
> ------------------------------
>
>                 Key: LUCENENET-339
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-339
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Michael Garski
>         Attachments: LUCENENET-339.patch
>
>
> The FilterCleaner that is used by the FilterManager to purge filters throws an exception when called:
> System.InvalidCastException: Objects are not Map.Entry: a is System.Int32; b is System.Int32
>    at Lucene.Net.Search.FilterManager.FilterCleaner.AnonymousClassComparator.Compare(Object a, Object b) in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 210
>    at System.Collections.Generic.SortedDictionary`2.KeyValuePairComparer.Compare(KeyValuePair`2 x, KeyValuePair`2 y)
>    at System.Collections.Generic.TreeSet`1.Add(T item)
>    at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)
>    at Lucene.Net.Search.FilterManager.FilterCleaner.Run() in C:\SVN Projects\Lucene.Net\trunk\C#\src\Lucene.Net\Search\FilterManager.cs:line 251
>    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
>    at System.Threading.ThreadHelper.ThreadStart()
> I'm working on a patch and will post it shortly.

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