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 bd...@apache.org on 2006/09/21 14:44:23 UTC
svn commit: r448536 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java
Author: bdelacretaz
Date: Thu Sep 21 05:44:22 2006
New Revision: 448536
URL: http://svn.apache.org/viewvc?view=rev&rev=448536
Log:
Fix bug #40569: throw IOException when embed-url was specified for an embedded font, but Source cannot be found
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java?view=diff&rev=448536&r1=448535&r2=448536
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/CustomFont.java Thu Sep 21 05:44:22 2006
@@ -19,6 +19,7 @@
package org.apache.fop.fonts;
+import java.io.IOException;
import java.util.Map;
import javax.xml.transform.Source;
@@ -69,14 +70,16 @@
/**
* Returns a Source representing an embeddable font file.
- * @return Source for an embeddable font file or null if not available.
+ * @return Source for an embeddable font file
+ * @throws IOException if embedFileName is not null but Source is not found
*/
- public Source getEmbedFileSource() {
+ public Source getEmbedFileSource() throws IOException {
+ Source result = null;
if (resolver != null && embedFileName != null) {
- return resolver.resolve(embedFileName);
- } else {
- return null;
+ result = resolver.resolve(embedFileName);
+ if(result == null) throw new IOException("Unable to resolve Source '" + embedFileName + "' for embedded font");
}
+ return result;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org