Commit 94c76196 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Narrowed type definitions of collections.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1688 b35dd754-fafc-0310-a699-88a17e54d16e
parent 18cc4f4a
...@@ -98,7 +98,7 @@ public class Group implements Cacheable { ...@@ -98,7 +98,7 @@ public class Group implements Cacheable {
groupManager.groupCache.put(name, this); groupManager.groupCache.put(name, this);
// Fire event. // Fire event.
Map params = new HashMap(); Map<String, Object> params = new HashMap<String, Object>();
params.put("type", "nameModified"); params.put("type", "nameModified");
params.put("originalValue", originalName); params.put("originalValue", originalName);
GroupEventDispatcher.dispatchEvent(this, GroupEventDispatcher.EventType.group_modified, GroupEventDispatcher.dispatchEvent(this, GroupEventDispatcher.EventType.group_modified,
...@@ -133,7 +133,7 @@ public class Group implements Cacheable { ...@@ -133,7 +133,7 @@ public class Group implements Cacheable {
provider.setDescription(name, description); provider.setDescription(name, description);
this.description = description; this.description = description;
// Fire event. // Fire event.
Map params = new HashMap(); Map<String, Object> params = new HashMap<String, Object>();
params.put("type", "descriptionModified"); params.put("type", "descriptionModified");
params.put("originalValue", originalDescription); params.put("originalValue", originalDescription);
GroupEventDispatcher.dispatchEvent(this, GroupEventDispatcher.dispatchEvent(this,
...@@ -241,13 +241,13 @@ public class Group implements Cacheable { ...@@ -241,13 +241,13 @@ public class Group implements Cacheable {
provider.deleteMember(name, user); provider.deleteMember(name, user);
// Fire event. // Fire event.
if (adminCollection) { if (adminCollection) {
Map params = new HashMap(); Map<String, String> params = new HashMap<String, String>();
params.put("admin", user); params.put("admin", user);
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.admin_removed, params); GroupEventDispatcher.EventType.admin_removed, params);
} }
else { else {
Map params = new HashMap(); Map<String, String> params = new HashMap<String, String>();
params.put("member", user); params.put("member", user);
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.member_removed, params); GroupEventDispatcher.EventType.member_removed, params);
...@@ -289,7 +289,7 @@ public class Group implements Cacheable { ...@@ -289,7 +289,7 @@ public class Group implements Cacheable {
// Fire event. // Fire event.
if (adminCollection) { if (adminCollection) {
Map params = new HashMap(); Map<String, String> params = new HashMap<String, String>();
params.put("admin", username); params.put("admin", username);
if (alreadyGroupUser) { if (alreadyGroupUser) {
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
...@@ -299,7 +299,7 @@ public class Group implements Cacheable { ...@@ -299,7 +299,7 @@ public class Group implements Cacheable {
GroupEventDispatcher.EventType.admin_added, params); GroupEventDispatcher.EventType.admin_added, params);
} }
else { else {
Map params = new HashMap(); Map<String, String> params = new HashMap<String, String>();
params.put("member", username); params.put("member", username);
if (alreadyGroupUser) { if (alreadyGroupUser) {
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
...@@ -337,12 +337,12 @@ public class Group implements Cacheable { ...@@ -337,12 +337,12 @@ public class Group implements Cacheable {
if (key == null || value == null) { if (key == null || value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
Map eventParams = new HashMap(); Map<String, Object> eventParams = new HashMap<String, Object>();
Object answer; Object answer;
String keyString = (String) key; String keyString = (String) key;
synchronized (keyString.intern()) { synchronized (keyString.intern()) {
if (properties.containsKey(key)) { if (properties.containsKey(keyString)) {
String originalValue = properties.get(key); String originalValue = properties.get(keyString);
answer = properties.put(keyString, (String)value); answer = properties.put(keyString, (String)value);
updateProperty(keyString, (String)value); updateProperty(keyString, (String)value);
// Configure event. // Configure event.
...@@ -401,7 +401,7 @@ public class Group implements Cacheable { ...@@ -401,7 +401,7 @@ public class Group implements Cacheable {
deleteProperty(key); deleteProperty(key);
iter.remove(); iter.remove();
// Fire event. // Fire event.
Map params = new HashMap(); Map<String, Object> params = new HashMap<String, Object>();
params.put("type", "propertyDeleted"); params.put("type", "propertyDeleted");
params.put("propertyKey", key); params.put("propertyKey", key);
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment