Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1366#discussion_r124572986
  
    --- Diff: 
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
 ---
    @@ -108,22 +110,29 @@ public static HashProcessor getHashProcessor() {
     
           // semi colons
           String[] parts = codecDesc.split(";");
    -
           if (parts.length < 1)
              throw new ActiveMQException(ActiveMQExceptionType.ILLEGAL_STATE, 
"Invalid PasswordCodec value: " + codecDesc);
     
           final String codecClassName = parts[0];
     
           // load class
    -      codecInstance = AccessController.doPrivileged(new 
PrivilegedAction<SensitiveDataCodec<String>>() {
    -         @Override
    -         public SensitiveDataCodec<String> run() {
    -            ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
    +      codecInstance = 
AccessController.doPrivileged((PrivilegedAction<SensitiveDataCodec<String>>) () 
-> {
    +         ServiceLoader<SensitiveDataCodec> serviceLoader = 
ServiceLoader.load(SensitiveDataCodec.class, 
PasswordMaskingUtil.class.getClassLoader());
    --- End diff --
    
    @howardgao did the original implementation here, although I've looked 
through the code a handful of times.  The PR looks good to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to