[
https://issues.apache.org/jira/browse/LUCENE-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless resolved LUCENE-1480.
----------------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.4.1)
2.9
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Committed revision 724033. Thanks Shai!
> Wrap messages output with a check of InfoStream != null
> -------------------------------------------------------
>
> Key: LUCENE-1480
> URL: https://issues.apache.org/jira/browse/LUCENE-1480
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Index
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1480-2.patch, LUCENE-1480.patch
>
>
> I've found several places in the code where messages are output w/o first
> checking if infoStream != null. The result is that in most of the time,
> unnecessary strings are created but never output (because infoStream is not
> set). We should follow Java's logging best practices, where a log message is
> always output in the following format:
> if (logger.isLoggable(leve)) {
> logger.log(level, msg);
> }
> Log messages are usually created w/o paying too much attention to performance
> (such as string concatenation using '+' instead of StringBuffer). Therefore,
> at runtime it is important to avoid creating those messages, if they will be
> discarded eventually.
> I will add a method to IndexWriter messagesEnabled() and then use it wherever
> a call to iw.message() is made.
> Patch will follow
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]