Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3266

DefaultImageProvider always assumes existence of image subnode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Neutral Neutral
    • None
    • 5.3.5
    • image provider
    • None

          private Object getThumbnailResource(Node node, String workspace, String generator) {
              Object resource = null;
              try {
                  Node imageNode = node.getNode(definition.getOriginalImageNodeName());
      

      The image node is optional for most of custom types. Image provider assumes it always exists and attempts to retrieve the node without even checking for it's existence and as a result using try/catch block to steer execution flow. Furthermore this method does extensive checking for the mime type of underlying node w/o knowing how extending class might treat generation of thumbnails for given resource. This logic should either be removed and safety checks left to getGeneratorImagePath() method or exposed to extending classes for modification.

        Acceptance criteria

              Unassigned Unassigned
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD