ws-security-common/src/main/java/org/apache/wss4j/common/util/NSStack.java [145:166]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void add(String namespaceURI, String prefix) {
        int idx = top;
        try {
            // Replace duplicate prefixes (last wins - this could also fault)
            for (int cursor = top; stack[cursor] != null; cursor--) {
                if (stack[cursor].getPrefix().equals(prefix)) {
                    stack[cursor].setNamespaceURI(namespaceURI);
                    idx = cursor;
                    return;
                }
            }
            push();
            stack[top] = new Mapping(namespaceURI, prefix);
            idx = top;
        } finally {
            // If this is the default namespace, note the new in-scope
            // default is here.
            if (prefix.length() == 0) {
                currentDefaultNS = idx;
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



policy/src/main/java/org/apache/wss4j/policy/model/NSStack.java [135:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void add(String namespaceURI, String prefix) {
        int idx = top;
        try {
            // Replace duplicate prefixes (last wins - this could also fault)
            for (int cursor = top; stack[cursor] != null; cursor--) {
                if (stack[cursor].getPrefix().equals(prefix)) {
                    stack[cursor].setNamespaceURI(namespaceURI);
                    idx = cursor;
                    return;
                }
            }
            push();
            stack[top] = new Mapping(namespaceURI, prefix);
            idx = top;
        } finally {
            // If this is the default namespace, note the new in-scope
            // default is here.
            if (prefix.length() == 0) {
                currentDefaultNS = idx;
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



