diff options
author | 2021-05-21 21:20:02 +0530 | |
---|---|---|
committer | 2021-05-31 11:45:04 +0530 | |
commit | ee67930973552a69830c30e6b3b1915091af8ebb (patch) | |
tree | a90b90d12815c47f2201ea583161d3816189b34c /components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java | |
parent | 3424dd5d1a261fda473ef46666a316c7f32e3de3 (diff) |
Code cleanup
Issue-ID: DCAEGEN2-2504
Signed-off-by: denilson.l65 <denilson.l65@wipro.com>
Change-Id: Ife119bb0e084a5ef0e3199a70523876c4e258f67
Diffstat (limited to 'components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java')
-rw-r--r-- | components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java index 52670d53..74c48d97 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,6 @@ public class AverageCalculator { log.debug("find average for samples {}", samples); int numOfSamples = samples.size(); List<MeasurementObject> result = new ArrayList<>(); - if(!samples.isEmpty()) { for(List<MeasurementObject> sample : samples) { for(MeasurementObject cellMeasObj : sample) { int index = MeasurementObject.findIndex(cellMeasObj.getMeasurementObjectId(), result); @@ -65,7 +64,6 @@ public class AverageCalculator { } } } - } return findAvg(result, numOfSamples); } @@ -95,5 +93,5 @@ public class AverageCalculator { } return result; } -} +} |