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/snmp/src/org/opends/server/snmp/SNMPMonitor.java | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/opendj-server-legacy/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java b/opendj-server-legacy/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
index ec87c06..5aef3b8 100644
--- a/opendj-server-legacy/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
+++ b/opendj-server-legacy/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
@@ -13,6 +13,7 @@
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2012-2014 ForgeRock AS.
+ * Portions Copyright 2024 3A Systems, LLC.
*/
package org.opends.server.snmp;
@@ -289,10 +290,10 @@
{
try
{
- Attribute attr = (Attribute) server.getAttribute(name, attribute);
+ Object attr = server.getAttribute(name, attribute);
if (attr != null)
{
- return attr.getValue();
+ return attr instanceof Attribute ? ((Attribute) attr).getValue(): attr;
}
}
catch (Exception ex)
--
Gitblit v1.10.0