Skip to content

Commit

Permalink
Revert "Improve previous fix, only load from holders if explicitly to…
Browse files Browse the repository at this point in the history
…ld to in dev environment"

This reverts commit 4cabb31.
  • Loading branch information
graemerocher committed May 6, 2014
1 parent 4cabb31 commit 0290c4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Expand Up @@ -47,12 +47,7 @@ class ConfigurationHelper {
private static final String CONFIG_BINDING_APP_VERSION = "appVersion"

private static Holder<Map<Integer, ConfigObject>> cachedConfigs = new Holder<Map<Integer, ConfigObject>>('cachedConfigs')

public static final int DEV_CACHE_KEY = -1
/**
* Name of the system property used to indicate whether Grails should load the config with the holder
* */
public static final String LOAD_CONFIG_WITH_HOLDER = "grails.load.config.with.holder"

static final List DEFAULT_RESOURCES_PLUGIN_EXCLUDES = ['**/WEB-INF/**', '**/META-INF/**', '**/*.class', '**/*.jar', '**/*.properties', '**/*.groovy', '**/*.gsp', '**/*.java']

Expand Down Expand Up @@ -88,7 +83,7 @@ class ConfigurationHelper {

co = getCachedConfigs().get(cacheKey)
if (co == null) {
co = Boolean.getBoolean(LOAD_CONFIG_WITH_HOLDER) ? Holders.config : null
co = Holders.config
if( co == null ) {
ConfigSlurper configSlurper = getConfigSlurper(environment, application)
try {
Expand Down
Expand Up @@ -331,7 +331,6 @@ class GrailsProjectPackager extends BaseSettingsApi {
ConfigObject createConfig() {
config = Holders.config
if (config == null) {
System.setProperty(ConfigurationHelper.LOAD_CONFIG_WITH_HOLDER, "true")
config = new ConfigObject()
if (configFile.exists()) {
Class configClass = null
Expand Down

0 comments on commit 0290c4b

Please sign in to comment.