Ok, I'll work on my branch and get the tests working. What do you mean by wrap 
Config.getInstance() with CONFIG?



----- Original Message -----
From: "Shawn McKinney" <[email protected]>
To: [email protected]
Sent: Monday, April 18, 2016 8:49:06 AM
Subject: Re: Static Config Initialization Problems

> On Apr 18, 2016, at 7:07 AM, Chris Pike <[email protected]> wrote:
> 
> Here is the how the config class would be changed.
> 
> https://github.com/PennState/directory-fortress-core-1/blob/feature/modifyBootstrapSingleton/src/main/java/org/apache/directory/fortress/core/util/Config.java#L75

Looks simple enough.  

Before you said:
"In most cases, I think we can simply remove the static variable and put a 
method call to Confg.getInstance().getProperty into the method. In the case of 
other static blocks like ApacheDsDataProvider, they will probably have to be 
modified to have the same new singleton pattern as Config. There is a ripple 
effect through the code if we take this approach, so wanted to get everyone's 
buy in before I make all the changes."

The ripple effect is what concerns me.  I’d say apply the change down in your 
branch, get the junit tests working, and then we'll know.  To keep the code 
readable, wrap Config.getInstance() with CONFIG or some such thing because that 
reference will be in about 140 locations.

Shawn

Reply via email to