Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] Commented: (LUCENE-2030) CachingSpanFilter synchronizing on a none final protected object

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Nov 4, 2009, 7:06 PM

Post #1 of 2 (178 views)
Permalink
[jira] Commented: (LUCENE-2030) CachingSpanFilter synchronizing on a none final protected object

[ https://issues.apache.org/jira/browse/LUCENE-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773758#action_12773758 ]

Uwe Schindler commented on LUCENE-2030:
---------------------------------------

This patch breaks serialization because the de-serializer does not call ctors and so the cache keeps unintialized (=null).

> CachingSpanFilter synchronizing on a none final protected object
> ----------------------------------------------------------------
>
> Key: LUCENE-2030
> URL: https://issues.apache.org/jira/browse/LUCENE-2030
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Affects Versions: 2.9
> Reporter: Simon Willnauer
> Priority: Minor
> Fix For: 3.1
>
> Attachments: LUCENE-2030.patch
>
>
> CachingSpanFilter and CachingWrapperFilter expose their internal cache via a protected member which is lazily instantiated in the getDocSetId method. The current code yields the chance to double instantiate the cache and internally synchronizes on a protected none final member. My first guess is that this member was exposed for testing purposes so it should rather be changed to package private.
> This patch breaks backwards compat while I guess the cleanup is kind of worth breaking it.

--
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 [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene


jira at apache

Nov 4, 2009, 11:32 PM

Post #2 of 2 (157 views)
Permalink
[jira] Commented: (LUCENE-2030) CachingSpanFilter synchronizing on a none final protected object [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773814#action_12773814 ]

Simon Willnauer commented on LUCENE-2030:
-----------------------------------------

Uwe, I'm so glad that you are so keen on stuff like Java serialization! Thanks

> CachingSpanFilter synchronizing on a none final protected object
> ----------------------------------------------------------------
>
> Key: LUCENE-2030
> URL: https://issues.apache.org/jira/browse/LUCENE-2030
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Affects Versions: 2.9
> Reporter: Simon Willnauer
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 3.1
>
> Attachments: LUCENE-2030.patch, LUCENE-2030.patch
>
>
> CachingSpanFilter and CachingWrapperFilter expose their internal cache via a protected member which is lazily instantiated in the getDocSetId method. The current code yields the chance to double instantiate the cache and internally synchronizes on a protected none final member. My first guess is that this member was exposed for testing purposes so it should rather be changed to package private.
> This patch breaks backwards compat while I guess the cleanup is kind of worth breaking it.

--
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 [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.