Hi Jeremias !
I write you this email because you seem to be the last person who has
changed the class XMPSchemaAdapter in the XML graphics commons project.
I didn't find in the web site where I could alert for a bug. If there
were a better way to do that, please forgive me in advance.
I think there is an issue in the method formatISO8601Date.
When you have a negative GMT indication and when the gap is superior or
equal to 10 then there is a problem.
The piece of code:
if (zoneOffsetHours > 0) {
sb.append('+');
} else {
sb.append('-');
}
if (zoneOffsetHours < 10) {
sb.append('0');
}
If I have zoneOffsetHours = -10 I will have zoneOffsetHours < 10 true
(-10 < 10) so I will have sb concatenated with "-010" and not with
"-10".
It causes a NumberFormatException in my case, if I use FOP.
I think that the good test would be :
if (Math.abs(zoneOffsetHours) < 10) {
sb.append('0');
}
Am I wrong?
Regards,
Florian BARBERA
Project Leader Engineer
Tel : (+689) 54 33 00 | email : [email protected]
<mailto:[email protected]>