Hi, can you file in entries in Jira, please? see our HowTo [1] submitting patches.
[1] http://xmlgraphics.apache.org/fop/dev/#patches 2014-07-01 12:36 GMT+02:00 Kai Hofmann <powers...@web.de>: > > Dear all, > > looks like there is another bug based on the before mentioned problem: > > FOPGVTGlyphVector: > > private void buildBoundingBoxes() { > boundingBoxes = new Rectangle2D[glyphs.length]; > for (int i = 0; i < glyphs.length; i++) { > Rectangle bbox = fontMetrics.getBoundingBox(glyphs[i], fontSize); > boundingBoxes[i] = new Rectangle2D.Float(bbox.x / 1000000f, > -(bbox.y + bbox.height) / 1000000f, > bbox.width / 1000000f, bbox.height / 1000000f); > } > } > > > Here the result of the patched getBoundingBox seems to be used without a null > pointer check. Please keep attention on getBoundingBox which explizitly > returns null !!!! > Looks like it would help to have complete javadocs which describe the > possible return values to avoid such mistakes. > > > Gesendet: Dienstag, 01. Juli 2014 um 10:52 Uhr > Von: "Kai Hofmann" <powers...@web.de> > An: fop-users@xmlgraphics.apache.org > Betreff: SingleByteFont Patch > Dear all, > > I found a small bug in SingleByteFont - please see attached patch - in > getBoundingBox: > > if (idx >= 0 && idx < boundingBoxes.length) > > might result in a null pointer exception, when getBoundingBox is called > before setBoudning box. > So repleace with: > > if (boundingBoxes != null && idx >= 0 && idx < boundingBoxes.length) -- pascal --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org