sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1731640 - /sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
Date Mon, 22 Feb 2016 13:38:53 GMT
Author: desruisseaux
Date: Mon Feb 22 13:38:53 2016
New Revision: 1731640

URL: http://svn.apache.org/viewvc?rev=1731640&view=rev
Log:
Safety against SecurityException.

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java?rev=1731640&r1=1731639&r2=1731640&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
[UTF-8] Mon Feb 22 13:38:53 2016
@@ -83,9 +83,9 @@ public final class Supervisor extends St
      */
     public static synchronized void register() {
         if (name == null) {
-            name = ObjectName.WILDCARD; // In case of failure.
-            final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
+            name = ObjectName.WILDCARD;                         // In case of failure.
             try {
+                final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
                 final ObjectName n = new ObjectName(NAME);
                 server.registerMBean(new Supervisor(), n);
                 name = n; // Store only on success.



Mime
View raw message