@Test public void testReadFromInputFileMergeTagsFalse() { val functionInputFileName = "config/functions-mergeTags-false-test.txt"; List<MetricFunctionsSpec> metricFunctionsSpecList = MetricFunctionsReader .readFromInputFile(ClassLoader.getSystemResource(functionInputFileName).getPath()); assertEquals(1, metricFunctionsSpecList.size()); MetricFunctionsSpec metricFunctionsSpec = metricFunctionsSpecList.get(0); assertEquals(false, metricFunctionsSpec.getMergeTags()); }
public static List<MetricFunctionsSpec> readFromInputFile(String InputFilename) { List<MetricFunctionsSpec> metricFunctionSpecList = new ArrayList<>(); try { InputStream inputStream = new FileInputStream(InputFilename); InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader bufferedReader = new BufferedReader(streamReader); String metricFunctionSpecString; while ((metricFunctionSpecString = bufferedReader.readLine()) != null) { ObjectMapper objectMapper = new ObjectMapper(); metricFunctionSpecList.add(objectMapper.readValue(metricFunctionSpecString, MetricFunctionsSpec.class)); } bufferedReader.close(); } catch (Exception e) { log.error("Exception while reading input functions definition", e); } return metricFunctionSpecList; }
MetricFunctionsReader { public static List<MetricFunctionsSpec> readFromInputFile(String InputFilename) { List<MetricFunctionsSpec> metricFunctionSpecList = new ArrayList<>(); try { InputStream inputStream = new FileInputStream(InputFilename); InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader bufferedReader = new BufferedReader(streamReader); String metricFunctionSpecString; while ((metricFunctionSpecString = bufferedReader.readLine()) != null) { ObjectMapper objectMapper = new ObjectMapper(); metricFunctionSpecList.add(objectMapper.readValue(metricFunctionSpecString, MetricFunctionsSpec.class)); } bufferedReader.close(); } catch (Exception e) { log.error("Exception while reading input functions definition", e); } return metricFunctionSpecList; } }
MetricFunctionsReader { public static List<MetricFunctionsSpec> readFromInputFile(String InputFilename) { List<MetricFunctionsSpec> metricFunctionSpecList = new ArrayList<>(); try { InputStream inputStream = new FileInputStream(InputFilename); InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader bufferedReader = new BufferedReader(streamReader); String metricFunctionSpecString; while ((metricFunctionSpecString = bufferedReader.readLine()) != null) { ObjectMapper objectMapper = new ObjectMapper(); metricFunctionSpecList.add(objectMapper.readValue(metricFunctionSpecString, MetricFunctionsSpec.class)); } bufferedReader.close(); } catch (Exception e) { log.error("Exception while reading input functions definition", e); } return metricFunctionSpecList; }  }
MetricFunctionsReader { public static List<MetricFunctionsSpec> readFromInputFile(String InputFilename) { List<MetricFunctionsSpec> metricFunctionSpecList = new ArrayList<>(); try { InputStream inputStream = new FileInputStream(InputFilename); InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader bufferedReader = new BufferedReader(streamReader); String metricFunctionSpecString; while ((metricFunctionSpecString = bufferedReader.readLine()) != null) { ObjectMapper objectMapper = new ObjectMapper(); metricFunctionSpecList.add(objectMapper.readValue(metricFunctionSpecString, MetricFunctionsSpec.class)); } bufferedReader.close(); } catch (Exception e) { log.error("Exception while reading input functions definition", e); } return metricFunctionSpecList; }  static List<MetricFunctionsSpec> readFromInputFile(String InputFilename); }
MetricFunctionsReader { public static List<MetricFunctionsSpec> readFromInputFile(String InputFilename) { List<MetricFunctionsSpec> metricFunctionSpecList = new ArrayList<>(); try { InputStream inputStream = new FileInputStream(InputFilename); InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); BufferedReader bufferedReader = new BufferedReader(streamReader); String metricFunctionSpecString; while ((metricFunctionSpecString = bufferedReader.readLine()) != null) { ObjectMapper objectMapper = new ObjectMapper(); metricFunctionSpecList.add(objectMapper.readValue(metricFunctionSpecString, MetricFunctionsSpec.class)); } bufferedReader.close(); } catch (Exception e) { log.error("Exception while reading input functions definition", e); } return metricFunctionSpecList; }  static List<MetricFunctionsSpec> readFromInputFile(String InputFilename);  }