You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/09/09 15:35:13 UTC
svn commit: r693462 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java
Author: acumiskey
Date: Tue Sep 9 06:35:13 2008
New Revision: 693462
URL: http://svn.apache.org/viewvc?rev=693462&view=rev
Log:
This is a better fix which will cater for the case where the first character encountered is the EOF (-1) character. EOF test now only occurs when loop is exit so this should execute more efficiently.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java?rev=693462&r1=693461&r2=693462&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMInputStream.java Tue Sep 9 06:35:13 2008
@@ -100,12 +100,12 @@
StringBuffer buf = new StringBuffer();
int ch = reader.read();
- while (ch != 0) {
+ while (ch > 0) {
buf.append((char)ch);
ch = reader.read();
- if (ch == -1) {
- throw new EOFException("Unexpected end of stream reached");
- }
+ }
+ if (ch == -1) {
+ throw new EOFException("Unexpected end of stream reached");
}
return buf.toString();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org