cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 24 Apr 2020 08:59:56 +0000 (10:59 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 24 Apr 2020 08:59:56 +0000 (10:59 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java

index e8125dd977917fc843c37b281a6ba6b61130bc7e..e735d9c2272fc24da82136fc2fd9bf394819ed48 100644 (file)
@@ -31,7 +31,6 @@ import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeWizardPage;
  *
  * @author n.hoffmann
  * @created Sep 15, 2009
- * @version 1.0
  */
 public class NewTaxonNodeWizard extends AbstractNewEntityWizard<TaxonNode>{
 
@@ -52,12 +51,10 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<TaxonNode>{
         setWindowTitle(Messages.TaxonNodeWizardPage_new);
     }
 
-
     @Override
     public void addPages() {
         taxonNodePage = new TaxonNodeWizardPage(formFactory, getConversationHolder(), getEntity(), wizardPageListener, true);
         addPage(taxonNodePage);
-
     }
 
     @Override
index dc10766b7e7d16c66d1b2c39abe32e4d2df18cc1..f4e7849f97ba8b29d0f88cf3fc5416b509b78a4d 100644 (file)
@@ -28,18 +28,16 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class ParseHandler{
 
-       private TaxonName taxonName;
-
        private class MatchMatrix {
                List<TaxonName> duplicateNames = new ArrayList<>();
 
                List<INomenclaturalReference> duplicateReferences = new ArrayList<>();
                List<INomenclaturalReference> duplicateInReferences = new ArrayList<>();
 
-               List<TeamOrPersonBase> duplicateCombinationAuthorships = new ArrayList<>();
-               List<TeamOrPersonBase> duplicateExCombinationAuthorships = new ArrayList<>();
-               List<TeamOrPersonBase> duplicateBasionymAuthorships = new ArrayList<>();
-               List<TeamOrPersonBase> duplicateExBasionymAuthorships = new ArrayList<>();
+               List<TeamOrPersonBase<?>> duplicateCombinationAuthorships = new ArrayList<>();
+               List<TeamOrPersonBase<?>> duplicateExCombinationAuthorships = new ArrayList<>();
+               List<TeamOrPersonBase<?>> duplicateBasionymAuthorships = new ArrayList<>();
+               List<TeamOrPersonBase<?>> duplicateExBasionymAuthorships = new ArrayList<>();
        }
 
        private static NonViralNameParserImpl nonViralNameParser = NonViralNameParserImpl.NewInstance();
@@ -53,9 +51,6 @@ public class ParseHandler{
 
        /**
         * Creates a new instance
-        *
-        * @param textWidget
-        * @param name
         */
        private ParseHandler(TaxonName name){
                if(name == null){
@@ -78,7 +73,7 @@ public class ParseHandler{
        }
 
        /**
-        * Parses a given string and returns a <code>TaxonNameBase</code> instance with the
+        * Parses a given string and returns a <code>TaxonName</code> instance with the
         * results of the parsing.
         *
         * This method should be used to quickly create a new name from a string.
@@ -107,7 +102,7 @@ public class ParseHandler{
        }
 
        /**
-        * Creates an empty <code>TaxonNameBase</code> instance with the nomenclatural code
+        * Creates an empty <code>TaxonName</code> instance with the nomenclatural code
         * currently set in preferences.
         *
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
@@ -306,9 +301,7 @@ public class ParseHandler{
             return new ArrayList<INomenclaturalReference>();
         }
                try{
-
                        return CdmStore.getCommonService().findMatching(nomenclaturalReference, MatchStrategy.Reference);
-
                }catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), "Error finding matching references", e);
                }
@@ -319,14 +312,12 @@ public class ParseHandler{
         * @param authorTeam    The TeamOrPersonBase to find matches for.
         * @return      A <code>List</code> of possibly matching TeamOrPersonBase's.
         */
-       private List<TeamOrPersonBase> findMatchingAuthors(TeamOrPersonBase authorTeam) {
+       private List<TeamOrPersonBase<?>> findMatchingAuthors(TeamOrPersonBase<?> authorTeam) {
 
                if(authorTeam == null){
-                       return new ArrayList<TeamOrPersonBase>();
+                       return new ArrayList<>();
                }
-
                try{
-
                        return CdmStore.getCommonService().findMatching(authorTeam, MatchStrategy.TeamOrPerson);
 
                }catch (MatchException e) {
@@ -340,12 +331,8 @@ public class ParseHandler{
         * @return      A <code>List</code> of possibly matching TaxonNameBase's.
         */
        private List<TaxonName> findMatchingLatinNames(ITaxonNameBase taxonName) {
-
                try {
-
                        return CdmStore.getCommonService().findMatching(TaxonName.castAndDeproxy(taxonName), MatchStrategy.NonViralName);
-
-
                } catch (MatchException e) {
                        MessagingUtils.error(this.getClass(), "Error finding matching names", e);
                }