[jira] [Commented] (BATIK-1203) ImageTagRegistry forgets to reinitialize cache
"ASF GitHub Bot (JIRA)" <[email protected]> Tue, 14 Aug 2018 13:44:00 +0000 (UTC)
| Newsgroups | gmane.text.xml.batik.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/BATIK-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579811#comment-16579811 ]
ASF GitHub Bot commented on BATIK-1203:
---------------------------------------
GitHub user kno10 opened a pull request:
https://github.com/apache/batik/pull/15
Unit test for broken ImageTagRegistry; BATIK-1203
This is the unit test. The fix is pull request #4
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kno10/batik batik-1203-test
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/batik/pull/15.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15
----
commit 4cfc131d1ab2666ef4a1442277879d418a2f7423
Author: Erich Schubert <schubert@...>
Date: 2018-08-14T13:40:26Z
Unit test for broken ImageTagRegistry; BATIK-1203
----
> ImageTagRegistry forgets to reinitialize cache
> ----------------------------------------------
>
> Key: BATIK-1203
> URL: https://issues.apache.org/jira/browse/BATIK-1203
> Project: Batik
> Issue Type: Bug
> Reporter: Erich Schubert
> Priority: Major
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)