[PATCH 2 of 5] AttributeWriter: Even better variable name

Wald Commits scm-commit at wald.intevation.org
Wed Sep 4 08:06:19 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1378197218 -7200
# Node ID d2bf655bd2787376474289cddc50dccc469059f9
# Parent  67e01d9c051918f0f4b1d97dc729137d2fe1d6d3
AttributeWriter: Even better variable name.

diff -r 67e01d9c0519 -r d2bf655bd278 artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Tue Sep 03 10:31:26 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Tue Sep 03 10:33:38 2013 +0200
@@ -260,20 +260,20 @@
         // Preparations to be able to detect gaps.
         Map<Integer, ManagedFacet> mfmap =
             new HashMap<Integer, ManagedFacet>();
-        int numFacets = 0;
+        int maxPosition = 0;
         for (ManagedFacet mf: currentFacets) {
             int pos = mf.getPosition();
             mfmap.put(Integer.valueOf(pos), mf);
-            if (pos > numFacets) numFacets = pos;
+            if (pos > maxPosition) maxPosition = pos;
         }
 
         // TODO issue1458: debug what happens
 
         // Finally do gap correction
         // (note that posistions start at 1, not at zero).
-        if (numFacets != currentFacets.size()) {
+        if (maxPosition != currentFacets.size()) {
             int gap = 0;
-            for (int i = 1; i <= numFacets; i++) {
+            for (int i = 1; i <= maxPosition; i++) {
                 ManagedFacet mf = mfmap.get(Integer.valueOf(i));
                 if (mf == null) {
                     gap++;


More information about the Dive4elements-commits mailing list