Project

Profile

Help

Revision 2cb4e220

Added by Michael Kay about 10 years ago

fix bug 3411093 NPE caused by namespace code of -1

View differences:

latest9.3/hej/net/sf/saxon/expr/instruct/FixedElement.java
195 195
     */
196 196

  
197 197
    public Expression copy() {
198
        FixedElement fe = new FixedElement(nameCode, namespaceCodes, inheritNamespaces, getSchemaType(), validation);
198
        int[] ns2 = namespaceCodes;
199
        if (namespaceCodes != null && namespaceCodes.length != 0) {
200
            ns2 = new int[namespaceCodes.length];
201
            System.arraycopy(namespaceCodes, 0, ns2, 0, ns2.length);
202
        }
203
        FixedElement fe = new FixedElement(nameCode, ns2, inheritNamespaces, getSchemaType(), validation);
199 204
        fe.setContentExpression(content.copy());
200 205
        fe.setBaseURI(getBaseURI());
201 206
        return fe;

Also available in: Unified diff