@ -552,7 +552,7 @@ private File getConfigurationFile()
if ( ! ( this . store instanceof XMLConfigurationStore ) )
this . store = new XMLConfigurationStore ( ) ;
}
else if ( configurationFile . exists ( ) )
else
{
String name = configurationFile . getName ( ) ;
int extensionBeginIndex = name . lastIndexOf ( '.' ) ;
@ -583,21 +583,26 @@ else if (configurationFile.exists())
if ( ! ( this . store instanceof PropertyConfigurationStore ) )
this . store = new PropertyConfigurationStore ( ) ;
}
else if ( ! configurationFile . exists ( )
& & ( getSystemProperty ( PNAME_CONFIGURATION_FILE_NAME )
= = null ) )
{
this . configurationFile
= getConfigurationFile ( "properties" , true ) ;
if ( ! ( this . store instanceof PropertyConfigurationStore ) )
this . store = new PropertyConfigurationStore ( ) ;
}
else
{
this . configurationFile = configurationFile ;
this . configurationFile =
configurationFile . exists ( )
? configurationFile
: getConfigurationFile ( "xml" , true ) ;
if ( ! ( this . store instanceof XMLConfigurationStore ) )
this . store = new XMLConfigurationStore ( ) ;
}
}
}
else
{
this . configurationFile
= getConfigurationFile ( "properties" , true ) ;
if ( ! ( this . store instanceof PropertyConfigurationStore ) )
this . store = new PropertyConfigurationStore ( ) ;
}
/ *
* Make sure that the properties SC_HOME_DIR_LOCATION and
@ -914,6 +919,9 @@ public void purgeStoredConfiguration()
configurationFile . delete ( ) ;
configurationFile = null ;
}
if ( store ! = null )
for ( String name : store . getPropertyNames ( ) )
store . removeProperty ( name ) ;
}
/ * *