Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DFA23200B96 for ; Thu, 6 Oct 2016 17:56:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE312160ADB; Thu, 6 Oct 2016 15:56:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 27180160AC5 for ; Thu, 6 Oct 2016 17:56:17 +0200 (CEST) Received: (qmail 65320 invoked by uid 500); 6 Oct 2016 15:56:17 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 65311 invoked by uid 99); 6 Oct 2016 15:56:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 15:56:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A886FC136D for ; Thu, 6 Oct 2016 15:56:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ypt1KEwEgQ9D for ; Thu, 6 Oct 2016 15:56:16 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 86BD25F2C4 for ; Thu, 6 Oct 2016 15:56:15 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D2EFCE017A for ; Thu, 6 Oct 2016 15:56:12 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D82823A023D for ; Thu, 6 Oct 2016 15:56:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161006155611.D82823A023D@svn01-us-west.apache.org> archived-at: Thu, 06 Oct 2016 15:56:19 -0000 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 } } }