pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java?rev=1763617&r1=1763616&r2=1763617&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
(original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/util/autodetect/NativeFontDirFinder.java
Thu Oct  6 15:56:10 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