-
Notifications
You must be signed in to change notification settings - Fork 15
Description
In the LuceneConenctor constructor, there is a try/catch, wherein the catch attempts to use the private log4j Logger (named LOG) to log any IOExceptions thrown. The problem is that in Java static member variables are initialized in the order they are declared in the java file and the LuceneConnector's singleton instance initialization precedes the Logger's initialization. This is a simple fix. Simply swap the order of the LuceneConnector and Logger static member variable declarations/initializations so that the Logger is first (lines 58 and 59). Also, it couldn't hurt to catch (and rethrow if you like) all exceptions in the LuceneConnector constructor, as I was chasing down a nasty NullPointerException (related to a configuration problem of my own fault), and for posterity, that might save them some effort debugging.