Oliver Heger schrieb:
Hi Oliver,
thanks for responding.
I was already thinking about disabling the mode in the configuration
file, unfortunately that does not work:
Here is my complete
config-file:
<properties fileName="ShopMessageResources.properties"
delimiterParsingDisabled="true"/>
code:
public void testDelimiterDisabled() throws Exception {
Configuration config =
ShopPropertiesConfiguration.getShopConfiguration();
String contents = config.getString("contact.instructions");
String expected = "Hier haben Sie die Möglichkeit, sich mit uns
in Verbindung zu setzen.";
System.out.println(contents); // this brings "Hier haben Sie
die Möglichkeit"
assertNotNull(contents);
assertEquals(expected, contents);
}
ShopPropertiesConfiguration:
private static final String shopConfigName = "shop-config.xml";
private static Configuration configuration;
public static Configuration getShopConfiguration() throws Exception {
if (configuration == null) {
DefaultConfigurationBuilder shopBuilder = new
DefaultConfigurationBuilder(
shopConfigName);
configuration = shopBuilder.getConfiguration();
}
return configuration;
}
}
The only workaround i found now, is using a very rare used unicode as
delimiter before loading configurations
Sabine
Sabine,
setting the delimiter parsing disabled flag on the
DefaultConfigurationBuilder does not affect the loaded configurations,
but only the builder itself. You can disable this mode for the sub
configurations in the configuration definition file for each single
configuration, e.g.:
<properties filename="test.properties" delimiterParsingDisabled="true"/>
HTH
Oliver
--
Sabine Schwanitz
Software Entwicklerin
-------------------------
Aparzev GmbH
Sitz Berlin
Geschäftsführer: Alexander Apartsev
Amtsgericht Charlottenburg, Berlin HR B 90915
Steuernummer 37/244/20791
USt.-Id.-Nr. DE813783738
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]