You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static variable
private static SimpleNamingContextBuilder activated;
Is never set in the else clause in following method.
public static SimpleNamingContextBuilder emptyActivatedContextBuilder() throws NamingException {
if (activated != null) {
// clear already activated context builder
activated.clear();
return activated;
}
else {
// create and activate new context builder
SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
builder.activate();
return builder;
}
}
This will eventually result in a "java.lang.IllegalStateException: InitialContextFactoryBuilder already set" exception when serveral tests are run within the same JVM.