Add new patch 05_PrintStream_File, PrintStream(File) is undefined in
authorgregor herrmann <gregoa@debian.org>
Sun, 16 Mar 2008 16:15:50 +0000 (16:15 -0000)
committergregor herrmann <gregoa@debian.org>
Sun, 16 Mar 2008 16:15:50 +0000 (16:15 -0000)
  gcj.

debian/changelog
debian/patches/00list
debian/patches/05_PrintStream_File.dpatch [new file with mode: 0755]

index 4e9fcd7..acb65b9 100644 (file)
@@ -7,8 +7,10 @@ jabref (2.4~beta1-1) UNRELEASED; urgency=low
     debian/rules.
   * Adapt referenced filename in debian/links and debian/install.
   * Refresh patch 01_free_javac.
+  * Add new patch 05_PrintStream_File, PrintStream(File) is undefined in
+    gcj.
 
- -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 16 Mar 2008 16:14:22 +0100
+ -- gregor herrmann <gregor+debian@comodo.priv.at>  Sun, 16 Mar 2008 17:04:16 +0100
 
 jabref (2.3.1-2) unstable; urgency=low
 
index 4626e1d..a2d0cb3 100644 (file)
@@ -1,3 +1,4 @@
 01_free_javac
 03_external_apps
 04_HONOR_DISPLAY_PROPERTIES
+05_PrintStream_File
diff --git a/debian/patches/05_PrintStream_File.dpatch b/debian/patches/05_PrintStream_File.dpatch
new file mode 100755 (executable)
index 0000000..4ddf1b5
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_PrintStream_File.dpatch by  <gregor+debian@comodo.priv.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: "The constructor PrintStream(File) is undefined"
+## DP: Work around with a FileOutputStream.
+
+@DPATCH@
+diff -urNad jabref~/src/java/net/sf/jabref/sql/SQLutil.java jabref/src/java/net/sf/jabref/sql/SQLutil.java
+--- jabref~/src/java/net/sf/jabref/sql/SQLutil.java    2008-03-16 17:01:04.000000000 +0100
++++ jabref/src/java/net/sf/jabref/sql/SQLutil.java     2008-03-16 17:03:07.000000000 +0100
+@@ -11,6 +11,8 @@
+ import java.io.File;
+ import java.io.PrintStream;
++import java.io.BufferedOutputStream;
++import java.io.FileOutputStream;
+ import java.sql.Connection;
+ import java.sql.DriverManager;
+ import java.sql.SQLException;
+@@ -261,8 +263,10 @@
+         if (outfile.exists())
+             outfile.delete();
++        BufferedOutputStream writer = null;
++        writer = new BufferedOutputStream( new FileOutputStream( outfile ) );
+         PrintStream fout = null;
+-        fout = new PrintStream(outfile);
++        fout = new PrintStream( writer );
+         exportDatabase_worker(dbtype, database, metaData, keySet, fout);