Skip to content

Commit 1c0cf32

Browse files
committed
Enh 38425369 - [38207004->22.06.14] ENH: <well-known-addresses> should allow multiple addresses in override (14.1.1.2206 cl 117792 --> 22.06)
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v22.06/": change = 118584]
1 parent 13cbc98 commit 1c0cf32

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

prj/coherence-core/src/main/java/com/tangosol/run/xml/XmlHelper.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
@@ -1952,7 +1952,13 @@ public static void overrideElement(XmlElement xmlBase, XmlElement xmlOverride,
19521952
continue;
19531953
}
19541954

1955-
String sName = xmlOver.getName();
1955+
String sName = xmlOver.getName();
1956+
boolean fAllowMultiple = false;
1957+
1958+
if (sName.compareToIgnoreCase("address") == 0 && xmlOver.getParent().getName().compareToIgnoreCase("well-known-addresses") == 0)
1959+
{
1960+
fAllowMultiple = true;
1961+
}
19561962
Object oAttrId = sIdAttrName == null ?
19571963
xmlOver.getAttributeMap() : xmlOver.getAttribute(sIdAttrName);
19581964

@@ -1964,7 +1970,7 @@ public static void overrideElement(XmlElement xmlBase, XmlElement xmlOverride,
19641970
{
19651971
Object oAttrTest = sIdAttrName == null ?
19661972
xmlTest.getAttributeMap() : xmlTest.getAttribute(sIdAttrName);
1967-
if (equals(oAttrTest, oAttrId))
1973+
if (!fAllowMultiple && equals(oAttrTest, oAttrId))
19681974
{
19691975
throw new UnsupportedOperationException(
19701976
"Override element is not unique:\n" + xmlOver);

0 commit comments

Comments
 (0)