Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-101

TemplateDefinitionBuilder#resolveTemplateId throws IllegalStateException (with empty error string) when class is missing Template annotation

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 2.0.2
    • 2.0.1
    • None
    • None

    Description

      info.magnolia.module.blossom.template.TemplateDefinitionBuilder#resolveTemplateId throws IllegalStateException when class is missing Template annotation.

      • Why no error message? Looking at the code its seems very clear what the problem is, the error should communicate this?
      • I'm not sure the IllegalStateException is the best exception? Its description reads "Signals that a method has been invoked at an illegal or inappropriate time." A missing annotation is not really an issue regarding the timing of this call? Without the null check the actual exception would have been a NullPointerException, maybe catch that and re-throw it with an message explaining why it happened (related to the missing error message).

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                thbr03 Tomas Brimor
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD