From 250ab4de71a591100ca3a4f7af57f1764720af4f Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Thu, 3 Jun 2004 01:03:56 +0000 Subject: [PATCH] Use try/catch around System.getProperty() git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2320 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index f58b10a47..5e50da130 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -687,9 +687,15 @@ public class XMPPConnection { // If debugging is enabled, we open a window and write out all network traffic. if (DEBUG_ENABLED) { - - // Detect the debugger class to use. - String className = System.getProperty("smack.debuggerClass"); + // Detect the debugger class to use. + String className = null; + // Use try block since we may not have permission to get a system + // property (for example, when an applet). + try { + System.getProperty("smack.debuggerClass"); + } + catch (Throwable t) { + } Class debuggerClass = null; if (className != null) { try {