summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {