From bc8b073a6f7824ef93260b37ab8839263bf49371 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 30 May 2023 21:49:36 -0400 Subject: [PATCH] refactoring? --- .../src/main/java/com/rusefi/pinout/PinoutLogic.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java b/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java index ddea5d2805..435c543ed0 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java @@ -134,19 +134,19 @@ public class PinoutLogic { } @SuppressWarnings("unchecked") - private void readMetaInfo(String yamlName, Reader reader) { + private void readMetaInfo(File yamlFile, Reader reader) { Yaml yaml = new Yaml(); Map yamlData = yaml.load(reader); if (yamlData == null) { - SystemOut.println("Null yaml for " + yamlName); + SystemOut.println("Null yaml for " + yamlFile); return; } List> data = (List>) yamlData.get("pins"); if (data == null) { - SystemOut.println("Null yaml for " + yamlName); + SystemOut.println("Null yaml for " + yamlFile); return; } - log.info("Got from " + yamlName + ": " + data); + log.info("Got from " + yamlFile + ": " + data); Objects.requireNonNull(data, "data"); for (Map pin : data) { Object pinId = pin.get("id"); @@ -227,7 +227,7 @@ public class PinoutLogic { private void readFiles() throws IOException { for (File yamlFile : boardInputs.getBoardYamlKeys()) { header.append("// auto-generated by PinoutLogic.java based on " + yamlFile + "\n"); - readMetaInfo(yamlFile.toString(), boardInputs.getReader(yamlFile)); + readMetaInfo(yamlFile, boardInputs.getReader(yamlFile)); } log.info("Got from " + boardInputs.getBoardYamlKeys().size() + " file(s): " + this); }