xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florian Barbera" <flor...@micropol.pf>
Subject RE: xmlgraphics-commons 1.4 : bug in
Date Thu, 07 Apr 2011 18:21:02 GMT
Thanks,

 

I put a bug report : https://issues.apache.org/bugzilla/show_bug.cgi?id=51039.

 

 

Cordialement,

 

Florian BARBERA

Ingénieur Chef de Projet

Tel : (+689) 54 33 00 | email : florian@micropol.pf <mailto:florian@micropol.pf> 

 

________________________________

De : Florian Barbera 
Envoyé : mercredi 6 avril 2011 11:54
À : 'jeremias@apache.org'
Cc : 'general@xmlgraphics.apache.org'
Objet : xmlgraphics-commons 1.4 : bug in 

 

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 : florian@micropol.pf <mailto:florian@micropol.pf> 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message