From: em.lee Date: Tue, 7 Sep 2010 10:49:41 +0000 (+0000) Subject: minor change X-Git-Tag: 3.0.3~636 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/commitdiff_plain/c22a8bdbfa2eecd5cbee759bda8200ca982722d6 minor change --- diff --git a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java index edfb403bea..e26505e1b8 100644 --- a/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java +++ b/cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java @@ -1189,24 +1189,24 @@ public class PesiTaxonExport extends PesiExportBase { private static String getAuthorString(TaxonNameBase taxonName) { String result = null; try { - if (taxonName != null && taxonName != null) { - if (taxonName.isInstanceOf(NonViralName.class)) { - NonViralName nonViralName = CdmBase.deproxy(taxonName, NonViralName.class); - String authorshipCache = nonViralName.getAuthorshipCache(); - - // For a misapplied name without an authorshipCache the authorString should be set to "auct." - if (isMisappliedName(taxonName) && authorshipCache == null) { - // Set authorshipCache to "auct." - result = PesiTransformer.auctString; + if (taxonName != null) { + if (taxonName.isInstanceOf(NonViralName.class)) { + NonViralName nonViralName = CdmBase.deproxy(taxonName, NonViralName.class); + String authorshipCache = nonViralName.getAuthorshipCache(); + + // For a misapplied name without an authorshipCache the authorString should be set to "auct." + if (isMisappliedName(taxonName) && authorshipCache == null) { + // Set authorshipCache to "auct." + result = PesiTransformer.auctString; + } else { + // Return the content of the authorshipCache + result = authorshipCache; + } + } else { - // Return the content of the authorshipCache - result = authorshipCache; + logger.warn("TaxonName is not of instance NonViralName: " + taxonName.getUuid() + " (" + taxonName.getTitleCache() + ")"); } - - } else { - logger.warn("TaxonName is not of instance NonViralName: " + taxonName.getUuid() + " (" + taxonName.getTitleCache() + ")"); } - } } catch (Exception e) { e.printStackTrace(); }