Bug 53458 - simple bug in HyphenationTreeCache
Summary: simple bug in HyphenationTreeCache
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: all
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 12:09 UTC by info
Modified: 2012-06-25 06:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description info 2012-06-23 12:09:02 UTC
in method constructUserKey() i found this code near line 82:

        if (hyphPatNames != null) {
            String key = constructLlccKey(lang, country);
            key.replace('_', '-');             <<<<<<<< ======= !!!!
            userKey = (String) hyphPatNames.get(key);
        }
        return userKey;

it should be 
          key = key.replace('_', '-');  

the code as it is now is without effect.
Comment 1 info 2012-06-23 12:31:42 UTC
i found that a specific findbugs-check for this is disabled in file 'findbugs-exclude.xml'.

findbugs is right - the code is wrong
Comment 2 Glenn Adams 2012-06-23 15:48:13 UTC
(In reply to comment #1)
> i found that a specific findbugs-check for this is disabled in file
> 'findbugs-exclude.xml'.
> 
> findbugs is right - the code is wrong

thanks for tracking this down; that is one of the problems with generating exclusions automatically and not going back to review them; reviewing the findbugs exclusions remains a TBD;

could you attach a minimal regression test we can add to test the condition addressed by this fix?
Comment 3 Glenn Adams 2012-06-24 20:04:55 UTC
patch applied at http://svn.apache.org/viewvc?rev=1353320&view=rev

thanks dieter! please review and close if satisfied... also, if you wish to submit a test case, it would be appreciated...
Comment 4 info 2012-06-25 06:04:15 UTC
when you fix the two typos of 'hyphneation' in the same file i'd completly happy.
providing a testcase for this might be tricky - the bug is 'deep inside' and i have no idea how to influence hyphenation in fop.
Comment 5 Glenn Adams 2012-06-25 06:24:39 UTC
(In reply to comment #4)
> when you fix the two typos of 'hyphneation' in the same file i'd completly
> happy.

done!

> providing a testcase for this might be tricky - the bug is 'deep inside' and
> i have no idea how to influence hyphenation in fop.

well, if you have any thoughts on this in the future, please say so