You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/11/15 13:22:11 UTC

[GitHub] [activemq-artemis] brusdev commented on a change in pull request #3851: ARTEMIS-3573 Support PropertiesLoginModule custom password codecs

brusdev commented on a change in pull request #3851:
URL: https://github.com/apache/activemq-artemis/pull/3851#discussion_r749321150



##########
File path: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
##########
@@ -79,6 +79,21 @@ public void init(Map<String, String> params) throws Exception {
       }
    }
 
+   @Override
+   public boolean compare(Object value, Object encodedValue) {
+      if (encodedValue instanceof String == false) {
+         throw new IllegalArgumentException("Not supported encodedValue type: " + encodedValue.getClass().getName());
+      }
+
+      if (value instanceof String) {
+         return verify(((String)value).toCharArray(), (String)encodedValue);
+      } else if (value instanceof char[]) {
+         return verify((char[])value, (String)encodedValue);
+      } else {
+         throw new IllegalArgumentException("Not supported value type: " + value.getClass().getName());

Review comment:
       I'll replace `Not supported ` with `Unsupported`




-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org