File tree Expand file tree Collapse file tree
src/main/java/de/rwth/idsg/steve/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package de .rwth .idsg .steve .utils ;
22
33import com .google .common .base .Strings ;
4+ import lombok .extern .log4j .Log4j2 ;
45
56import java .io .FileNotFoundException ;
67import java .io .InputStream ;
1213 * @author Sevket Goekay <goekay@dbis.rwth-aachen.de>
1314 * @since 01.10.2015
1415 */
16+ @ Log4j2
1517public class PropertiesFileLoader {
1618
1719 private Properties prop ;
@@ -43,7 +45,12 @@ public String getString(String key) {
4345 throw new IllegalArgumentException ("The property '" + key + "' has no value set" );
4446 }
4547
46- return s ;
48+ String trimmed = s .trim ();
49+ if (!trimmed .equals (s )) {
50+ log .warn ("The property '{}' has leading or trailing spaces which were removed!" , key );
51+ }
52+
53+ return trimmed ;
4754 }
4855
4956 public boolean getBoolean (String key ) {
You can’t perform that action at this time.
0 commit comments