From 31c808cf7ccabe916cd62d9ca15b8c26b41962f0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 30 Mar 2013 12:24:50 -0500 Subject: [PATCH] IDEMPIERE-454 Easy import / fix problem with java7 --- .../src/org/adempiere/impexp/GridTabCSVImporter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java index 92c100ba96..dea57ca07c 100644 --- a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java +++ b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java @@ -219,8 +219,11 @@ public class GridTabCSVImporter implements IGridTabImporter sortedtTabMapIndexes = new TreeMap(bvc); sortedtTabMapIndexes.putAll(tabMapIndexes); }else{ - sortedtTabMapIndexes = new TreeMap(); - sortedtTabMapIndexes.put(gridTab,header.size()-1); + Map localMapIndexes = new HashMap(); + localMapIndexes.put(gridTab, header.size()-1); + ValueComparator bvc = new ValueComparator(localMapIndexes); + sortedtTabMapIndexes = new TreeMap(bvc); + sortedtTabMapIndexes.putAll(localMapIndexes); } CellProcessor[] processors = readProcArray.toArray(new CellProcessor[readProcArray.size()]);