Remove deprecated method causing issues in OSGi
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jxl / src / main / java / org / argeo / server / jxl / dao / JxlDaoSupport.java
index 79fa2a606efb0d699b9cc0f4a5d46dd11ad43218..76ac7dd55d4f23466536ad57eae8799346ea44e0 100644 (file)
@@ -215,6 +215,8 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements
                                        for (int col = 1; col < currentRow.length; col++) {
                                                subKeys.add(getCellValue(currentRow[col]));
                                        }
+                                       if (log.isTraceEnabled())
+                                               log.trace("   subKeys=" + subKeys);
                                        row++;
                                        String firstColContents = firstColumn[row].getContents();
                                        mapRows: for (; row < firstColumn.length; row++) {
@@ -223,9 +225,9 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements
                                                Object key = firstColContents;
                                                Map<Object, Object> subMap = new HashMap<Object, Object>();
 
-                                               for (int col = 0; col < currentRow.length
-                                                               && col < subKeys.size(); col++) {
-                                                       Object subKey = subKeys.get(col);
+                                               for (int col = 1; col < currentRow.length
+                                                               && col < subKeys.size() + 1; col++) {
+                                                       Object subKey = subKeys.get(col - 1);
                                                        Cell cell = currentRow[col];
                                                        if (log.isTraceEnabled())
                                                                log.trace("   row=" + row
@@ -244,6 +246,7 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements
                                                if (bw.isWritableProperty(firstColContents)
                                                                || firstColContents.trim().equals("")
                                                                || row == firstColumn.length - 1) {
+                                                       log.trace(map);
                                                        bw.setPropertyValue(propertyName, map);
                                                        if (log.isTraceEnabled())
                                                                log.trace(" set map " + propertyName
@@ -329,17 +332,6 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements
                return false;
        }
 
-       /**
-        * @deprecated use
-        *             {@link #overrideCell(Cell, BeanWrapper, String, String, Integer, List)}
-        *             instead. This method is not called anymore.
-        */
-       protected Boolean overrideCell(Cell cell, BeanWrapper bw,
-                       String propertyName, String keyProperty, Integer row,
-                       List<Reference> references, Map<String, List<Object>> tempRefs) {
-               throw new UnsupportedOperationException();
-       }
-
        public void setEncoding(String encoding) {
                this.encoding = encoding;
        }
@@ -348,11 +340,4 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements
                this.locale = locale;
        }
 
-       /** @deprecated use {@link #setResources(List)} instead. */
-       public void setWorkbooks(List<Resource> workbooks) {
-               setResources(workbooks);
-               log.warn("###\n" + "### Use of the 'workbooks' property is deprecated!"
-                               + " It will be removed in one of the next releases."
-                               + " Use the 'resources' property instead." + "\n###");
-       }
 }