Skip to content

Commit

Permalink
Fixes alibaba#984
Browse files Browse the repository at this point in the history
  • Loading branch information
hxy1991 committed Apr 1, 2019
1 parent b1790fa commit df4f338
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 df4f338

Please sign in to comment.