MaNong889 commented on issue #2740:
URL: https://github.com/apache/hertzbeat/issues/2740#issuecomment-2378845864

   or (VariableBinding binding : vbs) {
       if (binding == null) {
           continue;
       }
       
       Variable variable = binding.getVariable();
       String value;
   
       if (variable instanceof TimeTicks timeTicks) {
           String timeValue = timeTicks.toString(FORMAT_PATTERN);
           oidsValueMap.put(binding.getOid().toDottedString(), timeValue);
       } else {
           String valueString = binding.toValueString();
           if (valueString.matches("^[a-zA-Z]+\\(\\d+\\)$")) {
               value = valueString.substring(0, 
valueString.indexOf("(")).trim();
           } else {
               value = valueString; 
           }
           oidsValueMap.put(binding.getOid().toDottedString(), value);
       }
   }
   I am an operations engineer and I don't understand Java code. However, I 
sent the SnmpCollectImpl.java file to ChatGPT, and it helped me write a chunk 
of code that I replaced in the data collection part of SnmpCollectImpl.java. 
But the compilation keeps failing, and I can't resolve it. What should I do?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to