if ( configuration == null )
{
configuration = load();
+ configuration = processExpressions( configuration );
}
- configuration = processExpressions( configuration );
-
return configuration;
}
}
}
- configuration = escapeCronExpressions( configuration );
+ // escape all cron expressions to handle ','
+ for ( Iterator i = configuration.getRepositories().iterator(); i.hasNext(); )
+ {
+ RepositoryConfiguration c = (RepositoryConfiguration) i.next();
+ c.setRefreshCronExpression( escapeCronExpression( c.getRefreshCronExpression() ) );
+ }
+
+ if ( configuration.getDatabaseScanning() != null )
+ {
+ configuration.getDatabaseScanning().setCronExpression( escapeCronExpression(
+ configuration.getDatabaseScanning().getCronExpression() ) );
+ }
new ConfigurationRegistryWriter().write( configuration, section );
section.save();
- this.configuration = configuration;
+ this.configuration = processExpressions( configuration );
}
private Registry createDefaultConfigurationFile()
return config;
}
-
- private Configuration escapeCronExpressions( Configuration config )
- {
- for ( Iterator i = config.getRepositories().iterator(); i.hasNext(); )
- {
- RepositoryConfiguration c = (RepositoryConfiguration) i.next();
-
- c.setRefreshCronExpression( escapeCronExpression( c.getRefreshCronExpression() ) );
- }
-
- DatabaseScanningConfiguration databaseScanning = config.getDatabaseScanning();
- if ( databaseScanning != null )
- {
- String cron = databaseScanning.getCronExpression();
- databaseScanning.setCronExpression( escapeCronExpression( cron ) );
- }
-
- return config;
- }
-
}