package org.opendaylight.controller.config.manager.impl.jmx;
import java.io.Closeable;
-
import javax.annotation.concurrent.ThreadSafe;
import javax.management.InstanceAlreadyExistsException;
import javax.management.ObjectName;
-
import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
import org.opendaylight.controller.config.manager.impl.jmx.InternalJMXRegistrator.InternalJMXRegistration;
public ModuleJMXRegistration registerMBean(Object object, ObjectName on)
throws InstanceAlreadyExistsException {
ObjectNameUtil.checkType(on, ObjectNameUtil.TYPE_MODULE);
- if (ObjectNameUtil.getTransactionName(on) != null)
+ if (ObjectNameUtil.getTransactionName(on) != null) {
throw new IllegalArgumentException(
"Transaction name not expected in " + on);
+ }
return new ModuleJMXRegistration(childJMXRegistrator.registerMBean(
object, on));
}