Skip to content

Commit

Permalink
8343730: JMX cleanups
Browse files Browse the repository at this point in the history
Reviewed-by: cjplummer
  • Loading branch information
kevinjwalls committed Nov 7, 2024
1 parent ac82a8f commit d2b681d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public MBeanServerDelegateImpl () {
super();
delegateInfo =
new MBeanInfo("javax.management.MBeanServerDelegate",
"Represents the MBean server from the management "+
"Represents the MBean server from the management "+
"point of view.",
MBeanServerDelegateImpl.attributeInfos, null,
null,getNotificationInfo());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import com.sun.jmx.mbeanserver.Util;

/**
* Represents the MBean server from the management point of view.
* Represents the MBean server from the management point of view.
* The MBeanServerDelegate MBean emits the MBeanServerNotifications when
* an MBean is registered/unregistered in the MBean server.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class Notification extends EventObject {
/**
* @serialField type String The notification type.
* A string expressed in a dot notation similar to Java properties.
* An example of a notification type is network.alarm.router
* An example of a notification type is com.sun.management.gc.notification
* @serialField sequenceNumber long The notification sequence number.
* A serial number which identify particular instance
* of notification in the context of the notification source.
Expand All @@ -83,7 +83,7 @@ public class Notification extends EventObject {
/**
* @serial The notification type.
* A string expressed in a dot notation similar to Java properties.
* An example of a notification type is network.alarm.router
* An example of a notification type is com.sun.management.gc.notification
*/
private String type;

Expand Down Expand Up @@ -239,7 +239,7 @@ public void setSequenceNumber(long sequenceNumber) {
* @return The notification type. It's a string expressed in a dot notation
* similar to Java properties. It is recommended that the notification type
* should follow the reverse-domain-name convention used by Java package
* names. An example of a notification type is com.example.alarm.router.
* names. An example of a notification type is com.sun.management.gc.notification
*/
public String getType() {
return type ;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -159,12 +159,7 @@ public JMXConnectionNotification(String type,
long sequenceNumber,
String message,
Object userData) {
/* We don't know whether the parent class (Notification) will
throw an exception if the type or source is null, because
JMX 1.2 doesn't specify that. So we make sure it is not
null, in case it would throw the wrong exception
(e.g. IllegalArgumentException instead of
NullPointerException). Likewise for the sequence number. */
// Do not pass null source to super, as EventObject will throw IllegalArgumentException.
super((String) nonNull(type),
nonNull(source),
Math.max(0, sequenceNumber),
Expand Down

0 comments on commit d2b681d

Please sign in to comment.