2005-08-01 duck

* Fix an addressbook NPE when a new hostname from the master addressbook
      didn't exist in the router addressbook.
    * Fix an addressbook bug which caused subscriptions not to be parsed at
      all. (Oops!)
This commit is contained in:
duck
2005-08-01 13:34:10 +00:00
committed by zzz
parent 03bba51c1e
commit 7227cae6ef

View File

@ -73,7 +73,7 @@ public class AddressBook {
null);
get.fetch();
try {
this.addresses = ConfigParser.parse("addressbook.tmp");
this.addresses = ConfigParser.parse(new File("addressbook.tmp"));
} catch (IOException exp) {
this.addresses = new HashMap();
}
@ -96,7 +96,7 @@ public class AddressBook {
get.fetch();
subscription.setEtag(get.getETag());
try {
this.addresses = ConfigParser.parse("addressbook.tmp");
this.addresses = ConfigParser.parse(new File("addressbook.tmp"));
} catch (IOException exp) {
this.addresses = new HashMap();
}
@ -178,8 +178,8 @@ public class AddressBook {
+ ". Destination in remote address book is "
+ otherValue);
}
} else {
if (!this.addresses.get(otherKey).equals(otherValue)) {
} else if (!this.addresses.containsKey(otherKey)
|| !this.addresses.get(otherKey).equals(otherValue)) {
this.addresses.put(otherKey, otherValue);
this.modified = true;
if (log != null) {
@ -190,7 +190,6 @@ public class AddressBook {
}
}
}
}
/**
* Write the contents of this AddressBook out to the File file. If the file