mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
Fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@786 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
0197b4eaa7
commit
fd1719e10a
@ -142,7 +142,6 @@ public class ExchangeSession {
|
||||
private final HttpClient httpClient;
|
||||
|
||||
private final String userName;
|
||||
private final String password;
|
||||
|
||||
private boolean disableGalLookup;
|
||||
private static final String YYYY_MM_DD_HH_MM_SS = "yyyy/MM/dd HH:mm:ss";
|
||||
@ -170,7 +169,6 @@ public class ExchangeSession {
|
||||
*/
|
||||
ExchangeSession(String url, String userName, String password) throws IOException {
|
||||
this.userName = userName;
|
||||
this.password = password;
|
||||
try {
|
||||
boolean isBasicAuthentication = isBasicAuthentication(url);
|
||||
|
||||
@ -270,18 +268,6 @@ public class ExchangeSession {
|
||||
return isExpired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare credentials to current session credentials.
|
||||
*
|
||||
* @param userName user name
|
||||
* @param password user password
|
||||
* @return true if credentials match
|
||||
*/
|
||||
public boolean checkCredentials(String userName, String password) {
|
||||
return userName != null && password != null
|
||||
&& userName.equals(this.userName) && password.equals(this.password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test authentication mode : form based or basic.
|
||||
*
|
||||
@ -1762,8 +1748,9 @@ public class ExchangeSession {
|
||||
}
|
||||
});
|
||||
for (File file : oldestFiles) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
file.delete();
|
||||
if (!file.delete()) {
|
||||
LOGGER.warn("Unable to delete " + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LOGGER.warn("Error deleting ics dump: " + ex.getMessage());
|
||||
|
@ -990,8 +990,7 @@ public class LdapConnection extends AbstractConnection {
|
||||
|
||||
static class CompoundFilter implements LdapFilter {
|
||||
final Set<LdapFilter> criteria = new HashSet<LdapFilter>();
|
||||
int type;
|
||||
|
||||
final int type;
|
||||
|
||||
CompoundFilter(int filterType) {
|
||||
type = filterType;
|
||||
@ -1166,7 +1165,7 @@ public class LdapConnection extends AbstractConnection {
|
||||
final String value;
|
||||
final int mode;
|
||||
final int operator;
|
||||
boolean canIgnore;
|
||||
final boolean canIgnore;
|
||||
|
||||
SimpleFilter(String attributeName) {
|
||||
this.attributeName = attributeName;
|
||||
|
Loading…
Reference in New Issue
Block a user