jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r511510 - /jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java
Date Sun, 25 Feb 2007 13:37:42 GMT
Author: jukka
Date: Sun Feb 25 05:37:41 2007
New Revision: 511510

URL: http://svn.apache.org/viewvc?view=rev&rev=511510
Log:
JCR-764: PDFParser.getPDDocument might throw an IOException. Just ignore it.

Modified:
    jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java

Modified: jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java?view=diff&rev=511510&r1=511509&r2=511510
==============================================================================
--- jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java
(original)
+++ jackrabbit/trunk/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/PdfTextExtractor.java
Sun Feb 25 05:37:41 2007
@@ -51,7 +51,7 @@
 
     /**
      * {@inheritDoc}
-     */ 
+     */
     public Reader extractText(InputStream stream,
                               String type,
                               String encoding) throws IOException {
@@ -68,9 +68,13 @@
 
                 return new CharArrayReader(writer.toCharArray());
             } finally {
-                PDDocument doc = parser.getPDDocument();
-                if (doc != null) {
-                    doc.close();
+                try {
+                    PDDocument doc = parser.getPDDocument();
+                    if (doc != null) {
+                        doc.close();
+                    }
+                } catch (IOException e) {
+                    // ignore
                 }
             }
         } catch (Exception e) {



Mime
View raw message