Project

Profile

Help

Revision 595a16c4

Added by Michael Kay about 7 years ago

Fix bug 2238 - compatible configurations

View differences:

latest9.5/hej/net/sf/saxon/Configuration.java
3076 3076
        for (ExternalObjectModel model : externalObjectModels) {
3077 3077
            NodeInfo node = model.unravel(source, this);
3078 3078
            if (node != null) {
3079
                if (node.getConfiguration() != this) {
3079
                if (!node.getConfiguration().isCompatible(this)) {
3080 3080
                    throw new IllegalArgumentException("Externally supplied Node belongs to the wrong Configuration");
3081 3081
                }
3082 3082
                return node;
3083 3083
            }
3084 3084
        }
3085 3085
        if (source instanceof NodeInfo) {
3086
            if (((NodeInfo) source).getConfiguration() != this) {
3086
            if (!((NodeInfo) source).getConfiguration().isCompatible(this)) {
3087 3087
                throw new IllegalArgumentException("Externally supplied NodeInfo belongs to the wrong Configuration");
3088 3088
            }
3089 3089
            return (NodeInfo) source;

Also available in: Unified diff