Fix getBytes invocation to use explicit charset

This commit is contained in:
Ryan Ernst 2016-12-23 10:57:02 -08:00
parent fb690ef748
commit d4288cce79
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@
package org.elasticsearch.common.settings;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
@ -55,7 +56,7 @@ public class CreateKeyStoreCommandTests extends KeyStoreCommandTestCase {
public void testOverwrite() throws Exception {
Path keystoreFile = KeyStoreWrapper.keystorePath(env.configFile());
byte[] content = "not a keystore".getBytes();
byte[] content = "not a keystore".getBytes(StandardCharsets.UTF_8);
Files.write(keystoreFile, content);
terminal.addTextInput(""); // default is no