1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 05:52:06 +01:00

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
This commit is contained in:
Matt Tucker 2003-05-05 05:02:31 +00:00 committed by mtucker
parent 979d5f721f
commit 000100a149

View file

@ -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;