Skip to content

Commit

Permalink
fixing useSsl null ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
VishakaSekar committed Jan 23, 2019
1 parent f476e0c commit cf5467f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ JMXConnector open(Map<String, Object> connectionMap) throws IOException {
JMXConnector jmxConnector;
final Map<String, Object> env = new HashMap<>();

if(Boolean.valueOf(connectionMap.get(Constants.USE_SSL).toString())) {
if(Boolean.valueOf((String)connectionMap.get(Constants.USE_SSL))) {
//TODO this is not needed as even if you comment it the SSL connections still work.
SslRMIClientSocketFactory sslRMIClientSocketFactory = new SslRMIClientSocketFactory();
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, sslRMIClientSocketFactory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private BigDecimal openJMXConnection () {
Map<String, String> requestMap = buildRequestMap();
jmxAdapter = JMXConnectionAdapter.create(requestMap);
Map<String, Object> connectionMap = (Map<String, Object>) getConnectionParameters();
connectionMap.put(Constants.USE_SSL, this.kafkaServer.get(Constants.USE_SSL));
logger.debug("[useSsl] is set [{}] for server [{}]", connectionMap.get(Constants.USE_SSL),
this.kafkaServer.get(Constants.DISPLAY_NAME));
if (configuration.getConfigYml().containsKey(Constants.ENCRYPTION_KEY) &&
Expand Down

0 comments on commit cf5467f

Please sign in to comment.