This is an automated email from the ASF dual-hosted git repository. bchapuis pushed a commit to branch sonar in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 95fb37b34bc6de325ec1b30807d3601c1c392d2f Author: Bertil Chapuis <[email protected]> AuthorDate: Thu Jun 13 20:24:51 2024 +0200 Inline variable --- .../src/main/java/org/apache/baremaps/config/ConfigReader.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/baremaps-core/src/main/java/org/apache/baremaps/config/ConfigReader.java b/baremaps-core/src/main/java/org/apache/baremaps/config/ConfigReader.java index 244a2800..0423e62b 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/config/ConfigReader.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/config/ConfigReader.java @@ -36,11 +36,10 @@ public class ConfigReader { public String read(Path path) throws IOException { var extension = com.google.common.io.Files.getFileExtension(path.toString()); - var config = switch (extension) { + return switch (extension) { case "js" -> eval(path); default -> Files.readString(path); }; - return config; } private String eval(Path path) throws IOException {
