keystore: instances of CharsetEncoder are stateful and cannot be shared

Fixes a crash that occurs on pipeline load and/or reload when using both the
java keystore and the multi-pipeline feature, when more than one pipeline
references `${}`-style variables.

Fixes #10408
This commit is contained in:
Ry Biesemeyer 2019-02-06 19:55:47 +00:00
parent 0e4ab8a784
commit 009e764c10

View file

@ -41,7 +41,7 @@ public final class JavaKeyStore implements SecretStore {
private static final String KEYSTORE_TYPE = "pkcs12";
private static final Logger LOGGER = LogManager.getLogger(JavaKeyStore.class);
private static final String PATH_KEY = "keystore.file";
private static final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
private final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
private KeyStore keyStore;
private char[] keyStorePass;
private Path keyStorePath;