From 000100a1497344aa4f8751c5d3b2e90b5dc96d23 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Mon, 5 May 2003 05:02:31 +0000 Subject: [PATCH] Fixed setting debug enabled via a system property. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1919 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 3fe30d94c..995272bd2 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -96,14 +96,12 @@ public class XMPPConnection { */ public static boolean DEBUG_ENABLED = false; static { + // Use try block since we may not have permission to get a system + // property (for example, when an applet). try { - // See if we're allowed to access the debug flag system property. This will - // not be allowed on applets, so we need to do a special check. - AccessController.checkPermission(new PropertyPermission("smack.debugEnabled", "read")); - // Passed permission check, so must be allowed. Get the value of the flag. DEBUG_ENABLED = Boolean.getBoolean("smack.debugEnabled"); } - catch (AccessControlException ace) { } + catch (Exception e) { } } private JFrame debugFrame = null;