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

fn:random-number-generator not spec compliant #3071

Closed
line-o opened this issue Oct 27, 2019 · 0 comments · Fixed by #3072
Closed

fn:random-number-generator not spec compliant #3071

line-o opened this issue Oct 27, 2019 · 0 comments · Fixed by #3072
Assignees
Labels
bug issue confirmed as bug

Comments

@line-o
Copy link
Member

line-o commented Oct 27, 2019

What is the problem

The function fn:random-number-generator is not compliant to the xquery 3.1 specification.

Specifically:

  1. The seed can be of type xs:anyAtomic but only xs:number is supported because it is internally cast to java.long
    random = new Random(args[0].itemAt(0).toJavaObject(long.class));
  2. There is a side-effect with the function returned in the next key.

What did you expect

The implementation to be spec compliant.

Describe how to reproduce or add a test

You can find the tests in #3072

Context information

  • eXist-db 5.0.x /
  • Java
  • MacOs 10.14.x (64 bit)
  • clone from latest develop
  • no custom changes
@triage-new-issues triage-new-issues bot added the triage issue needs to be investigated label Oct 27, 2019
@duncdrum duncdrum added the bug issue confirmed as bug label Oct 28, 2019
@triage-new-issues triage-new-issues bot removed the triage issue needs to be investigated label Oct 28, 2019
@line-o line-o self-assigned this Dec 4, 2019
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 a pull request may close this issue.

2 participants