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@1582 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
1d105b927d
commit
5dbd82753b
@ -734,14 +734,14 @@ public abstract class ExchangeSession {
|
||||
*
|
||||
* @param buffer search filter buffer
|
||||
*/
|
||||
public void appendTo(StringBuilder buffer);
|
||||
void appendTo(StringBuilder buffer);
|
||||
|
||||
/**
|
||||
* True if condition is empty.
|
||||
*
|
||||
* @return true if condition is empty
|
||||
*/
|
||||
public boolean isEmpty();
|
||||
boolean isEmpty();
|
||||
|
||||
/**
|
||||
* Test if the contact matches current condition.
|
||||
@ -749,7 +749,7 @@ public abstract class ExchangeSession {
|
||||
* @param contact Exchange Contact
|
||||
* @return true if contact matches condition
|
||||
*/
|
||||
public abstract boolean isMatch(ExchangeSession.Contact contact);
|
||||
boolean isMatch(ExchangeSession.Contact contact);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -771,20 +771,20 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
}
|
||||
}
|
||||
|
||||
static final Map<Operator, String> operatorMap = new HashMap<Operator, String>();
|
||||
static final Map<Operator, String> OPERATOR_MAP = new HashMap<Operator, String>();
|
||||
|
||||
static {
|
||||
operatorMap.put(Operator.IsEqualTo, " = ");
|
||||
operatorMap.put(Operator.IsGreaterThanOrEqualTo, " >= ");
|
||||
operatorMap.put(Operator.IsGreaterThan, " > ");
|
||||
operatorMap.put(Operator.IsLessThanOrEqualTo, " <= ");
|
||||
operatorMap.put(Operator.IsLessThan, " < ");
|
||||
operatorMap.put(Operator.Like, " like ");
|
||||
operatorMap.put(Operator.IsNull, " is null");
|
||||
operatorMap.put(Operator.IsFalse, " = false");
|
||||
operatorMap.put(Operator.IsTrue, " = true");
|
||||
operatorMap.put(Operator.StartsWith, " = ");
|
||||
operatorMap.put(Operator.Contains, " = ");
|
||||
OPERATOR_MAP.put(Operator.IsEqualTo, " = ");
|
||||
OPERATOR_MAP.put(Operator.IsGreaterThanOrEqualTo, " >= ");
|
||||
OPERATOR_MAP.put(Operator.IsGreaterThan, " > ");
|
||||
OPERATOR_MAP.put(Operator.IsLessThanOrEqualTo, " <= ");
|
||||
OPERATOR_MAP.put(Operator.IsLessThan, " < ");
|
||||
OPERATOR_MAP.put(Operator.Like, " like ");
|
||||
OPERATOR_MAP.put(Operator.IsNull, " is null");
|
||||
OPERATOR_MAP.put(Operator.IsFalse, " = false");
|
||||
OPERATOR_MAP.put(Operator.IsTrue, " = true");
|
||||
OPERATOR_MAP.put(Operator.StartsWith, " = ");
|
||||
OPERATOR_MAP.put(Operator.Contains, " = ");
|
||||
}
|
||||
|
||||
protected static class AttributeCondition extends ExchangeSession.AttributeCondition {
|
||||
@ -802,7 +802,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
public void appendTo(StringBuilder buffer) {
|
||||
Field field = Field.get(attributeName);
|
||||
buffer.append('"').append(field.getUri()).append('"');
|
||||
buffer.append(operatorMap.get(operator));
|
||||
buffer.append(OPERATOR_MAP.get(operator));
|
||||
//noinspection VariableNotUsedInsideIf
|
||||
if (field.cast != null) {
|
||||
buffer.append("CAST (\"");
|
||||
@ -864,7 +864,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
@Override
|
||||
public void appendTo(StringBuilder buffer) {
|
||||
buffer.append('"').append(Field.getHeader(attributeName).getUri()).append('"');
|
||||
buffer.append(operatorMap.get(operator));
|
||||
buffer.append(OPERATOR_MAP.get(operator));
|
||||
buffer.append('\'');
|
||||
if (Operator.Like == operator) {
|
||||
buffer.append('%');
|
||||
@ -884,7 +884,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
|
||||
public void appendTo(StringBuilder buffer) {
|
||||
buffer.append('"').append(Field.get(attributeName).getUri()).append('"');
|
||||
buffer.append(operatorMap.get(operator));
|
||||
buffer.append(OPERATOR_MAP.get(operator));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ import java.util.*;
|
||||
* Supports extended property update with type.
|
||||
*/
|
||||
public class ExchangePropPatchMethod extends PostMethod {
|
||||
protected static final Logger logger = Logger.getLogger(ExchangePropPatchMethod.class);
|
||||
protected static final Logger LOGGER = Logger.getLogger(ExchangePropPatchMethod.class);
|
||||
|
||||
static final String TYPE_NAMESPACE = "urn:schemas-microsoft-com:datatypes";
|
||||
final Set<PropertyValue> propertyValues;
|
||||
@ -202,9 +202,9 @@ public class ExchangePropPatchMethod extends PostMethod {
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
logger.error("Error while parsing soap response: " + e, e);
|
||||
LOGGER.error("Error while parsing soap response: " + e, e);
|
||||
} catch (XMLStreamException e) {
|
||||
logger.error("Error while parsing soap response: " + e, e);
|
||||
LOGGER.error("Error while parsing soap response: " + e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Item update conflict resolution
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc"})
|
||||
public class ConflictResolution extends AttributeOption {
|
||||
public final class ConflictResolution extends AttributeOption {
|
||||
private ConflictResolution(String value) {
|
||||
super("ConflictResolution", value);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Contains comparison mode.
|
||||
*/
|
||||
@SuppressWarnings({"UnusedDeclaration", "JavaDoc"})
|
||||
public class ContainmentComparison extends AttributeOption {
|
||||
public final class ContainmentComparison extends AttributeOption {
|
||||
private ContainmentComparison(String value) {
|
||||
super("ContainmentComparison", value);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Contains search mode.
|
||||
*/
|
||||
@SuppressWarnings({"UnusedDeclaration", "JavaDoc"})
|
||||
public class ContainmentMode extends AttributeOption {
|
||||
public final class ContainmentMode extends AttributeOption {
|
||||
private ContainmentMode(String value) {
|
||||
super("ContainmentMode", value);
|
||||
}
|
||||
|
@ -30,6 +30,6 @@ public class DeleteFolderMethod extends EWSMethod {
|
||||
public DeleteFolderMethod(FolderId folderId) {
|
||||
super("Folder", "DeleteFolder");
|
||||
this.folderId = folderId;
|
||||
this.deleteType = Disposal.HARD_DELETE;
|
||||
this.deleteType = Disposal.HardDelete;
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,12 @@ package davmail.exchange.ews;
|
||||
* Disposal.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc"})
|
||||
public class Disposal extends AttributeOption {
|
||||
public final class Disposal extends AttributeOption {
|
||||
private Disposal(String value) {
|
||||
super("DeleteType", value);
|
||||
}
|
||||
|
||||
public static final Disposal HARD_DELETE = new Disposal("HardDelete");
|
||||
public static final Disposal SOFT_DELETE = new Disposal("SoftDelete");
|
||||
public static final Disposal MOVE_TO_DELETED_ITEMS = new Disposal("MoveToDeletedItems");
|
||||
public static final Disposal HardDelete = new Disposal("HardDelete");
|
||||
public static final Disposal SoftDelete = new Disposal("SoftDelete");
|
||||
public static final Disposal MoveToDeletedItems = new Disposal("MoveToDeletedItems");
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Distinguished Folder Id.
|
||||
*/
|
||||
public class DistinguishedFolderId extends FolderId {
|
||||
public final class DistinguishedFolderId extends FolderId {
|
||||
|
||||
private DistinguishedFolderId(String value) {
|
||||
super("t:DistinguishedFolderId", value, null);
|
||||
|
@ -40,7 +40,7 @@ import java.util.*;
|
||||
* EWS SOAP method.
|
||||
*/
|
||||
public abstract class EWSMethod extends PostMethod {
|
||||
protected static final Logger logger = Logger.getLogger(EWSMethod.class);
|
||||
protected static final Logger LOGGER = Logger.getLogger(EWSMethod.class);
|
||||
|
||||
protected FolderQueryTraversal traversal;
|
||||
protected BaseShape baseShape;
|
||||
@ -930,7 +930,7 @@ public abstract class EWSMethod extends PostMethod {
|
||||
try {
|
||||
processResponseStream(getResponseBodyAsStream());
|
||||
} catch (IOException e) {
|
||||
logger.error("Error while parsing soap response: " + e, e);
|
||||
LOGGER.error("Error while parsing soap response: " + e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -960,10 +960,10 @@ public abstract class EWSMethod extends PostMethod {
|
||||
}
|
||||
|
||||
} catch (XMLStreamException e) {
|
||||
logger.error("Error while parsing soap response: " + e, e);
|
||||
LOGGER.error("Error while parsing soap response: " + e, e);
|
||||
}
|
||||
if (errorDetail != null) {
|
||||
logger.debug(errorDetail);
|
||||
LOGGER.debug(errorDetail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
|
||||
protected static final int PAGE_SIZE = 100;
|
||||
|
||||
protected static Set<String> MESSAGE_TYPES = new HashSet<String>();
|
||||
protected static final Set<String> MESSAGE_TYPES = new HashSet<String>();
|
||||
|
||||
static {
|
||||
MESSAGE_TYPES.add("Message");
|
||||
|
@ -24,7 +24,7 @@ import java.util.Map;
|
||||
/**
|
||||
* EWS MAPI fields;
|
||||
*/
|
||||
public class Field {
|
||||
public final class Field {
|
||||
protected static final Map<String, FieldURI> FIELD_MAP = new HashMap<String, FieldURI>();
|
||||
|
||||
private Field() {
|
||||
|
@ -28,7 +28,7 @@ public interface FieldURI {
|
||||
*
|
||||
* @param buffer current buffer
|
||||
*/
|
||||
public void appendTo(StringBuilder buffer);
|
||||
void appendTo(StringBuilder buffer);
|
||||
|
||||
/**
|
||||
* Append updated field value to buffer
|
||||
@ -37,13 +37,13 @@ public interface FieldURI {
|
||||
* @param itemType item type
|
||||
* @param value field value
|
||||
*/
|
||||
public void appendValue(StringBuilder buffer, String itemType, String value);
|
||||
void appendValue(StringBuilder buffer, String itemType, String value);
|
||||
|
||||
/**
|
||||
* Property name in EWS response.
|
||||
*
|
||||
* @return property name
|
||||
*/
|
||||
public String getResponseName();
|
||||
String getResponseName();
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* MessageDisposition flag.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc", "UnusedDeclaration"})
|
||||
public class MessageDisposition extends AttributeOption {
|
||||
public final class MessageDisposition extends AttributeOption {
|
||||
|
||||
private MessageDisposition(String value) {
|
||||
super("MessageDisposition", value);
|
||||
|
@ -27,5 +27,5 @@ public interface SearchExpression {
|
||||
*
|
||||
* @param buffer search buffer
|
||||
*/
|
||||
public void appendTo(StringBuilder buffer);
|
||||
void appendTo(StringBuilder buffer);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* ResolveNames search scope.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc", "UnusedDeclaration"})
|
||||
public class SearchScope extends AttributeOption {
|
||||
public final class SearchScope extends AttributeOption {
|
||||
private SearchScope(String value) {
|
||||
super("SearchScope", value);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Item update option.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc", "UnusedDeclaration"})
|
||||
public class SendMeetingCancellations extends AttributeOption {
|
||||
public final class SendMeetingCancellations extends AttributeOption {
|
||||
private SendMeetingCancellations(String value) {
|
||||
super("SendMeetingCancellations", value);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Item update option.
|
||||
*/
|
||||
@SuppressWarnings({"UnusedDeclaration", "JavaDoc"})
|
||||
public class SendMeetingInvitations extends AttributeOption {
|
||||
public final class SendMeetingInvitations extends AttributeOption {
|
||||
private SendMeetingInvitations(String value) {
|
||||
super("SendMeetingInvitations", value);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* Item update option.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc", "UnusedDeclaration"})
|
||||
public class SendMeetingInvitationsOrCancellations extends AttributeOption {
|
||||
public final class SendMeetingInvitationsOrCancellations extends AttributeOption {
|
||||
private SendMeetingInvitationsOrCancellations(String value) {
|
||||
super("SendMeetingInvitationsOrCancellations", value);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import davmail.ui.PasswordPromptDialog;
|
||||
/**
|
||||
* Ask user one time password.
|
||||
*/
|
||||
public class DavGatewayOTPPrompt {
|
||||
public final class DavGatewayOTPPrompt {
|
||||
private DavGatewayOTPPrompt() {
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ import java.io.*;
|
||||
/**
|
||||
* Input output functions.
|
||||
*/
|
||||
public class IOUtil {
|
||||
public final class IOUtil {
|
||||
private IOUtil() {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user