[MGNLUI-3266] DefaultImageProvider always assumes existence of image subnode Created: 19/Nov/14  Updated: 09/Mar/21  Resolved: 09/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: image provider
Affects Version/s: 5.3.5
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jan Haderka Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   
    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.



 Comments   
Comment by Roman Kovařík [ 09/Mar/21 ]

Closing as this as won't fix.

Not an issue in the new framework (Magnolia 6.2)

Generated at Mon Feb 12 09:04:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.