Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC107200CC8 for ; Fri, 30 Jun 2017 03:30:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB74C160BF7; Fri, 30 Jun 2017 01:30:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 546C4160BED for ; Fri, 30 Jun 2017 03:30:07 +0200 (CEST) Received: (qmail 58277 invoked by uid 500); 30 Jun 2017 01:30:06 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 58261 invoked by uid 99); 30 Jun 2017 01:30:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jun 2017 01:30:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EAD43E180B; Fri, 30 Jun 2017 01:30:03 +0000 (UTC) From: gaohoward To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #1366: ARTEMIS-1252 Add service loading of pas... Content-Type: text/plain Message-Id: <20170630013003.EAD43E180B@git1-us-west.apache.org> Date: Fri, 30 Jun 2017 01:30:03 +0000 (UTC) archived-at: Fri, 30 Jun 2017 01:30:08 -0000 Github user gaohoward commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1366#discussion_r124948436 --- 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>() { - @Override - public SensitiveDataCodec run() { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); + codecInstance = AccessController.doPrivileged((PrivilegedAction>) () -> { + ServiceLoader serviceLoader = ServiceLoader.load(SensitiveDataCodec.class, PasswordMaskingUtil.class.getClassLoader()); --- End diff -- +1 :) --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---