Commits

Scott Farquhar committed 246b04d

Fix stupid IDEA again. Removed Serializable from interface

Comments (0)

Files changed (1)

src/main/java/com/atlassian/lucene/stats/TwoDimensionalStatsMap.java

 
 import com.atlassian.lucene.stats.util.EasyList;
 
-import java.io.Serializable;
 import java.util.*;
 
 public class TwoDimensionalStatsMap
      * @param xAxis identifies the column who's total is requested, null is valid.
      * @return number of unique issues for the identified column.
      */
-    public int getXAxisUniqueTotal(Serializable xAxis)
+    public int getXAxisUniqueTotal(Object xAxis)
     {
         Number xTotal = xAxisTotals.get(xAxis);
         return xTotal != null ? xTotal.intValue() : 0;
         xAxisValues = transformAndRemoveInvalid(xAxisValues, xAxisMapper);
         yAxisValues = transformAndRemoveInvalid(yAxisValues, yAxisMapper);
 
-        for (Object xvalue : xAxisValues) {
-            addToXTotal(xvalue, value);
-            for (Iterator iterator1 = yAxisValues.iterator(); iterator1.hasNext();) {
-                Object yvalue = iterator1.next();
-                addValue(xvalue, yvalue, value);
+        for (Object xValue : xAxisValues) {
+            addToXTotal(xValue, value);
+            for (Object yValue : yAxisValues) {
+                addValue(xValue, yValue, value);
 
             }
         }
         // We have to iterate over the y values alone so we don't mess up the totals
-        for (Object yvalue : yAxisValues) {
-            addToYTotal(yvalue, value);
+        for (Object yValue : yAxisValues) {
+            addToYTotal(yValue, value);
         }
 
         // Always log one hit per unique issue.
 
     /**
      * Transform values in the collection from Strings to Objects,
-     * using {@link com.atlassian.jira.issue.search.LuceneFieldSorter#getValueFromLuceneField(String)}
+     * using {@link LuceneFieldSorter#getValueFromLuceneField(String)}
      *
      * @param values A Collection of Strings, obtained from the Lucene Index
      * @param mapper A statsMapper used to convert to objects
     private static Collection transformAndRemoveInvalid(Collection values, StatisticsMapper mapper)
     {
         Collection output = new ArrayList();
-        for (Iterator iterator = values.iterator(); iterator.hasNext();)
-        {
-            String key = (String) iterator.next();
+        for (Object value1 : values) {
+            String key = (String) value1;
             final Object value;
-            if (key != null)
-            {
+            if (key != null) {
                 value = mapper.getValueFromLuceneField(key);
-            }
-            else
-            {
+            } else {
                 value = null;
             }
 
             //only valid values should be added to the map
-            if (mapper.isValidValue(value))
-            {
+            if (mapper.isValidValue(value)) {
                 output.add(value);
             }
         }