pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1763618 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
Date Thu, 06 Oct 2016 15:56:15 GMT
Author: tilman
Date: Thu Oct  6 15:56:15 2016
New Revision: 1763618

URL: http://svn.apache.org/viewvc?rev=1763618&view=rev
Log:
PDFBOX-3520: more resiliency against security manager fails

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java?rev=1763618&r1=1763617&r2=1763618&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
(original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
Thu Oct  6 15:56:15 2016
@@ -42,9 +42,16 @@ public abstract class NativeFontDirFinde
             for (String searchableDirectorie : searchableDirectories)
             {
                 File fontDir = new File(searchableDirectorie);
-                if (fontDir.exists() && fontDir.canRead())
+                try
                 {
-                    fontDirList.add(fontDir);
+                    if (fontDir.exists() && fontDir.canRead())
+                    {
+                        fontDirList.add(fontDir);
+                    }
+                }
+                catch (SecurityException e)
+                {
+                    // should continue if this fails
                 }
             }
         }



Mime
View raw message