Skip to content

Commit

Permalink
Fix PMD:AvoidUncheckedExceptionsInSignatures (mqjmx-api)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzygielo committed Jul 11, 2022
1 parent b87e624 commit fe39ff8
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -225,8 +225,10 @@ private MQObjectName() {
*
* @param serviceName Name of service.
* @return ObjectName of Service MBean
*
* @throws NullPointerException
*/
public static ObjectName createServiceConfig(String serviceName) throws MalformedObjectNameException, NullPointerException {
public static ObjectName createServiceConfig(String serviceName) throws MalformedObjectNameException {
String s = SERVICE_CONFIG_DOMAIN_TYPE + ",name=" + serviceName;

ObjectName o = new ObjectName(s);
Expand All @@ -239,8 +241,10 @@ public static ObjectName createServiceConfig(String serviceName) throws Malforme
*
* @param serviceName Name of service.
* @return ObjectName of Service MBean
*
* @throws NullPointerException
*/
public static ObjectName createServiceMonitor(String serviceName) throws MalformedObjectNameException, NullPointerException {
public static ObjectName createServiceMonitor(String serviceName) throws MalformedObjectNameException {

String s = SERVICE_MONITOR_DOMAIN_TYPE + ",name=" + serviceName;

Expand All @@ -255,8 +259,10 @@ public static ObjectName createServiceMonitor(String serviceName) throws Malform
* @param destinationType Type of destination. One of DestinationType.TOPIC, DestinationType.QUEUE.
* @param destinationName Name of destination.
* @return ObjectName of service MBean
*
* @throws NullPointerException
*/
public static ObjectName createDestinationConfig(String destinationType, String destinationName) throws MalformedObjectNameException, NullPointerException {
public static ObjectName createDestinationConfig(String destinationType, String destinationName) throws MalformedObjectNameException {
String s = DESTINATION_CONFIG_DOMAIN_TYPE + ",desttype=" + destinationType + ",name=" + ObjectName.quote(destinationName);

ObjectName o = new ObjectName(s);
Expand All @@ -270,9 +276,11 @@ public static ObjectName createDestinationConfig(String destinationType, String
* @param destinationType Type of destination. One of DestinationType.TOPIC, DestinationType.QUEUE.
* @param destinationName Name of destination.
* @return ObjectName of DestinationMonitor MBean
*
* @throws NullPointerException
*/
public static ObjectName createDestinationMonitor(String destinationType, String destinationName)
throws MalformedObjectNameException, NullPointerException {
throws MalformedObjectNameException {
String s = DESTINATION_MONITOR_DOMAIN_TYPE + ",desttype=" + destinationType + ",name=" + ObjectName.quote(destinationName);

ObjectName o = new ObjectName(s);
Expand Down

0 comments on commit fe39ff8

Please sign in to comment.