1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

Fixes from audit

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1793 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-09-16 09:24:59 +00:00
parent ca8234b246
commit dc649b3a6a
5 changed files with 10 additions and 31 deletions

View File

@ -290,7 +290,7 @@ public abstract class ExchangeSession {
* @return true if basic authentication detected * @return true if basic authentication detected
* @throws IOException unable to connect to exchange * @throws IOException unable to connect to exchange
*/ */
protected boolean isBasicAuthentication(HttpClient httpClient, String url) throws IOException { protected boolean isBasicAuthentication(HttpClient httpClient, String url) {
return DavGatewayHttpClientFacade.getHttpStatus(httpClient, url) == HttpStatus.SC_UNAUTHORIZED; return DavGatewayHttpClientFacade.getHttpStatus(httpClient, url) == HttpStatus.SC_UNAUTHORIZED;
} }
@ -1415,15 +1415,6 @@ public abstract class ExchangeSession {
*/ */
public int recent; public int recent;
/**
* Calendar color
*/
public String calendarColor;
/**
* Calendar order
*/
public String calendarOrder;
/** /**
* Folder message list, empty before loadMessages call. * Folder message list, empty before loadMessages call.
*/ */
@ -2545,7 +2536,7 @@ public abstract class ExchangeSession {
protected abstract Condition getCalendarItemCondition(boolean excludeTasks, Condition dateCondition); protected abstract Condition getCalendarItemCondition(boolean excludeTasks, Condition dateCondition);
protected Condition getPastDelayCondition() throws IOException { protected Condition getPastDelayCondition() {
int caldavPastDelay = Settings.getIntProperty("davmail.caldavPastDelay"); int caldavPastDelay = Settings.getIntProperty("davmail.caldavPastDelay");
Condition dateCondition = null; Condition dateCondition = null;
if (caldavPastDelay != 0) { if (caldavPastDelay != 0) {

View File

@ -2915,7 +2915,7 @@ public class DavExchangeSession extends ExchangeSession {
priorityToImportanceMap.put("9", "low"); priorityToImportanceMap.put("9", "low");
} }
protected String convertPriorityFromExchange(String exchangeImportanceValue) throws DavMailException { protected String convertPriorityFromExchange(String exchangeImportanceValue) {
String value = null; String value = null;
if (exchangeImportanceValue != null) { if (exchangeImportanceValue != null) {
value = importanceToPriorityMap.get(exchangeImportanceValue); value = importanceToPriorityMap.get(exchangeImportanceValue);
@ -2923,7 +2923,7 @@ public class DavExchangeSession extends ExchangeSession {
return value; return value;
} }
protected String convertPriorityToExchange(String vTodoPriorityValue) throws DavMailException { protected String convertPriorityToExchange(String vTodoPriorityValue) {
String value = null; String value = null;
if (vTodoPriorityValue != null) { if (vTodoPriorityValue != null) {
value = priorityToImportanceMap.get(vTodoPriorityValue); value = priorityToImportanceMap.get(vTodoPriorityValue);

View File

@ -262,19 +262,6 @@ public class ExchangePropPatchMethod extends PostMethod {
} }
} }
/**
* Get Multistatus responses.
*
* @return responses
* @throws HttpException on error
*/
public List<MultiStatusResponse> getResponses() throws HttpException {
if (responses == null) {
throw new HttpException(getStatusLine().toString());
}
return responses;
}
/** /**
* Get single Multistatus response. * Get single Multistatus response.
* *

View File

@ -1184,7 +1184,7 @@ public class EwsExchangeSession extends ExchangeSession {
String type; String type;
boolean isException; boolean isException;
protected Event(EWSMethod.Item response) throws URIException { protected Event(EWSMethod.Item response) {
itemId = new ItemId(response); itemId = new ItemId(response);
type = response.type; type = response.type;
@ -2003,9 +2003,10 @@ public class EwsExchangeSession extends ExchangeSession {
contact.put("imapUid", response.get("Name")); contact.put("imapUid", response.get("Name"));
contact.put("uid", response.get("Name")); contact.put("uid", response.get("Name"));
if (LOGGER.isDebugEnabled()) { if (LOGGER.isDebugEnabled()) {
for (String key : response.keySet()) { for (Map.Entry<String, String> entry : response.entrySet()) {
String key = entry.getKey();
if (!IGNORE_ATTRIBUTE_SET.contains(key) && !GALFIND_ATTRIBUTE_MAP.containsValue(key)) { if (!IGNORE_ATTRIBUTE_SET.contains(key) && !GALFIND_ATTRIBUTE_MAP.containsValue(key)) {
LOGGER.debug("Unsupported ResolveNames " + contact.getName() + " response attribute: " + key + " value: " + response.get(key)); LOGGER.debug("Unsupported ResolveNames " + contact.getName() + " response attribute: " + key + " value: " + entry.getValue());
} }
} }
} }
@ -2161,7 +2162,7 @@ public class EwsExchangeSession extends ExchangeSession {
} }
protected static boolean isItemId(String itemName) { protected static boolean isItemId(String itemName) {
return itemName.length() == 156 || itemName.length() == 152; return itemName.length() >= 152;
} }
} }

View File

@ -30,7 +30,7 @@ import java.awt.event.ActionListener;
* Let user select a client certificate * Let user select a client certificate
*/ */
public class SelectCertificateDialog extends JDialog { public class SelectCertificateDialog extends JDialog {
protected JList aliasListBox; protected final JList aliasListBox;
protected String selectedAlias; protected String selectedAlias;
/** /**