- if (!advertisedDesc.isEmpty()) {
- Property desc = new Description(advertisedDesc);
- propMap.put(Description.propertyName, desc);
+ if (advertisedDesc != null) {
+ if (!advertisedDesc.isEmpty()) {
+ Property desc = new Description(advertisedDesc);
+ propMap.put(Description.propertyName, desc);
+ }
+ }
+ else {
+ propMap.remove(prop);