mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1926 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
c34d7cb20e
commit
cfbb41dcde
@ -19,17 +19,11 @@
|
||||
package davmail.exchange.dav;
|
||||
|
||||
import davmail.util.StringUtil;
|
||||
import org.apache.jackrabbit.webdav.header.DepthHeader;
|
||||
import org.apache.jackrabbit.webdav.property.DavPropertyName;
|
||||
import org.apache.jackrabbit.webdav.property.DavPropertyNameIterator;
|
||||
import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Custom Exchange PROPFIND method.
|
||||
@ -40,13 +34,17 @@ public class ExchangeSearchMethod extends ExchangeDavMethod {
|
||||
|
||||
protected final String searchRequest;
|
||||
|
||||
/**
|
||||
* Create search method.
|
||||
*
|
||||
* @param uri method uri
|
||||
* @param searchRequest Exchange search request
|
||||
*/
|
||||
public ExchangeSearchMethod(String uri, String searchRequest) {
|
||||
super(uri);
|
||||
this.searchRequest = searchRequest;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected byte[] generateRequestContent() {
|
||||
try {
|
||||
|
||||
|
@ -22,7 +22,7 @@ package davmail.exchange.ews;
|
||||
* DeleteItem disposal type.
|
||||
*/
|
||||
@SuppressWarnings({"JavaDoc", "UnusedDeclaration"})
|
||||
public class DeleteType extends AttributeOption {
|
||||
public final class DeleteType extends AttributeOption {
|
||||
private DeleteType(String value) {
|
||||
super("DeleteType", value);
|
||||
}
|
||||
|
@ -18,8 +18,6 @@
|
||||
*/
|
||||
package davmail.exchange.ews;
|
||||
|
||||
import davmail.exchange.dav.PropertyType;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
}
|
||||
|
||||
protected void appendEnvelopeHeaderValue(StringBuilder buffer, String value) throws UnsupportedEncodingException {
|
||||
if (value.indexOf('"') >= 0 || value.indexOf("\\") >= 0) {
|
||||
if (value.indexOf('"') >= 0 || value.indexOf('\\') >= 0) {
|
||||
buffer.append('{');
|
||||
buffer.append(value.length());
|
||||
buffer.append("}\r\n");
|
||||
|
@ -512,7 +512,7 @@ public class LdapConnection extends AbstractConnection {
|
||||
DavGatewayTray.resetIcon();
|
||||
}
|
||||
|
||||
protected static final byte[] EMPTY_BYTE_ARRAY= new byte[0];
|
||||
protected static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
|
||||
|
||||
protected void handleRequest(byte[] inbuf, int offset) throws IOException {
|
||||
//dumpBer(inbuf, offset);
|
||||
@ -545,12 +545,12 @@ public class LdapConnection extends AbstractConnection {
|
||||
}
|
||||
}
|
||||
// handle other callbacks
|
||||
for (Callback callback:callbacks) {
|
||||
for (Callback callback : callbacks) {
|
||||
if (callback instanceof AuthorizeCallback) {
|
||||
((AuthorizeCallback)callback).setAuthorized(true);
|
||||
((AuthorizeCallback) callback).setAuthorized(true);
|
||||
} else if (callback instanceof PasswordCallback) {
|
||||
if (password != null) {
|
||||
((PasswordCallback)callback).setPassword(password.toCharArray());
|
||||
((PasswordCallback) callback).setPassword(password.toCharArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1630,7 +1630,7 @@ public class LdapConnection extends AbstractConnection {
|
||||
try {
|
||||
calendar.setTime(parser.parse(value));
|
||||
} catch (ParseException e) {
|
||||
throw new IOException(e);
|
||||
throw new IOException(e + " " + e.getMessage());
|
||||
}
|
||||
if ("birthday".equals(ldapAttribute)) {
|
||||
value = String.valueOf(calendar.get(Calendar.DAY_OF_MONTH));
|
||||
|
@ -23,7 +23,6 @@ import davmail.ui.tray.DavGatewayTray;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.border.LineBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -68,6 +67,7 @@ public class PasswordPromptDialog extends JDialog {
|
||||
|
||||
setTitle(BundleMessage.format("UI_PASSWORD_PROMPT"));
|
||||
try {
|
||||
//noinspection Since15
|
||||
setIconImage(DavGatewayTray.getFrameIcon());
|
||||
} catch (NoSuchMethodError error) {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_UNABLE_TO_SET_ICON_IMAGE"));
|
||||
|
@ -381,7 +381,7 @@ public class SettingsFrame extends JFrame {
|
||||
allowRemoteField.setSelected(Settings.getBooleanProperty("davmail.allowRemote"));
|
||||
|
||||
bindAddressField = new JTextField(Settings.getProperty("davmail.bindAddress"), 15);
|
||||
clientSoTimeoutField = new JTextField(Settings.getProperty("davmail.clientSoTimeout"), 15);;
|
||||
clientSoTimeoutField = new JTextField(Settings.getProperty("davmail.clientSoTimeout"), 15);
|
||||
|
||||
certHashField = new JTextField(Settings.getProperty("davmail.server.certificate.hash"), 15);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user