Skip to content

Commit

Permalink
use a simpler way
Browse files Browse the repository at this point in the history
  • Loading branch information
WangTaoTheTonic committed May 29, 2015
1 parent 2c053a1 commit 6dd1cf2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,9 @@ Properties loadPropertiesFile() throws IOException {
FileInputStream fd = null;
try {
fd = new FileInputStream(propsFile);
Properties rawProps = new Properties();
rawProps.load(new InputStreamReader(fd, "UTF-8"));
for (String str : rawProps.stringPropertyNames()) {
props.setProperty(str, rawProps.getProperty(str).trim());
props.load(new InputStreamReader(fd, "UTF-8"));
for (Map.Entry<Object, Object> e : props.entrySet()) {
e.setValue(e.getValue().toString().trim());
}
} finally {
if (fd != null) {
Expand Down

0 comments on commit 6dd1cf2

Please sign in to comment.