[ 
https://issues.apache.org/jira/browse/SOLR-11980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859598#comment-16859598
 ] 

Lucene/Solr QA commented on SOLR-11980:
---------------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:red}-1{color} | {color:red} patch {color} | {color:red}  0m  6s{color} 
| {color:red} SOLR-11980 does not apply to master. Rebase required? Wrong 
Branch? See 
https://wiki.apache.org/solr/HowToContribute#Creating_the_patch_file for help. 
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | SOLR-11980 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12910656/SOLR-11980.patch |
| Console output | 
https://builds.apache.org/job/PreCommit-SOLR-Build/415/console |
| Powered by | Apache Yetus 0.7.0   http://yetus.apache.org |


This message was automatically generated.



> SolrCore should not lock over non-final member variable, add final to more 
> vars
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-11980
>                 URL: https://issues.apache.org/jira/browse/SOLR-11980
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Michael Braun
>            Priority: Minor
>         Attachments: SOLR-11980.patch
>
>
> [https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/SolrCore.java#L329]
>  : 
> Example:
> {code:java}
> public String getIndexDir() {
> synchronized (searcherLock) {
>   if (_searcher == null) return getNewIndexDir();
>   SolrIndexSearcher searcher = _searcher.get();
>   return searcher.getPath() == null ? dataDir + "index/" : searcher
>   .getPath();
>   }
> }
> {code}
> Instance members that are locked over should be final. In this case, the 
> field is searcherLock. 
> This patch not only covers searcherLock but other private variables that can 
> easily be final.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to