jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r720535 - in /jackrabbit/branches/1.5: ./ jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java
Date Tue, 25 Nov 2008 16:40:47 GMT
Author: jukka
Date: Tue Nov 25 08:40:47 2008
New Revision: 720535

URL: http://svn.apache.org/viewvc?rev=720535&view=rev
Log:
1.5: Merged revision 720533 (JCR-1881)

Modified:
    jackrabbit/branches/1.5/   (props changed)
    jackrabbit/branches/1.5/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java
    jackrabbit/branches/1.5/jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java

Propchange: jackrabbit/branches/1.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 25 08:40:47 2008
@@ -1,2 +1,2 @@
 /jackrabbit/branches/1.3:631261
-/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211,710047,711238,711566-711567,711595,711841-711843,712984-712985,713037,713059,713065,713072,713076,713162,713214,713956,713958,713964,713971,713975,714034,718218,718249-718250,718371,718376,718566,718632,718981,719225,719282,719575-719577,719579,719585-719586,719588,719592
+/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211,710047,711238,711566-711567,711595,711841-711843,712984-712985,713037,713059,713065,713072,713076,713162,713214,713956,713958,713964,713971,713975,714034,718218,718249-718250,718371,718376,718566,718632,718981,719225,719282,719575-719577,719579,719585-719586,719588,719592,720533

Modified: jackrabbit/branches/1.5/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java?rev=720535&r1=720534&r2=720535&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-text-extractors/src/main/java/org/apache/jackrabbit/extractor/RTFTextExtractor.java
Tue Nov 25 08:40:47 2008
@@ -61,8 +61,8 @@
             rek.read(stream, doc, 0);
             String text = doc.getText(0, doc.getLength());
             return new StringReader(text);
-        } catch (BadLocationException e) {
-            logger.warn("Failed to extract RTF text content", e);
+        } catch (Throwable t) {
+            logger.warn("Failed to extract RTF text content", t);
             return new StringReader("");
         } finally {
             stream.close();

Modified: jackrabbit/branches/1.5/jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java?rev=720535&r1=720534&r2=720535&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-text-extractors/src/test/java/org/apache/jackrabbit/extractor/RTFTextExtractorTest.java
Tue Nov 25 08:40:47 2008
@@ -21,6 +21,8 @@
 import java.io.Reader;
 import java.io.StringWriter;
 
+import javax.swing.text.DefaultStyledDocument;
+
 import junit.framework.TestCase;
 
 /**
@@ -30,6 +32,13 @@
 public class RTFTextExtractorTest extends TestCase {
 
     public void testExtractor() throws IOException {
+        // JCR-1881: Only run the test if the underlying libraries work
+        try {
+            new DefaultStyledDocument();
+        } catch (Throwable t) {
+            return;
+        }
+
         TextExtractor extractor = new RTFTextExtractor();
         InputStream in = getClass().getResourceAsStream("test.rtf");
         Reader r = extractor.extractText(in, "application/rtf", null);



Mime
View raw message