Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Bugfix) misc XQTS reported issues #3693

Merged
merged 4 commits into from Jan 6, 2021

Conversation

dizzzz
Copy link
Member

@dizzzz dizzzz commented Jan 3, 2021

A misc set of XQTS indicated fixes

  • unparsed-text-lines: Gracefully handle situation where URL resource does not return any data (NPE avoidance)
  • fn-xml-to-json: Fix to handle wrong formatted 'number' argument, Fixes xml-to-json-041

@dizzzz dizzzz added the bug issue confirmed as bug label Jan 3, 2021
@dizzzz dizzzz changed the title XQTS: gracefully handle situation where URL resource does not return … XQTS: misc fixes Jan 3, 2021
@dizzzz dizzzz requested a review from adamretter January 4, 2021 08:29
@dizzzz dizzzz marked this pull request as ready for review January 4, 2021 08:29
@dizzzz dizzzz marked this pull request as draft January 4, 2021 19:33
@dizzzz dizzzz added the in progress Issue is actively being worked upon label Jan 4, 2021
@dizzzz
Copy link
Member Author

dizzzz commented Jan 4, 2021

to catch:

Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
at org.exist.xquery.functions.fn.FunUnparsedText.readLines(FunUnparsedText.java:167)
at org.exist.xquery.functions.fn.FunUnparsedText.eval(FunUnparsedText.java:84)
at org.exist.xquery.BasicFunction.eval(BasicFunction.java:73)
at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:62)
at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
at org.exist.xquery.PathExpr.eval(PathExpr.java:279)
at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71)
at org.exist.xquery.XQuery.execute(XQuery.java:261)
at org.exist.xquery.XQuery.execute(XQuery.java:185)
at org.exist.xquery.XQuery.execute(XQuery.java:180)
at org.exist.xqts.runner.ExistConnection.$anonfun$executeQuery$36(ExistServer.scala:306)
at flatMap @ org.exist.xqts.runner.ExistConnection.$anonfun$executeQuery$35(ExistServer.scala:313)
at flatMap @ org.exist.xqts.runner.ExistConnection.$anonfun$executeQuery$33(ExistServer.scala:303)

In XQTS the error is handled without a NPE.
@dizzzz dizzzz marked this pull request as ready for review January 4, 2021 20:32
@dizzzz dizzzz removed the in progress Issue is actively being worked upon label Jan 4, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jan 4, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dizzzz dizzzz changed the title XQTS: misc fixes (Bugfix) xml-to-json handle non-number input ; handle (XQTS) Jan 4, 2021
@dizzzz dizzzz changed the title (Bugfix) xml-to-json handle non-number input ; handle (XQTS) (Bugfix) misc XQTS reported issues: xml-to-json and unparsed-text-lines Jan 4, 2021
@dizzzz dizzzz changed the title (Bugfix) misc XQTS reported issues: xml-to-json and unparsed-text-lines (Bugfix) misc XQTS reported issues Jan 4, 2021
@adamretter adamretter merged commit 3e16a0e into eXist-db:develop Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants