Project

Profile

Help

Bug #1636

java.lang.IllegalArgumentException: Unknown kind of CharSequence

Added by Michael Kay about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2012-10-13
Due date:
% Done:

100%

Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.4
Fixed in version:
9.4.0.7

Description

Reported by Gerrit Imsieke on the saxon-help list.

Internally, the problem occurs when appending a java.lang.StringBuffer to a net.sf.saxon.tree.tiny.LargeStringBuffer.

In the particular instance, the StringBuffer was constructed by the Unicode normalization library as a result of a call to normalize-unicode(). The problem in this case can be suppressed by disabling byte code generation, but that's accidental; in principle, it could occur on many other paths.

The primary solution is to allow LargeStringBuffer.append() to accept any kind of CharSequence, which is easily achieved by converting the supplied CharSequence (if of an unrecognized class) to a String.

Better performance can be obtained by converting the Unicode normalization library to use Saxon's FastStringBuffer in place of the standard Java StringBuffer.

A patch for 9.4 is being raised which will make the first change only. The second change will be made in the development branch.

History

#1 Updated by Michael Kay about 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Patch committed in 9.4 branch to LargeStringBuffer

#2 Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.4.0.7

Bug closed. Fixed in Saxon maintenance release 9.4.0.7

Also available in: Atom PDF