Uploaded image for project: 'Imaging'
  1. Imaging
  2. MGNLIMG-137

BinaryNodeParameterProviderFactory doesn't follow ParameterProviderFactory contract and is thus at risk of generating the same image multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • None
    • None

      From ParameterProviderFactory's javadoc:

       * The ParameterProviderFactory must also ensure the parameter has appropriate 
       * equals() and hashCode() methods: the parameter is used as part of a key of a
       * blocking map to avoid generating the same image multiple times.
      

      Here, "the parameter" should read "the parameter, as returned by ParameterProvider.getParameter()".

      In earlier implementations based on the Content API, we were wrapping the Content/NodeData instances with SimpleEqualityContentWrapper (or SimpleEqualityNodeDataWrapper), which provides an equals() and hashcode() implementation that did the trick.

      However, BinaryNodeParameterProviderFactory does no such thing, thus relying on the equals() and hashCode() implementations of the given Node, which is not specified, and not likely to do what we want (e.g 2 Node instances from a different Session are not considered equal)

        Acceptance criteria

              Unassigned Unassigned
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD