diff options
author | Damian Minkov <damencho@jitsi.org> | 2014-02-06 15:13:22 +0200 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2014-02-06 17:48:51 +0200 |
commit | 994e8bfe99a233d88db2e008a2dfe981846590b1 (patch) | |
tree | 5a2d644d755bbcecc6f65b79e1ac733ae2a2fe1f /src/net/java/sip/communicator/impl/configuration | |
parent | 02aa358e4f8ca6a776b3dfa5c0ee59718aa829ec (diff) | |
download | jitsi-994e8bfe99a233d88db2e008a2dfe981846590b1.zip jitsi-994e8bfe99a233d88db2e008a2dfe981846590b1.tar.gz jitsi-994e8bfe99a233d88db2e008a2dfe981846590b1.tar.bz2 |
Fixes removing properties with partial match, and adds tests for it.
Diffstat (limited to 'src/net/java/sip/communicator/impl/configuration')
-rw-r--r-- | src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java b/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java index e75068b..d290503 100644 --- a/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java +++ b/src/net/java/sip/communicator/impl/configuration/JdbcConfigService.java @@ -354,7 +354,7 @@ public final class JdbcConfigService //remove all properties for (String child : this.getPropertyNamesByPrefix(propertyName, false)) { - removeProperty(child); + this.setProperty(child, null, false); } this.setProperty(propertyName, null, false); @@ -411,15 +411,17 @@ public final class JdbcConfigService while (q.next()) { String key = q.getString(1); - int ix = key.lastIndexOf('.'); - if(ix == -1) - { - continue; - } - String keyPrefix = key.substring(0, ix); if(exactPrefixMatch) { + int ix = key.lastIndexOf('.'); + if(ix == -1) + { + continue; + } + + String keyPrefix = key.substring(0, ix); + if(prefix.equals(keyPrefix)) { resultSet.add(key); @@ -427,7 +429,7 @@ public final class JdbcConfigService } else { - if(keyPrefix.startsWith(prefix)) + if(key.startsWith(prefix)) { resultSet.add(key); } @@ -772,7 +774,6 @@ public final class JdbcConfigService { return "props.hsql.script"; } - /** * Loads the specified default properties maps from the Jitsi installation |