From coverity: more encoding fixes
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2274 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9027f73a3c
commit
d4efba3599
|
@ -225,7 +225,7 @@ public final class DavGateway {
|
||||||
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT);
|
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT);
|
||||||
int status = httpClient.executeMethod(getMethod);
|
int status = httpClient.executeMethod(getMethod);
|
||||||
if (status == HttpStatus.SC_OK) {
|
if (status == HttpStatus.SC_OK) {
|
||||||
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream()));
|
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream(), "UTF-8"));
|
||||||
version = versionReader.readLine();
|
version = versionReader.readLine();
|
||||||
LOGGER.debug("DavMail released version: " + version);
|
LOGGER.debug("DavMail released version: " + version);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2608,16 +2608,16 @@ public abstract class ExchangeSession {
|
||||||
.append((after ^ fromServer) ? "-server" : "-client")
|
.append((after ^ fromServer) ? "-server" : "-client")
|
||||||
.append(".ics");
|
.append(".ics");
|
||||||
if ((icsBody != null) && (icsBody.length() > 0)) {
|
if ((icsBody != null) && (icsBody.length() > 0)) {
|
||||||
FileWriter fileWriter = null;
|
OutputStreamWriter writer = null;
|
||||||
try {
|
try {
|
||||||
fileWriter = new FileWriter(filePath.toString());
|
writer = new OutputStreamWriter(new FileOutputStream(filePath.toString()), "UTF-8");
|
||||||
fileWriter.write(icsBody);
|
writer.write(icsBody);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error(e);
|
LOGGER.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
if (fileWriter != null) {
|
if (writer != null) {
|
||||||
try {
|
try {
|
||||||
fileWriter.close();
|
writer.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error(e);
|
LOGGER.error(e);
|
||||||
}
|
}
|
||||||
|
@ -3301,7 +3301,7 @@ public abstract class ExchangeSession {
|
||||||
GetMethod optionsMethod = new GetMethod("/owa/?ae=Options&t=About");
|
GetMethod optionsMethod = new GetMethod("/owa/?ae=Options&t=About");
|
||||||
try {
|
try {
|
||||||
DavGatewayHttpClientFacade.executeGetMethod(httpClient, optionsMethod, false);
|
DavGatewayHttpClientFacade.executeGetMethod(httpClient, optionsMethod, false);
|
||||||
optionsPageReader = new BufferedReader(new InputStreamReader(optionsMethod.getResponseBodyAsStream()));
|
optionsPageReader = new BufferedReader(new InputStreamReader(optionsMethod.getResponseBodyAsStream(), "UTF-8"));
|
||||||
String line;
|
String line;
|
||||||
|
|
||||||
// find email and alias
|
// find email and alias
|
||||||
|
|
Loading…
Reference in New Issue