From 80bfd4b587ee5adc86953ca0ea56c46b7f789d90 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Mon, 09 Sep 2024 09:05:44 +0000
Subject: [PATCH] [#376] FIX SNMP monitoring config (#381)
---
opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java b/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
index a3ae326..b452231 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/config/JMXMBean.java
@@ -13,7 +13,7 @@
*
* Portions Copyright 2006-2007-2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2016 ForgeRock AS.
- * Portions Copyright 2023 3A Systems LLC.
+ * Portions Copyright 2023-2024 3A Systems LLC.
*/
package org.opends.server.config;
@@ -398,8 +398,11 @@
get(attributeName, configEntryDN, op.getErrorMessage());
throw new AttributeNotFoundException(message.toString());
}
-
- return getJmxAttribute(attributeName).getValue();
+ Attribute attr=getJmxAttribute(attributeName);
+ if (attr==null) {
+ throw new AttributeNotFoundException(attributeName);
+ }
+ return attr.getValue();
}
catch (AttributeNotFoundException e)
{
--
Gitblit v1.10.0