New upstream release.
[debian/jabref.git] / debian / patches / 05_PrintStream_File.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 05_PrintStream_File.dpatch by  <gregor+debian@comodo.priv.at>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: "The constructor PrintStream(File) is undefined"
6 ## DP: Work around with a FileOutputStream.
7
8 @DPATCH@
9 diff -urNad jabref~/src/java/net/sf/jabref/sql/SQLutil.java jabref/src/java/net/sf/jabref/sql/SQLutil.java
10 --- jabref~/src/java/net/sf/jabref/sql/SQLutil.java     2008-03-16 17:01:04.000000000 +0100
11 +++ jabref/src/java/net/sf/jabref/sql/SQLutil.java      2008-03-18 03:26:59.000000000 +0100
12 @@ -11,6 +11,8 @@
13  
14  import java.io.File;
15  import java.io.PrintStream;
16 +import java.io.BufferedOutputStream;
17 +import java.io.FileOutputStream;
18  import java.sql.Connection;
19  import java.sql.DriverManager;
20  import java.sql.SQLException;
21 @@ -261,8 +263,9 @@
22          if (outfile.exists())
23              outfile.delete();
24  
25 +        BufferedOutputStream writer = new BufferedOutputStream( new FileOutputStream( outfile ) );
26          PrintStream fout = null;
27 -        fout = new PrintStream(outfile);
28 +        fout = new PrintStream( writer );
29  
30          exportDatabase_worker(dbtype, database, metaData, keySet, fout);
31