Skip to content

Commit 48bc6cd

Browse files
committed
[bugfix] Fix an issue in the XQuery Inspection Module whereby QName#toString() was being called instead of QName#getStringValue()
1 parent 7bf6c40 commit 48bc6cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectFunctionHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static int generateDocs(final FunctionSignature sig, final UserDefinedFun
6363
XQDocHelper.parse(sig);
6464

6565
final AttributesImpl attribs = new AttributesImpl();
66-
attribs.addAttribute("", "name", "name", "CDATA", sig.getName().toString());
66+
attribs.addAttribute("", "name", "name", "CDATA", sig.getName().getStringValue());
6767
attribs.addAttribute("", "module", "module", "CDATA", sig.getName().getNamespaceURI());
6868
final int nodeNr = builder.startElement(FUNCTION_QNAME, attribs);
6969
writeParameters(sig, builder);
@@ -130,7 +130,7 @@ private static void writeAnnotations(final FunctionSignature signature, final Me
130130
if (annots != null) {
131131
for (final Annotation annot : annots) {
132132
attribs.clear();
133-
attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().toString());
133+
attribs.addAttribute(null, "name", "name", "CDATA", annot.getName().getStringValue());
134134
attribs.addAttribute(null, "namespace", "namespace", "CDATA", annot.getName().getNamespaceURI());
135135
builder.startElement(ANNOTATION_QNAME, attribs);
136136
final LiteralValue[] value = annot.getValue();
@@ -164,7 +164,7 @@ private static void generateDependencies(final UserDefinedFunction function, fin
164164
final AttributesImpl attribs = new AttributesImpl();
165165
for (final FunctionSignature signature : signatures) {
166166
attribs.clear();
167-
attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().toString());
167+
attribs.addAttribute(null, "name", "name", "CDATA", signature.getName().getStringValue());
168168
attribs.addAttribute("", "module", "module", "CDATA", signature.getName().getNamespaceURI());
169169
attribs.addAttribute("", "arity", "arity", "CDATA", Integer.toString(signature.getArgumentCount()));
170170

exist-core/src/main/java/org/exist/xquery/functions/inspect/InspectModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence) thro
117117
// variables
118118
for (final VariableDeclaration var : externalModule.getVariableDeclarations()) {
119119
attribs.clear();
120-
attribs.addAttribute("", "name", "name", "CDATA", var.getName().toString());
120+
attribs.addAttribute("", "name", "name", "CDATA", var.getName().getStringValue());
121121
final SequenceType type = var.getSequenceType();
122122
if (type != null) {
123123
attribs.addAttribute("", "type", "type", "CDATA", Type.getTypeName(type.getPrimaryType()));

0 commit comments

Comments
 (0)