Преглед на файлове

Removing unnecessary private method

Jhonny Mertz преди 8 години
родител
ревизия
c018ecd9c6
променени са 1 файла, в които са добавени 1 реда и са изтрити 6 реда
  1. 1 6
      src/main/java/com/github/jhonnymertz/wkhtmltopdf/wrapper/Pdf.java

+ 1 - 6
src/main/java/com/github/jhonnymertz/wkhtmltopdf/wrapper/Pdf.java

@@ -80,13 +80,8 @@ public class Pdf {
     }
 
     public File saveAs(String path) throws IOException, InterruptedException {
-        return saveAs(path, getPDF());
-    }
-
-    private File saveAs(String path, byte[] document) throws IOException {
         File file = new File(path);
-        FileUtils.writeByteArrayToFile(file, document);
-
+        FileUtils.writeByteArrayToFile(file, getPDF());
         return file;
     }