Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: maven-reporting-impl-2.0.4.1
-
Fix Version/s: maven-reporting-impl-2.0.4.2
-
Component/s: maven-reporting-impl
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
MPIR-59 shows a problem on a quote for french translation : an easy workaround is to double the quote '', but these 2 quotes are rendered in the final report, which is not what is expected.
Then I checked the correponding code, and found inconsistencies in the way quotes are handled (apparently to protect braces from being interpreted).
I wrote a JUnit test to show these inconsistencies (which in addition showed some bugs on special situations).
To get consistent results, I think that single quotes should be removed when found: that's what is done in the patch.
But doing so, there will be problems with existing texts that contain only one single quote: what used to work won't work any more, because the quote should be doubled (and not let without a closing quote).
Should this patch be applied or not ? I really don't know: without it, you can have weird results (showed in the JUnit test). But when applying it, prepare yourself to some problems with existing texts: I can't say how much content it will break...
At least, adding the JUnit test to the codebase will help to deal with the current situation.
I worked on a new patch that:
1. fix what can be fixed: braces stacking, double quote handling,
2. but does not change the overall behavior: simple quotes are not removed any more, unmatched quotes are simply ignored
3. and does not change applyPattern() method access scope (using junit-addons to access private method in the JUnit test)
then this patch can be applied safely: it won't break existing texts