Skip to content

Commit

Permalink
fix problem
Browse files Browse the repository at this point in the history
  • Loading branch information
whp98 committed Aug 7, 2023
1 parent 1c27cfe commit a5626b1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public String[] getFileExtensions() {
* @throws IOException if the source cannot be loaded
*/
public List<PropertySource<?>> load(String name, Resource resource) throws IOException {
if (!resource.exists() || !resource.getFile().exists()) {
if (!resource.exists()) {
return emptyList();
}
TomlParseResult parseResult = Toml.parse(resource.getFile().toPath());
TomlParseResult parseResult = Toml.parse(resource.getInputStream());
parseResult.errors().forEach(error -> System.err.println(error.toString()));
Map<String, Object> source = parseResult.toMap();
if (source.isEmpty()) {
Expand Down

0 comments on commit a5626b1

Please sign in to comment.