Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1203

ImageTagRegistry forgets to reinitialize cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Pull request is here:
      https://github.com/apache/batik/pull/4

      ImageTagRegistry fails to clear the cache via:
      extensions = null;
      mimeTypes = null;
      whenever entries are NOT inserted in descending priority. Only if the "if" condition never triggers the cache is correctly reset.
      The reason why this went largely unnoticed is that when the entries are loaded initially, the cache is still null. So it usually gets initialized only once. But because of this bug, you cannot later register a higher-priority handler yourself.

      To test, make sure the cache is populated before calling "register". Then register a low priority entry.

      Attachments

        Issue Links

          Activity

            People

              ssteiner Simon Steiner
              erich.schubert Erich Schubert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: