Skip to content

Commit 6586624

Browse files
author
pborissow
committed
- Minor bug fixes
git-svn-id: svn://192.168.0.80/JavaXT/javaxt-exchange@1601 2c7b0aa6-e0b2-3c4e-bb4a-8b65b6c465ff
1 parent c40a301 commit 6586624

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

src/javaxt/exchange/CalendarEvent.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ else if (nodeName.equalsIgnoreCase("End")){
155155
}
156156
catch(java.text.ParseException e){}
157157
}
158-
else if (nodeName.equalsIgnoreCase("TimeZone")){
158+
else if (nodeName.equalsIgnoreCase("TimeZone")){
159159
timezone = javaxt.xml.DOM.getNodeValue(outerNode);
160160
}
161161
else if(nodeName.equalsIgnoreCase("IsAllDayEvent")){
@@ -184,7 +184,7 @@ else if(nodeName.equalsIgnoreCase("OptionalAttendees")){
184184
setTimeZone(timezone);
185185
}
186186

187-
187+
188188
//**************************************************************************
189189
//** getMailbox
190190
//**************************************************************************
@@ -203,7 +203,7 @@ private Mailbox getMailbox(org.w3c.dom.Node node, Connection conn){
203203
catch(Exception ex){
204204
ex.printStackTrace();
205205
}
206-
206+
207207
return null;
208208
}
209209
}
@@ -629,7 +629,7 @@ public boolean isAllDayEvent(){
629629
public void setAllDayEvent(javaxt.utils.Date date){
630630
try{
631631
String d1 = date.toString("MM/dd/yyyy");
632-
java.util.Date d2 = new javaxt.utils.Date(d1).add(1, "day");
632+
javaxt.utils.Date d2 = new javaxt.utils.Date(d1).add(1, "day");
633633
this.setStartTime(d1);
634634
this.setEndTime(d2);
635635
//IsAllDayEvent
@@ -699,8 +699,8 @@ public void setReminder(Integer reminder){
699699

700700

701701

702-
703-
702+
703+
704704
private String create(Connection conn) throws ExchangeException {
705705

706706
StringBuffer msg = new StringBuffer();
@@ -746,14 +746,14 @@ private String create(Connection conn) throws ExchangeException {
746746
*/
747747

748748
if (getSubject()!=null) msg.append("<t:Subject>" + subject + "</t:Subject>");
749-
749+
750750
//Add body
751751
if (getBody()!=null){
752752
msg.append("<t:Body BodyType=\"" + getBodyType() + "\">");
753753
msg.append(wrap(body));
754754
msg.append("</t:Body>");
755755
};
756-
756+
757757

758758
//Add categories
759759
if (!categories.isEmpty()){
@@ -807,7 +807,7 @@ private String create(Connection conn) throws ExchangeException {
807807
}
808808
msg.append("</t:RequiredAttendees>");
809809
}
810-
810+
811811

812812
if (attendees.values().contains(false)){
813813
msg.append("<t:OptionalAttendees>");
@@ -841,7 +841,7 @@ private String create(Connection conn) throws ExchangeException {
841841
return id;
842842
}
843843

844-
844+
845845
//**************************************************************************
846846
//** save
847847
//**************************************************************************
@@ -858,11 +858,11 @@ public String save(Connection conn) throws ExchangeException {
858858

859859
//Update last modified date
860860
this.lastModified = new CalendarEvent(id, conn).getLastModifiedTime();
861-
861+
862862
return id;
863863
}
864864

865-
865+
866866
//**************************************************************************
867867
//** delete
868868
//**************************************************************************

src/javaxt/exchange/ExtendedFieldURI.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class ExtendedFieldURI extends FieldURI {
2020
/** Creates a new instance of this class.
2121
* @param id A unique id in the form of a Microsoft GUID.
2222
* @param name Property name.
23-
* @param name Property type (e.g. "String", "Integer", "Boolean",
23+
* @param type Property type (e.g. "String", "Integer", "Boolean",
2424
* "SystemTime", etc).
2525
*/
2626
public ExtendedFieldURI(String id, String name, String type){
@@ -67,7 +67,7 @@ else if (childNodeName.equalsIgnoreCase("Value")){
6767

6868
//TODO: Convert the value to a proper type before instantiating the Value class
6969
javaxt.utils.Value val = new javaxt.utils.Value(value);
70-
70+
7171

7272
return new Object[]{new ExtendedFieldURI(id, name, type), val};
7373
}
@@ -130,7 +130,7 @@ protected String toXML(String namespace, String operation, javaxt.utils.Value va
130130
}
131131

132132
StringBuffer xml = new StringBuffer();
133-
if (operation.equalsIgnoreCase("create")){
133+
if (operation.equalsIgnoreCase("create")){
134134
xml.append("<" + namespace + "ExtendedProperty>");
135135
xml.append("<" + namespace + "ExtendedFieldURI PropertySetId=\"" + id + "\" PropertyName=\"" + name + "\" PropertyType=\"" + type + "\" />");
136136
xml.append("<" + namespace + "Value>" + value + "</" + namespace + "Value>");
@@ -156,20 +156,20 @@ else if(operation.equalsIgnoreCase("delete")){
156156
return xml.toString();
157157
}
158158

159-
159+
160160
public String toXML(String namespace){
161161
String idAttr = (id==null ? "" : "PropertySetId=\"" + id + "\"");
162162
String nameAttr = (name.startsWith("0x") ? "PropertyTag=\"" + name + "\"" : "PropertyName=\"" + name + "\"");
163163
String typeAttr = "PropertyType=\"" + type + "\"";
164164
return "<" + namespace + ":ExtendedFieldURI " + nameAttr + " " + idAttr + " " + typeAttr + "/>";
165165
}
166166

167-
167+
168168
public String toString(){
169169
return name;
170170
}
171171

172-
public int hashCode(){
172+
public int hashCode(){
173173
return name.startsWith("0x") ? name.hashCode() : id.toUpperCase().hashCode();
174174
}
175175

src/javaxt/exchange/FolderItem.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class FolderItem {
7474

7575
private org.w3c.dom.Node node;
7676

77-
77+
7878
protected FolderItem(){}
7979

8080

@@ -343,7 +343,7 @@ public void setLastModifiedTime(javaxt.utils.Date lastModified){
343343
this.lastModified = lastModified;
344344
}
345345

346-
346+
347347
//**************************************************************************
348348
//** getChangeKey
349349
//**************************************************************************
@@ -499,11 +499,11 @@ public Attachment[] getAttachments(){
499499
if (attachments.isEmpty()) return null;
500500
else return attachments.toArray(new Attachment[attachments.size()]);
501501
}
502-
502+
503503
public void removeAttachment(Attachment attachment){
504504
attachments.remove(attachment);
505505
}
506-
506+
507507
public void addAttachment(Attachment attachment){
508508
attachments.add(attachment);
509509
}
@@ -627,9 +627,8 @@ public void removeCategories(){
627627
* @param name The name of the ExtendedFieldURI associated with the ExtendedProperty
628628
*/
629629
public Value getExtendedProperty(String name){
630-
java.util.Iterator<ExtendedFieldURI> it = extendedProperties.keySet().iterator();
631-
while (it.hasNext()){
632-
ExtendedFieldURI key = it.next();
630+
for (ExtendedFieldURI key : extendedProperties.keySet()){
631+
if (key==null) continue;
633632
if (key.getName().equalsIgnoreCase(name))
634633
return extendedProperties.get(key);
635634
}
@@ -774,7 +773,7 @@ private String getExtendedPropertyUpdates(){
774773

775774
java.util.Iterator<ExtendedFieldURI> it = extendedProperties.keySet().iterator();
776775
while (it.hasNext()){
777-
776+
778777
ExtendedFieldURI property = it.next();
779778
Value value = extendedProperties.get(property);
780779

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy