From 105ade944fa4264774304b7967ce1984e9ac2439 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 11 Jul 2019 17:18:33 +0200 Subject: [PATCH] Set path for jks --- .../connect/redis/sink/writer/RedisWriter.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisWriter.scala b/kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisWriter.scala index 7d545e106..913083c99 100755 --- a/kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisWriter.scala +++ b/kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisWriter.scala @@ -40,11 +40,11 @@ abstract class RedisWriter extends DbWriter with StrictLogging with ConverterUti val keyStoreFilepath = connection.keyStoreFilepath match { case Some(path) => if (!new File(path).exists) { - throw new FileNotFoundException(s"Keystore Certificate not found in: $keyStoreFilepath") + throw new FileNotFoundException(s"Keystore Certificate not found in: $path") } System.setProperty("javax.net.ssl.keyStorePassword", connection.keyStorePassword.getOrElse("")) - System.setProperty("javax.net.ssl.keyStore", keyStoreFilepath) + System.setProperty("javax.net.ssl.keyStore", path) System.setProperty("javax.net.ssl.keyStoreType", connection.keyStoreType.getOrElse("jceks")) case None => @@ -53,11 +53,11 @@ abstract class RedisWriter extends DbWriter with StrictLogging with ConverterUti connection.trustStoreFilepath match { case Some(path) => if (!new File(path).exists) { - throw new FileNotFoundException(s"Truststore Certificate not found in: $trustStoreFilepath") + throw new FileNotFoundException(s"Truststore Certificate not found in: $path") } System.setProperty("javax.net.ssl.trustStorePassword", connection.trustStorePassword.getOrElse("")) - System.setProperty("javax.net.ssl.trustStore", trustStoreFilepath) + System.setProperty("javax.net.ssl.trustStore", path) System.setProperty("javax.net.ssl.trustStoreType", connection.trustStoreType.getOrElse("jceks")) case None =>