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> {
V originalValue = super.put(key, value);
// we only support persistence for <String, 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
updateProperty((String)key, (String)value, (String)originalValue);
} else {
......@@ -471,8 +473,8 @@ public class DefaultGroupPropertyMap<K,V> extends HashMap<K,V> {
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(UPDATE_PROPERTY);
pstmt.setString(1, key);
pstmt.setString(2, value);
pstmt.setString(1, value);
pstmt.setString(2, key);
pstmt.setString(3, group.getName());
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