Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangel.avila22019-03-07 12:03:50 -0500
committerangel.avila22019-03-11 13:04:08 -0400
commita6b643d2bb56fe0e37533778ef8a58b2e794417d (patch)
tree4c0002abd8b5b3563e862881088eb0a651cd89d9
parent8863539d48e476d754b767987afeeda58218ecd3 (diff)
downloadorg.eclipse.osee-lambda_fix.tar.gz
org.eclipse.osee-lambda_fix.tar.xz
org.eclipse.osee-lambda_fix.zip
use while looplambda_fix
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java34
1 files changed, 20 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
index 9dda826a37..9e92232abc 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
@@ -18,10 +18,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.disposition.model.Discrepancy;
@@ -293,12 +293,15 @@ public class ExportSet {
Object[] row = new String[CoverageLevel.values().length + 1];
row[0] = "All Coverage Methods";
+ int index = 1;
// send correct numbers according to level for second param
- final AtomicInteger indexForLambda = new AtomicInteger(1);
- levelsInSet.forEach(level -> {
- row[indexForLambda.getAndIncrement()] = getPercent(levelToCoveredTotalCount.get(level).getValue(),
- levelToTotalCount.get(level).getValue(), false);
- });
+ Iterator<CoverageLevel> iterator = levelsInSet.iterator();
+ while (iterator.hasNext()) {
+ CoverageLevel lvl = iterator.next();
+ row[index++] =
+ getPercent(levelToCoveredTotalCount.get(lvl).getValue(), levelToTotalCount.get(lvl).getValue(), false);
+ }
+
sheetWriter.writeRow(row);
// Try to get Resolution from Level A if available, otherwise get from C
@@ -312,14 +315,17 @@ public class ExportSet {
}
for (String resolution : resolutionTypes) {
- AtomicInteger index1 = new AtomicInteger(0);
- row[index1.getAndIncrement()] = resolutionsValueToText.containsKey(resolution) ? resolutionsValueToText.get(
+ int index1 = 0;
+ row[index1++] = resolutionsValueToText.containsKey(resolution) ? resolutionsValueToText.get(
resolution) : "Resolution not in Config--" + resolution;
- levelsInSet.forEach(level -> {
- row[index1.getAndIncrement()] =
- getPercent(levelToResolutionTypesToCount.get(level).get(resolution).getValue(),
- levelToTotalCount.get(level).getValue(), false);
- });
+
+ Iterator<CoverageLevel> it = levelsInSet.iterator();
+ while (it.hasNext()) {
+ CoverageLevel lvl = it.next();
+ row[index1++] = getPercent(levelToResolutionTypesToCount.get(lvl).get(resolution).getValue(),
+ levelToTotalCount.get(lvl).getValue(), false);
+ }
+
sheetWriter.writeRow(row);
}
@@ -339,7 +345,7 @@ public class ExportSet {
units = leveltoUnitToCovered.get(CoverageLevel.C).keySet();
}
- int index = 0;
+ index = 0;
for (String unit : units) {
index = 0;
row2[index++] = unit;

Back to the top