summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-11-30 10:48:53 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-11-30 10:48:53 +0000
commit70e67a5445d2c508e65f84beea1540653d71221a (patch)
tree6ec03e4d563452c6208900517d30208831138774
parent0119ce10b0ee065e7313be44a1633c62a6198b42 (diff)
Work around for Java bug with map entry setValue
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1208374 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/dom/ParserPool.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/dom/ParserPool.java b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/dom/ParserPool.java
index 6c987b39d4..e8187d481d 100644
--- a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/dom/ParserPool.java
+++ b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/dom/ParserPool.java
@@ -43,8 +43,11 @@ public abstract class ParserPool<V> {
while (true) {
for (Map.Entry<V, Boolean> e : objects.entrySet()) {
if (Boolean.FALSE.equals(e.getValue())) {
- e.setValue(Boolean.TRUE); // in use
- return e.getKey();
+ // setValue fails on some Harmony based JDKs, see https://issues.apache.org/jira/browse/HARMONY-6419
+ //e.setValue(Boolean.TRUE); // in use
+ V key = e.getKey();
+ objects.put(key, Boolean.TRUE); // in use
+ return key;
}
}
if (objects.size() < maxSize) {