Properties env = jndiCfg == null ? null : jndiCfg.getEnvironment();
final boolean hasNoEnv = env == null;
if (hasNoEnv) {
env = new Properties();
}
cfg.fillProperties("jndiConfig.environment", env);
if (workPrefix != null) {
cfg.fillProperties(workPrefix + "jndiConfig.environment", env);
}
if (hasNoEnv && !env.isEmpty()) {
if (jndiCfg == null) {