Skip to content

Commit b4e7835

Browse files
[MOD] SeqType instance checks: faster shortcut
1 parent f04e7e9 commit b4e7835

File tree

1 file changed

+1
-2
lines changed
  • basex-core/src/main/java/org/basex/query/value/type

1 file changed

+1
-2
lines changed

basex-core/src/main/java/org/basex/query/value/type/SeqType.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ private boolean instance(final Value value, final boolean coerce) {
147147

148148
// try shortcut (type of value may be specific enough)
149149
if(!(coerce && type instanceof FType || type instanceof ChoiceItemType)) {
150-
final SeqType st = value.seqType();
151-
if(st.type.instanceOf(type) && st.testInstanceOf(this)) return true;
150+
if(value.type.instanceOf(type) && test == null) return true;
152151
}
153152
// check single item
154153
if(size == 1) return instance((Item) value, coerce);

0 commit comments

Comments
 (0)