pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1673935 - in /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools: PDFReader.java util/RecentFiles.java
Date Wed, 15 Apr 2015 19:28:14 GMT
Author: tilman
Date: Wed Apr 15 19:28:14 2015
New Revision: 1673935

URL: http://svn.apache.org/r1673935
Log:
PDFBOX-2748, PDFBOX-2576: use interface instead of derived class for declaration

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/RecentFiles.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java?rev=1673935&r1=1673934&r2=1673935&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java Wed Apr 15 19:28:14
2015
@@ -28,7 +28,7 @@ import java.awt.print.PrinterJob;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
+import java.util.List;
 
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
@@ -402,7 +402,7 @@ public class PDFReader extends JFrame
         if (!recentFiles.isEmpty())
         {
             recentFileSubmenu.removeAll();
-            ArrayList<String> files = recentFiles.getFiles();
+            List<String> files = recentFiles.getFiles();
             for (int i = files.size() - 1; i >= 0; i--)
             {
                 String path = files.get(i);

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/RecentFiles.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/RecentFiles.java?rev=1673935&r1=1673934&r2=1673935&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/RecentFiles.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/RecentFiles.java Wed Apr
15 19:28:14 2015
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Queue;
 import java.util.prefs.Preferences;
 
@@ -105,13 +106,13 @@ public class RecentFiles
      * This gives the file in descending order where order is according to the time it is
added.
      * This checks for file's existence in file history.
      *
-     * @return return the file paths in an ArrayList.
+     * @return return the file paths in a List.
      */
-    public ArrayList<String> getFiles()
+    public List<String> getFiles()
     {
         if (!isEmpty())
         {
-            ArrayList<String> files = new ArrayList<String>();
+            List<String> files = new ArrayList<String>();
             for (String path : filePaths)
             {
                 File file = new File(path);
@@ -143,7 +144,7 @@ public class RecentFiles
     private String[] breakString(String fullPath)
     {
         int allowedStringLength = Preferences.MAX_VALUE_LENGTH;
-        ArrayList<String> pieces = new ArrayList<String>();
+        List<String> pieces = new ArrayList<String>();
         int beginIndex = 0;
         int remainingLength = fullPath.length();
         int endIndex = 0;



Mime
View raw message