Skip to content

Commit

Permalink
[bugfix] Fix an issue in the XQuery Inspection Module whereby QName#t…
Browse files Browse the repository at this point in the history
…oString() was being called instead of QName#getStringValue()
  • Loading branch information
adamretter committed Sep 10, 2023
1 parent adb5ea6 commit a1562de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static int generateDocs(final FunctionSignature sig, final UserDefinedFun
XQDocHelper.parse(sig);

final AttributesImpl attribs = new AttributesImpl();
attribs.addAttribute("", "name", "name", "CDATA", sig.getName().toString());
attribs.addAttribute("", "name", "name", "CDATA", sig.getName().getStringValue());
attribs.addAttribute("", "module", "module", "CDATA", sig.getName().getNamespaceURI());
final int nodeNr = builder.startElement(FUNCTION_QNAME, attribs);
writeParameters(sig, builder);
Expand Down Expand Up @@ -130,7 +130,7 @@ private static void writeAnnotations(final FunctionSignature signature, final Me
if (annots != null) {
for (final Annotation annot : annots) {
attribs.clear();
attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().toString());
attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().getStringValue());
attribs.addAttribute(null, "namespace", "namespace", "CDATA", annot.getName().getNamespaceURI());
builder.startElement(ANNOTATION_QNAME, attribs);
final LiteralValue[] value = annot.getValue();
Expand Down Expand Up @@ -164,7 +164,7 @@ private static void generateDependencies(final UserDefinedFunction function, fin
final AttributesImpl attribs = new AttributesImpl();
for (final FunctionSignature signature : signatures) {
attribs.clear();
attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().toString());
attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().getStringValue());
attribs.addAttribute("", "module", "module", "CDATA", signature.getName().getNamespaceURI());
attribs.addAttribute("", "arity", "arity", "CDATA", Integer.toString(signature.getArgumentCount()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence) thro
// variables
for (final VariableDeclaration var : externalModule.getVariableDeclarations()) {
attribs.clear();
attribs.addAttribute("", "name", "name", "CDATA", var.getName().toString());
attribs.addAttribute("", "name", "name", "CDATA", var.getName().getStringValue());
final SequenceType type = var.getSequenceType();
if (type != null) {
attribs.addAttribute("", "type", "type", "CDATA", Type.getTypeName(type.getPrimaryType()));
Expand Down

0 comments on commit a1562de

Please sign in to comment.