exceptionfactory commented on a change in pull request #4881:
URL: https://github.com/apache/nifi/pull/4881#discussion_r591653570



##########
File path: 
nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/main/java/org/apache/nifi/websocket/jetty/JettyWebSocketClient.java
##########
@@ -219,7 +219,7 @@ public void startClient(final ConfigurationContext context) 
throws Exception{
                 throw new 
IllegalArgumentException(AUTH_CHARSET.getDisplayName() + " was not specified.");
             }
             final Charset charset = Charset.forName(charsetName);
-            final String base64String = Base64.encodeBase64String((userName + 
":" + userPassword).getBytes(charset));
+            final String base64String = 
Base64.getEncoder().encodeToString((userName + ":" + 
userPassword).getBytes(charset));

Review comment:
       The `nifi-websocket-services-jetty` library had a dependency on 
`nifi-security-utils`, which transitively included Apache `commons-codec`.  
With the removal of `nifi-security-utils`, this change removes the need for 
`commons-codec` in this module by using the JDK Base64 Encoder.




----------------------------------------------------------------
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.

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


Reply via email to