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

Fixes from audit

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1309 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-27 21:46:59 +00:00
parent 7222d08d44
commit dd287e282a
3 changed files with 2 additions and 10 deletions

View File

@ -1187,7 +1187,7 @@ public class CaldavConnection extends AbstractConnection {
} }
protected class CaldavRequest { protected static class CaldavRequest {
protected final String command; protected final String command;
protected final String path; protected final String path;
protected final String[] pathElements; protected final String[] pathElements;
@ -1361,17 +1361,12 @@ public class CaldavConnection extends AbstractConnection {
XMLStreamReader streamReader = null; XMLStreamReader streamReader = null;
try { try {
XMLInputFactory inputFactory = XMLStreamUtil.getXmlInputFactory(); XMLInputFactory inputFactory = XMLStreamUtil.getXmlInputFactory();
inputFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
inputFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.TRUE);
streamReader = inputFactory.createXMLStreamReader(new StringReader(body)); streamReader = inputFactory.createXMLStreamReader(new StringReader(body));
boolean inElement = false;
String tagLocalName = null;
while (streamReader.hasNext()) { while (streamReader.hasNext()) {
int event = streamReader.next(); int event = streamReader.next();
if (event == XMLStreamConstants.START_ELEMENT) { if (event == XMLStreamConstants.START_ELEMENT) {
inElement = true; String tagLocalName = streamReader.getLocalName();
tagLocalName = streamReader.getLocalName();
if ("prop".equals(tagLocalName)) { if ("prop".equals(tagLocalName)) {
handleProp(streamReader); handleProp(streamReader);
} else if ("calendar-multiget".equals(tagLocalName) } else if ("calendar-multiget".equals(tagLocalName)

View File

@ -2376,7 +2376,6 @@ public abstract class ExchangeSession {
String boundary = UUID.randomUUID().toString(); String boundary = UUID.randomUUID().toString();
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
MimeOutputStreamWriter writer = new MimeOutputStreamWriter(baos); MimeOutputStreamWriter writer = new MimeOutputStreamWriter(baos);
int status = 0;
String method = getICSMethod(itemBody); String method = getICSMethod(itemBody);
writer.writeHeader("Content-Transfer-Encoding", "7bit"); writer.writeHeader("Content-Transfer-Encoding", "7bit");

View File

@ -713,7 +713,6 @@ public class EwsExchangeSession extends ExchangeSession {
EWSMethod createOrUpdateItemMethod; EWSMethod createOrUpdateItemMethod;
// first try to load existing event // first try to load existing event
String urlcompname = convertItemNameToEML(itemName);
String currentEtag = null; String currentEtag = null;
ItemId currentItemId = null; ItemId currentItemId = null;
FileAttachment currentFileAttachment = null; FileAttachment currentFileAttachment = null;
@ -1048,7 +1047,6 @@ public class EwsExchangeSession extends ExchangeSession {
@Override @Override
public void processItem(String folderPath, String itemName) throws IOException { public void processItem(String folderPath, String itemName) throws IOException {
String urlcompname = convertItemNameToEML(itemName);
EWSMethod.Item item = getEwsItem(folderPath, itemName); EWSMethod.Item item = getEwsItem(folderPath, itemName);
if (item != null) { if (item != null) {
HashMap<String, String> localProperties = new HashMap<String, String>(); HashMap<String, String> localProperties = new HashMap<String, String>();