antenna icon indicating copy to clipboard operation
antenna copied to clipboard

Improve Errorhandling in Attribution Document Generator

Open NikolaiWiens opened this issue 4 years ago • 1 comments

Summary of the Bug

Generating an Attribution document using the AttributionDocumentGenerator results in an ERROR if a license text contains a TAB character.

Run org.eclipse.sw360.antenna.workflow.generators.CSVGenerator
Run org.eclipse.sw360.antenna.workflow.generators.HTMLReportGenerator
Run org.eclipse.sw360.antenna.workflow.generators.SourceZipWriter
Run org.eclipse.sw360.antenna.attribution.document.workflow.generators.AttributionDocumentGenerator
Generating pdf report.
Error: No glyph for U+0009 in font BoschOfficeSans-Regular

Steps to reproduce

  1. Add a license text containing a TAB in Antenna config.xml file (section setFinalLicense)
  2. Run Attribution document generation
  3. Error occurs

Acceptance Criteria

  • [1] Error is handled and logged
  • [2] Following workflow steps are executed

Definition of Done

  • Acceptance criteria fulfilled
  • A test case is created to reproduce the bug
  • A PR is created, the CI infrastructure reports green, the bug test case proves that bug is fixed
  • The PR is reviewed and approved
  • No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue
  • Documentation is updated

NikolaiWiens avatar Apr 17 '20 14:04 NikolaiWiens

U+0009 is a tab character. And it depends if the used font supports it or not. In this case, our font from our extension does not have it.

However what could be done is to replace tabs with whitespaces in the license texts. This is also the workaround one can apply.

If tabs are to replaced then this needs to be done in Antenna. What are your opinions on this?

robertklaus-bosch avatar Apr 17 '20 16:04 robertklaus-bosch