Skip to content

Commit

Permalink
Merge pull request #985 from hxy1991/fix_984
Browse files Browse the repository at this point in the history
Fixes #984
  • Loading branch information
hxy1991 authored Apr 1, 2019
2 parents b1790fa + df4f338 commit adcc955
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,17 @@ static public File targetTagFile(String dataId, String group, String tenant, Str

static public String getConfig(String dataId, String group, String tenant)
throws IOException {
FileInputStream fis = null;
File file = targetFile(dataId, group, tenant);
if (file.exists()) {
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
return IOUtils.toString(fis, Constants.ENCODE);
} catch (FileNotFoundException e) {
return StringUtils.EMPTY;
} finally {
IOUtils.closeQuietly(fis);
}
String content = IOUtils.toString(fis, Constants.ENCODE);
return content;
} else {
return StringUtils.EMPTY;
}
Expand Down

0 comments on commit adcc955

Please sign in to comment.