ref #9916: avoid NPE
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / e4 / BulkEditorTooltip.java
index 67451205ccd802ff131e9c53ca615288cc3d983b..8d80f3501f938148a2d34ed0ee2cc32cf9bd814c 100644 (file)
@@ -57,10 +57,14 @@ public class BulkEditorTooltip extends DefaultToolTip {
         }
         int colIndex = this.natTable.getColumnIndexByPosition(col);
         int rowIndex = this.natTable.getRowIndexByPosition(row);
-        if(rowIndex==0){
+        if(row==0){
             return colHeaderDataProvider.getDataValue(colIndex, rowIndex).toString();
         }
-        return ""; //$NON-NLS-1$
+        Object dataValue = natTable.getCellByPosition(col, row).getDataValue();
+        if (dataValue == null){
+               return null;
+        }
+        return natTable.getCellByPosition(col, row).getDataValue().toString();
     }
 
     @Override
@@ -81,10 +85,10 @@ public class BulkEditorTooltip extends DefaultToolTip {
         }
 
         int rowIndex = this.natTable.getRowIndexByPosition(row);
-        if(rowIndex==0 && col>0){
-            return true;
+        if(row ==0 || col == 0){
+            return false;
         }
-        return false;
+        return true;
     }
 
 }