gnodet commented on PR #31356:
URL: https://github.com/apache/camel/pull/31356#issuecomment-7412511297
**Very minor optimization suggestion in `createUSM()`:**
The call to `SecurityProtocols.getInstance().addDefaultProtocols()` happens
in every `createUSM()` invocation. While this method is idempotent and
thread-safe, it's slightly inefficient to call it every time an endpoint starts.
Consider calling it once in a static initializer or in the component's
initialization instead:
```java
static {
SecurityProtocols.getInstance().addDefaultProtocols();
}
```
However, this is a **very minor** performance consideration and doesn't
affect correctness. The current implementation is safe and works correctly.
File:
`components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpHelper.java`,
around line 190
--
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]