mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Cleanup from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@476 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
0889191527
commit
a0ebe90328
@ -23,37 +23,6 @@ public final class XMLStreamUtil {
|
||||
return inputFactory;
|
||||
}
|
||||
|
||||
public static String getElementContentByLocalName(InputStream inputStream, String localName) throws IOException {
|
||||
String elementContent = null;
|
||||
XMLStreamReader reader = null;
|
||||
try {
|
||||
XMLInputFactory inputFactory = getXmlInputFactory();
|
||||
|
||||
reader = inputFactory.createXMLStreamReader(inputStream);
|
||||
boolean inElement = false;
|
||||
while (reader.hasNext()) {
|
||||
int event = reader.next();
|
||||
if (event == XMLStreamConstants.START_ELEMENT && localName.equals(reader.getLocalName())) {
|
||||
inElement = true;
|
||||
} else if (event == XMLStreamConstants.CHARACTERS && inElement) {
|
||||
elementContent = reader.getText();
|
||||
inElement = false;
|
||||
}
|
||||
}
|
||||
} catch (XMLStreamException e) {
|
||||
throw new IOException(e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
if (reader != null) {
|
||||
reader.close();
|
||||
}
|
||||
} catch (XMLStreamException e) {
|
||||
ExchangeSession.LOGGER.error(e);
|
||||
}
|
||||
}
|
||||
return elementContent;
|
||||
}
|
||||
|
||||
public static Map<String,Map<String,String>> getElementContentsAsMap(InputStream inputStream, String rowName, String idName) throws IOException {
|
||||
Map<String,Map<String,String>> results = new HashMap<String,Map<String,String>>();
|
||||
Map<String, String> item = null;
|
||||
|
@ -850,11 +850,11 @@ public class LdapConnection extends AbstractConnection {
|
||||
}
|
||||
|
||||
class LdapFilter {
|
||||
StringBuilder filterString = new StringBuilder();
|
||||
final StringBuilder filterString = new StringBuilder();
|
||||
int ldapFilterType = 0;
|
||||
boolean isFullSearch = true;
|
||||
Map<String, SimpleFilter> orCriteria = new HashMap<String, SimpleFilter>();
|
||||
Map<String, SimpleFilter> andCriteria = new HashMap<String, SimpleFilter>();
|
||||
final Map<String, SimpleFilter> orCriteria = new HashMap<String, SimpleFilter>();
|
||||
final Map<String, SimpleFilter> andCriteria = new HashMap<String, SimpleFilter>();
|
||||
|
||||
public void addFilter(String attributeName, SimpleFilter simpleFilter) {
|
||||
filterString.append('(').append(attributeName).append('=').append(simpleFilter.value).append(')');
|
||||
|
@ -8,9 +8,6 @@ import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Principal;
|
||||
import java.security.cert.CertificateEncodingException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
Loading…
x
Reference in New Issue
Block a user