Skip to content

Commit d00e9c1

Browse files
authored
Merge pull request #691 from chenwusi2012/issue_681_fix_LC24
Issue 681 fix lc24
2 parents 6f72cb2 + f3da0c6 commit d00e9c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/github/javafaker/service/FakeValues.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.yaml.snakeyaml.Yaml;
44

5+
import java.io.IOException;
56
import java.io.InputStream;
67
import java.util.Arrays;
78
import java.util.List;
@@ -75,6 +76,11 @@ private Map loadValues() {
7576
if (localeBased == null) {
7677
localeBased = (Map) valuesMap.get(filename);
7778
}
79+
try {
80+
stream.close();
81+
} catch (IOException ex){
82+
return null;
83+
}
7884
return (Map) localeBased.get("faker");
7985
}
8086

0 commit comments

Comments
 (0)