Skip to content

Commit

Permalink
refactor: Fix char encoding for reading property file.
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Jan 13, 2025
1 parent 3dd1efe commit 106ab13
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.opentripplanner.apis.support.graphql.injectdoc;

import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -142,7 +144,7 @@ private static Map<String, String> loadCustomDocumentationFromPropertiesFile(
throw new OtpAppException("Resource not found: %s", resource);
}
var props = new Properties();
props.load(input);
props.load(new InputStreamReader(input, StandardCharsets.UTF_8));
Map<String, String> map = new HashMap<>();

for (String key : props.stringPropertyNames()) {
Expand Down

0 comments on commit 106ab13

Please sign in to comment.