The best way to avoid such problems is to create software properties and then store them. For example, using this code:
java.util.Properties props = new java.util.Properties(); props.setProperty("table.whereclause", "where id=100"); props.store(System.out, null);
This will be output to System.out from a properly shielded version.
In my case, the output was:
#Mon Aug 12 13:50:56 EEST 2013 table.whereclause=where id\=100
As you can see, this is an easy way to generate the contents of .properties files that guarantee correctness. And you can add as many properties as you want.
mvmn Aug 12 '13 at 10:52 2013-08-12 10:52
source share