findbugs: use preferred encoding explicitly

This commit is contained in:
Daan Hoogland 2015-06-20 10:36:15 +02:00
parent 916a6d0104
commit bbb165a037
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ public final class LibvirtModifySshKeysCommandWrapper extends CommandWrapper<Mod
final String prvKey = command.getPrvKey();
try (FileOutputStream prvKStream = new FileOutputStream(prvKeyFile);){
if ( prvKStream != null) {
prvKStream.write(prvKey.getBytes());
prvKStream.write(prvKey.getBytes(StringUtils.getPreferredCharset()));
}
} catch (final FileNotFoundException e) {
result = "File" + sshprvkeypath + "is not found:" + e.toString();