mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-08 20:28:25 -05:00
From coverity: more encoding fixes
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2272 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9f28a4a80d
commit
bdfe645aa3
@ -340,6 +340,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
@Override
|
||||
public Map<String, ExchangeSession.Contact> galFind(Condition condition, Set<String> returningAttributes, int sizeLimit) throws IOException {
|
||||
Map<String, ExchangeSession.Contact> contacts = new HashMap<String, ExchangeSession.Contact>();
|
||||
//noinspection StatementWithEmptyBody
|
||||
if (disableGalFind) {
|
||||
// do nothing
|
||||
} else if (condition instanceof MultiCondition) {
|
||||
@ -520,9 +521,9 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
// get user mail URL from html body (multi frame)
|
||||
BufferedReader mainPageReader = null;
|
||||
try {
|
||||
mainPageReader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream()));
|
||||
//noinspection StatementWithEmptyBody
|
||||
mainPageReader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(), "UTF-8"));
|
||||
String line;
|
||||
//noinspection StatementWithEmptyBody
|
||||
while ((line = mainPageReader.readLine()) != null && !line.toLowerCase().contains(BASE_HREF)) {
|
||||
}
|
||||
if (line != null) {
|
||||
@ -2847,7 +2848,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
mimeMessage.writeTo(baos);
|
||||
}
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Rebuilt message content: " + new String(baos.toByteArray()));
|
||||
LOGGER.debug("Rebuilt message content: " + new String(baos.toByteArray(), "UTF-8"));
|
||||
}
|
||||
} catch (IOException e2) {
|
||||
LOGGER.warn(e2);
|
||||
|
Loading…
Reference in New Issue
Block a user