We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31164a commit a5af65bCopy full SHA for a5af65b
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/mapping/RadixTree.java
@@ -83,9 +83,12 @@ public T addPath(PathExpression path, T value) {
83
Node<T> child = getChild(current, segments[i]);
84
if (i == len - 1) {
85
List<Pair<PathExpression, T>> values = child.values;
86
- for (int j = 0, size = values.size(); j < size; j++) {
87
- if (values.get(j).getLeft().equals(path)) {
88
- return values.get(j).getRight();
+ for (Pair<PathExpression, T> pathExpressionTPair : values) {
+ if (pathExpressionTPair.getLeft().equals(path)) {
+ T rightVal = pathExpressionTPair.getRight();
89
+ if (rightVal.equals(value)) {
90
+ return rightVal;
91
+ }
92
}
93
94
values.add(Pair.of(path, value));
0 commit comments