Author: jeremias
Date: Mon Apr 14 05:41:00 2008
New Revision: 647770
URL: http://svn.apache.org/viewvc?rev=647770&view=rev
Log:
Fixed a possible follow-up NPE when the TTC cannot be loaded.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java?rev=647770&r1=647769&r2=647770&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
Mon Apr 14 05:41:00 2008
@@ -196,7 +196,6 @@
// Get a list of the TTC Font names
List ttcNames = null; //List<String>
String fontFileURI = fontUrl.toExternalForm().trim();
- TTFFontLoader ttfLoader = new TTFFontLoader(fontFileURI, resolver);
InputStream in = null;
try {
in = FontLoader.openFontUri(resolver, fontFileURI);
@@ -207,6 +206,7 @@
if (this.eventListener != null) {
this.eventListener.fontLoadingErrorAtAutoDetection(this,
fontFileURI, e);
}
+ return null;
} finally {
IOUtils.closeQuietly(in);
}
@@ -223,7 +223,7 @@
log.debug("Loading " + fontName);
}
try {
- ttfLoader = new TTFFontLoader(fontFileURI, fontName,
resolver);
+ TTFFontLoader ttfLoader = new TTFFontLoader(fontFileURI,
fontName, resolver);
customFont = ttfLoader.getFont();
if (this.eventListener != null) {
customFont.setEventListener(this.eventListener);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]