diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-07-22 07:13:40 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2015-07-22 07:13:40 +0200 |
commit | da4c982d256f3cccd609378e8974da70831c708b (patch) | |
tree | e94f476c8db60321f7470283b9a74fa67a0378ed /id | |
parent | fa22d2f7f43d1faa8c3ce12ada3802e9c55c4d33 (diff) | |
download | moa-id-spss-da4c982d256f3cccd609378e8974da70831c708b.tar.gz moa-id-spss-da4c982d256f3cccd609378e8974da70831c708b.tar.bz2 moa-id-spss-da4c982d256f3cccd609378e8974da70831c708b.zip |
fix bug in methode findNextFreeListCounter if actually no list exists
Diffstat (limited to 'id')
-rw-r--r-- | id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/KeyValueUtils.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/KeyValueUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/KeyValueUtils.java index 04eb30f72..8f3a8402d 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/KeyValueUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/KeyValueUtils.java @@ -224,7 +224,12 @@ public class KeyValueUtils { */ public static int findNextFreeListCounter(Set<String> keySet, String listPrefix) { - return findNextFreeListCounter((String[]) keySet.toArray(), listPrefix); + if (keySet.isEmpty()) + return 0; + + String[] array = new String[keySet.size()]; + keySet.toArray(array); + return findNextFreeListCounter(array, listPrefix); } |