Project

General

Profile

Actions

task #10205

closed

Update GBIF import to modern json library.

Added by Andreas Müller over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal

Description

... after fixing do not forget to remove 4 dependencies again. See taxeditor|f60a1e5ffb4425d1f


Related issues

Related to EDIT - task #10055: Updates, upgrades and cleanup 2023NewAndreas Müller

Actions
Related to EDIT - feature request #10221: Add form to edit the json file with cdmserver infoClosedKatja Luther

Actions
Copied from EDIT - bug #10204: GBIF search does not work due to missing json-libClosedKatja Luther

Actions
Actions #1

Updated by Andreas Müller over 1 year ago

  • Description updated (diff)
  • Category set to cdmlib
  • Assignee set to Katja Luther
Actions #2

Updated by Andreas Müller over 1 year ago

  • Related to task #10055: Updates, upgrades and cleanup 2023 added
Actions #3

Updated by Andreas Müller over 1 year ago

  • Copied from bug #10204: GBIF search does not work due to missing json-lib added
Actions #4

Updated by Andreas Müller over 1 year ago

  • Description updated (diff)
  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 5.44
Actions #5

Updated by Andreas Müller over 1 year ago

  • Description updated (diff)
Actions #6

Updated by Andreas Müller over 1 year ago

please also remove the .ignore entries

Actions #7

Updated by Andreas Müller over 1 year ago

Actions #8

Updated by Katja Luther over 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40

The gbif import on cdmlibrary side is adapted.

Actions #9

Updated by Katja Luther over 1 year ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

The jsonlib library and depending libraries are removed again.
This should work now, please review.

Actions #10

Updated by Andreas Müller about 1 year ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Constructions like "record.get(COUNTRY_CODE).textValue();" seem to be dangerous for throwing NPEs. Is it guaranteed that an NPE can not be thrown at any of these places? Even if the handling may change in future?

Is there a reason for seeting it only to 40%?

Actions #11

Updated by Andreas Müller about 1 year ago

In #10204 you did not only change Manifest.MF but also others (e.g. eu.etaxonomy.taxeditor.cdmlib/build.properties ). Please check the old ticket for a complete list what changes need to be reverted.

Actions #12

Updated by Katja Luther about 1 year ago

  • Status changed from Feedback to Resolved

Thanks for recognizing ... I removed the libraries also from the properties file now.

Actions #13

Updated by Katja Luther about 1 year ago

Andreas Müller wrote in #note-10:

Constructions like "record.get(COUNTRY_CODE).textValue();" seem to be dangerous for throwing NPEs. Is it guaranteed that an NPE can not be thrown at any of these places? Even if the handling may change in future?

Is there a reason for seeting it only to 40%?

Maybe we could test for textual value like this, asText() returns a valid string value of the container value.

record.get(COUNTRY_CODE).isTextual()?record.get(COUNTRY_CODE).textValue():record.get(COUNTRY_CODE).asText();

Actions #14

Updated by Andreas Müller about 1 year ago

Katja Luther wrote in #note-13:

Andreas Müller wrote in #note-10:

Constructions like "record.get(COUNTRY_CODE).textValue();" seem to be dangerous for throwing NPEs. Is it guaranteed that an NPE can not be thrown at any of these places? Even if the handling may change in future?

Maybe we could test for textual value like this, asText() returns a valid string value of the container value.

record.get(COUNTRY_CODE).isTextual()?record.get(COUNTRY_CODE).textValue():record.get(COUNTRY_CODE).asText();

Why should this solve a potential NPE?

Actions #15

Updated by Andreas Müller about 1 year ago

Katja Luther wrote in #note-12:

Thanks for recognizing ... I removed the libraries also from the properties file now.

With "Please check the old ticket for a complete list what changes need to be reverted. " I meant that you go through all changes of the old ticket, not only the example that I gave. There are other changes. Simply go through all commits related to the tickets and check what has changed.

Actions #16

Updated by Andreas Müller about 1 year ago

  • Status changed from Resolved to Feedback
Actions #17

Updated by Andreas Müller about 1 year ago

  • Target version changed from Release 5.44 to Release 5.36

Is this for final review?

Actions #18

Updated by Katja Luther about 1 year ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

I checked the actual files with the files before reverting the json lib removing and checked the import, which still works. Please review

Actions #19

Updated by Andreas Müller about 1 year ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 40 to 100
Actions

Also available in: Atom PDF