Commit 61b4df3c authored by Tom Evans's avatar Tom Evans Committed by tevans

OF-278: Fix order for bind variables (group property update)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13421 b35dd754-fafc-0310-a699-88a17e54d16e
parent 00b35b88
...@@ -68,6 +68,8 @@ public class DefaultGroupPropertyMap<K,V> extends HashMap<K,V> { ...@@ -68,6 +68,8 @@ public class DefaultGroupPropertyMap<K,V> extends HashMap<K,V> {
V originalValue = super.put(key, value); V originalValue = super.put(key, value);
// we only support persistence for <String, String> // we only support persistence for <String, String>
if (persist && key instanceof String && value instanceof String) { if (persist && key instanceof String && value instanceof String) {
if (logger.isDebugEnabled())
logger.debug("Persisting group property [" + key + "]: " + value);
if (originalValue instanceof String) { // existing property if (originalValue instanceof String) { // existing property
updateProperty((String)key, (String)value, (String)originalValue); updateProperty((String)key, (String)value, (String)originalValue);
} else { } else {
...@@ -471,8 +473,8 @@ public class DefaultGroupPropertyMap<K,V> extends HashMap<K,V> { ...@@ -471,8 +473,8 @@ public class DefaultGroupPropertyMap<K,V> extends HashMap<K,V> {
try { try {
con = DbConnectionManager.getConnection(); con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(UPDATE_PROPERTY); pstmt = con.prepareStatement(UPDATE_PROPERTY);
pstmt.setString(1, key); pstmt.setString(1, value);
pstmt.setString(2, value); pstmt.setString(2, key);
pstmt.setString(3, group.getName()); pstmt.setString(3, group.getName());
pstmt.executeUpdate(); pstmt.executeUpdate();
} }
......
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