commit 4e0067c2e1db03ba8743430495970fdb6ac6f824
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Sat Jul 4 14:39:05 2020 +0200

    cleanup

diff --git a/cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ExcelUtils.java b/cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ExcelUtils.java
index ac0dd6645b..a0fdb294d7 100644
--- a/cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ExcelUtils.java
+++ b/cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ExcelUtils.java
@@ -6,7 +6,6 @@
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
-
 package eu.etaxonomy.cdm.common;
 
 import java.io.FileNotFoundException;
@@ -22,7 +21,6 @@ import java.util.Locale;
 import java.util.Map;
 
 import org.apache.log4j.Logger;
-import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDataFormatter;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -33,7 +31,6 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
 /**
  * @author n.hoffmann
  * @since 18.11.2008
- * @version 1.0
  */
 public class ExcelUtils {
 	private static final Logger logger = Logger.getLogger(ExcelUtils.class);
@@ -43,7 +40,6 @@ public class ExcelUtils {
     	return parseXLS(uri, null);
     }
 
-
 	/** Reads all rows of an Excel worksheet */
     public static List<Map<String, String>> parseXLS(URI uri, String worksheetName) throws FileNotFoundException {
         try {
@@ -57,7 +53,6 @@ public class ExcelUtils {
             ioe.printStackTrace();
             throw new RuntimeException(message);
         }
-
     }
 
     /** Reads all rows of an Excel worksheet */
@@ -145,7 +140,6 @@ public class ExcelUtils {
 	    			recordList.add(headers);
 	    		}
     		}
-
     	} catch(Exception ioe) {
     		logger.error("Error reading the Excel file.");
     		ioe.printStackTrace();
@@ -153,22 +147,21 @@ public class ExcelUtils {
     	return recordList;
     }
 
-
 	public static String getCellValue(Cell cell) {
 		try {
-			if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING ){
+			if (cell.getCellType() == Cell.CELL_TYPE_STRING ){
 				return cell.getStringCellValue();
-			}else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK){
+			}else if (cell.getCellType() == Cell.CELL_TYPE_BLANK){
 				return "";
-			}else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC){
+			}else if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC){
 				return getNumericCellValue(cell);
-			}else if (cell.getCellType() == HSSFCell.CELL_TYPE_BOOLEAN){
+			}else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN){
 				Boolean cellValue = cell.getBooleanCellValue();
 				String value = String.valueOf(cellValue);
 				return value;
-			}else if (cell.getCellType() == HSSFCell.CELL_TYPE_ERROR){
+			}else if (cell.getCellType() == Cell.CELL_TYPE_ERROR){
 				return "-error-";
-			}else if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA){
+			}else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA){
 				try {
 					String strValue = cell.getStringCellValue();
 					if ("".equals(strValue)){
@@ -200,18 +193,14 @@ public class ExcelUtils {
 	private static String getExcelColString(int colNr){
 		int first = colNr / 26;
 		int second = colNr % 26;
-//		char a = Integer.valueOf(first).shortValue();
 		String firstStr = String.valueOf((first > 0 ? (char)(first +64) :""));
 		String secondStr = String.valueOf((char)(second + 64));
 		return firstStr +  secondStr;
 	}
 
-
 	/**
 	 * Returns the numeric cell value. In case the cell is formatted as
 	 * a date it returns a date (using the dates toString() method.
-	 * @param cell
-	 * @return
 	 */
 	private static String getNumericCellValue(Cell cell) {
 		Double number = cell.getNumericCellValue();
@@ -233,7 +222,6 @@ public class ExcelUtils {
 
 			return result;
 		}
-//		System.out.println(d);
 
 		if (number.intValue() == number){
 			return String.valueOf(number.intValue());
@@ -242,12 +230,8 @@ public class ExcelUtils {
 		}
 	}
 
-
 	/**
 	 * Returns false, if row is null or has no values
-	 * @param row
-	 * @param notEmpty
-	 * @return
 	 */
 	private static boolean checkIsEmptyRow(Row row) {
 		if (row == null){
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmApplicationAwareDefaultImport.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmApplicationAwareDefaultImport.java
index f5f0260b06..fe797c3770 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmApplicationAwareDefaultImport.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmApplicationAwareDefaultImport.java
@@ -70,7 +70,7 @@ public class CdmApplicationAwareDefaultImport<T extends IImportConfigurator> imp
     public ImportResult invoke(IImportConfigurator config){
         ImportResult result = new ImportResult();
         if (config.getCheck().equals(IImportConfigurator.CHECK.CHECK_ONLY)){
-            boolean success =  doCheck(config);
+            boolean success = doCheck(config);
             if (! success){
                 result.setAborted();
             }
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportConfiguratorBase.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportConfiguratorBase.java
index 8c17bfc4d5..c7fa7cf163 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportConfiguratorBase.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportConfiguratorBase.java
@@ -97,10 +97,8 @@ public abstract class ImportConfiguratorBase<STATE extends ImportStateBase, SOUR
 /* *****************CONSTRUCTOR *****************************/
 
 	protected ImportConfiguratorBase(IInputTransformer transformer){
-		super();
 		setDbSchemaValidation(DbSchemaValidation.VALIDATE);
 		this.transformer = transformer;
-
 	}
 
 	abstract protected void makeIoClassList();
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IoStateBase.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IoStateBase.java
index 07526eb809..c935b371a1 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IoStateBase.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/IoStateBase.java
@@ -18,7 +18,8 @@ import eu.etaxonomy.cdm.common.IoResultBase;
  * @author a.mueller
  * @since 11.05.2009
  */
-public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICdmIO, RESULT extends IoResultBase> {
+public abstract class IoStateBase<CONFIG
+        extends IIoConfigurator, IO extends ICdmIO, RESULT extends IoResultBase> {
 
 	@SuppressWarnings("unused")
 	private static final Logger logger = Logger.getLogger(IoStateBase.class);
@@ -29,8 +30,6 @@ public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICd
 
 	private RESULT result;
 
-
-
     //TODO config not necessary ones it it implemented in constructor for IOs too.
 	public void initialize(CONFIG config){
 	    this.config = config;
@@ -50,7 +49,6 @@ public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICd
 		return currentIO;
 	}
 
-
     public RESULT getResult() {
         return result;
     }
@@ -58,14 +56,10 @@ public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICd
         this.result = result;
     }
 
-
 //    public IProgressMonitor getCurrentMonitor() {
 //        return currentMonitor;
 //    }
 //    public void setCurrentMonitor(IProgressMonitor currentMonitor) {
 //        this.currentMonitor = currentMonitor;
 //    }
-
-
-
 }
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/distribution/excelupdate/ExcelDistributionUpdate.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/distribution/excelupdate/ExcelDistributionUpdate.java
index d570d090ac..a62ca8c8e3 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/distribution/excelupdate/ExcelDistributionUpdate.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/distribution/excelupdate/ExcelDistributionUpdate.java
@@ -322,7 +322,7 @@ public class ExcelDistributionUpdate
         return false;
     }
     @Override
-    protected boolean needsNomenclaturalCode() {
+    protected boolean requiresNomenclaturalCode() {
         return false;
     }
 
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelImportBase.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelImportBase.java
index 4410bc5549..db67e4773d 100755
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelImportBase.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelImportBase.java
@@ -65,7 +65,7 @@ public abstract class ExcelImportBase<STATE extends ExcelImportState<CONFIG, ROW
     	configurator = state.getConfig();
 
 		NomenclaturalCode nc = getConfigurator().getNomenclaturalCode();
-		if (nc == null && needsNomenclaturalCode()) {
+		if (nc == null && requiresNomenclaturalCode()) {
 			logger.error("Nomenclatural code could not be determined. Skip invoke.");
 			state.setUnsuccessfull();
 			return;
@@ -74,8 +74,10 @@ public abstract class ExcelImportBase<STATE extends ExcelImportState<CONFIG, ROW
 
 		byte[] data = null;
 		// read and save all rows of the excel worksheet
-		if ((state.getConfig() instanceof NormalExplicitImportConfigurator || state.getConfig() instanceof ExcelDistributionUpdateConfigurator || state.getConfig() instanceof TaxonListImportConfigurator) &&
-		        (state.getConfig().getStream() != null || state.getConfig().getStream() != null)){
+		if ((state.getConfig() instanceof NormalExplicitImportConfigurator
+		        || state.getConfig() instanceof ExcelDistributionUpdateConfigurator
+		        || state.getConfig() instanceof TaxonListImportConfigurator) && (state.getConfig().getStream() != null
+		        || state.getConfig().getStream() != null)){
 		    data =  state.getConfig().getStream();
 		} else{
 		    source = state.getConfig().getSource();
@@ -107,7 +109,7 @@ public abstract class ExcelImportBase<STATE extends ExcelImportState<CONFIG, ROW
     	return;
 	}
 
-	protected boolean needsNomenclaturalCode() {
+	protected boolean requiresNomenclaturalCode() {
 		return true;
 	}
 
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/ExtensionTypeExcelImport.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/ExtensionTypeExcelImport.java
index 47dc3f64cd..252ff670b3 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/ExtensionTypeExcelImport.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/ExtensionTypeExcelImport.java
@@ -142,7 +142,7 @@ public class ExtensionTypeExcelImport
 	}
 
 	@Override
-	protected boolean needsNomenclaturalCode() {
+	protected boolean requiresNomenclaturalCode() {
 		return false;
 	}
 
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/NamedAreaLevelExcelImport.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/NamedAreaLevelExcelImport.java
index 3c98829266..dbab9484ea 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/NamedAreaLevelExcelImport.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/NamedAreaLevelExcelImport.java
@@ -157,7 +157,7 @@ public class NamedAreaLevelExcelImport
 	}
 
 	@Override
-	protected boolean needsNomenclaturalCode() {
+	protected boolean requiresNomenclaturalCode() {
 		return false;
 	}
 
diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/SpecimenCdmExcelImport.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/SpecimenCdmExcelImport.java
index 8264d8414d..ec0f737af5 100644
--- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/SpecimenCdmExcelImport.java
+++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/SpecimenCdmExcelImport.java
@@ -939,7 +939,7 @@ public class SpecimenCdmExcelImport
 	}
 
 	@Override
-	protected boolean needsNomenclaturalCode() {
+	protected boolean requiresNomenclaturalCode() {
 		return false;
 	}
 
