mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-04 14:52:24 -05:00
From coverity: set encoding on String to bytes conversion
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2236 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9f0a87c5a5
commit
8f8e979c6f
@ -268,11 +268,11 @@ public class AbstractConnection extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
protected String base64Encode(String value) {
|
||||
return new String(new Base64().encode(value.getBytes()));
|
||||
protected String base64Encode(String value) throws UnsupportedEncodingException {
|
||||
return new String(Base64.encodeBase64(value.getBytes("UTF-8")), "UTF-8");
|
||||
}
|
||||
|
||||
protected String base64Decode(String value) {
|
||||
return new String(new Base64().decode(value.getBytes()));
|
||||
protected String base64Decode(String value) throws UnsupportedEncodingException {
|
||||
return new String(Base64.decodeBase64(value.getBytes("UTF-8")), "UTF-8");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user