private static VariableResolver < String > propertiesGeneratingResolver ( final VariableResolver < String > original ) { return new VariableResolver < String > ( ) { public String resolve ( String name ) { final String value = original . resolve ( name ) ; if ( value == null ) return null ; // Substitute one backslash with two return value . replaceAll ( "\\\\" , "\\\\\\\\" ) ; } } ; }
Creates a resolver generating values to be safely placed in properties string .