Permalink
Browse files

[bugfix] Pass-through for conversion to Item or Atomic

  • Loading branch information...
1 parent 51ecbb7 commit 00b91cacb10f32256ff81e14a7542321d62bac9d @adamretter adamretter committed Oct 13, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/org/exist/xquery/value/BinaryValue.java
@@ -167,11 +167,11 @@ public AtomicValue min(Collator collator, AtomicValue other) throws XPathExcepti
}
@Override
- public AtomicValue convertTo(int requiredType) throws XPathException {
+ public AtomicValue convertTo(final int requiredType) throws XPathException {
final AtomicValue result;
- if(requiredType == getType()) {
+ if(requiredType == getType() || requiredType == Type.ITEM || requiredType == Type.ATOMIC) {
result = this;
} else {
switch(requiredType) {
@@ -265,4 +265,4 @@ public void streamTo(OutputStream os) throws IOException {
public abstract InputStream getInputStream();
public abstract void close() throws IOException;
-}
+}

0 comments on commit 00b91ca

Please sign in to comment.