mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +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:
parent
979d5f721f
commit
000100a149
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue