directory-fortress mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn McKinney <>
Subject Re: Static Config Initialization Problems
Date Mon, 18 Apr 2016 12:49:06 GMT

> On Apr 18, 2016, at 7:07 AM, Chris Pike <> wrote:
> Here is the how the config class would be changed.

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.


View raw message