File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
matching-ws/src/main/java/life/catalogue/matching/service Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -863,22 +863,18 @@ protected static Document toDoc(NameUsage nameUsage) {
863
863
864
864
Optional <String > optCanonical = Optional .empty ();
865
865
ParsedName pn = null ;
866
-
866
+ NomCode nomCode = null ;
867
867
try {
868
- NomCode nomCode = null ;
869
868
if (!StringUtils .isEmpty (nameUsage .getNomenclaturalCode ())) {
870
869
nomCode = NomCode .valueOf (nameUsage .getNomenclaturalCode ());
871
870
}
872
- ParsedName pn = NameParsers .INSTANCE .parse (nameUsage .getScientificName (), rank , nomCode );
871
+ pn = NameParsers .INSTANCE .parse (nameUsage .getScientificName (), rank , nomCode );
873
872
// canonicalMinimal will construct the name without the hybrid marker and authorship
874
873
String canonical = NameFormatter .canonicalMinimal (pn );
875
874
optCanonical = Optional .ofNullable (canonical );
876
875
} catch (UnparsableNameException | InterruptedException e ) {
877
876
// do nothing
878
877
log .debug ("Unable to parse name to create canonical: {}" , nameUsage .getScientificName ());
879
- } catch ( JsonProcessingException e ) {
880
- // do nothing
881
- log .debug ("Unable to parse name to create canonical: {}" , nameUsage .getScientificName ());
882
878
}
883
879
884
880
if (pn != null ){
You can’t perform that action at this time.
0 commit comments