globalbioticinteractions / nomer

maps identifiers and names to other identifiers and names
GNU General Public License v3.0
19 stars 3 forks source link

nullpointer exception thrown when using [echo -e "\Agapostemon texanus"] #50

Closed jhpoelen closed 3 years ago

jhpoelen commented 3 years ago

@seltmann running

$ echo -e "\Agapostemon texanus" | nomer append discoverlife 

caused a null pointer exception.

jhpoelen commented 3 years ago

After applying fix, the nullpointer exception was no longer seen:

$ echo -e "\Agapostemon texanus" | nomer append discoverlife
using matcher [discoverlife-taxon]
$ echo $?
0

meaning that the process returned without errors (return code = 0)

jhpoelen commented 3 years ago

Note that the example above doesn't return any values, because, by default, the first column is interpreted as a taxon id.

When the \t character is used to delimit the columns, you get the expected results:

$ echo -e "\tAgapostemon texanus" | nomer append discoverlife
using matcher [discoverlife-taxon]
    Agapostemon texanus HAS_ACCEPTED_NAME   https://www.discoverlife.org/mp/20q?search=Agapostemon+texanus  Agapostemon texanus species     Animalia | Arthropoda | Insecta | Hymenoptera | Halictidae | Agapostemon texanus    https://www.discoverlife.org/mp/20q?search=Animalia | https://www.discoverlife.org/mp/20q?search=Arthropoda | https://www.discoverlife.org/mp/20q?search=Insecta | https://www.discoverlife.org/mp/20q?search=Hymenoptera | https://www.discoverlife.org/mp/20q?search=Halictidae | https://www.discoverlife.org/mp/20q?search=Agapostemon+texanus  kingdom | phylum | class | order | family | species https://www.discoverlife.org/mp/20q?search=Agapostemon+texanus
jhpoelen commented 3 years ago

@seltmann closing issue - please re-open if issue remain.