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

Parameter argument conversion from flag node items to atomic values broken #323

Closed
aj-stein-gsa opened this issue Dec 31, 2024 · 0 comments · Fixed by #321 or #332
Closed

Parameter argument conversion from flag node items to atomic values broken #323

aj-stein-gsa opened this issue Dec 31, 2024 · 0 comments · Fixed by #321 or #332
Assignees
Labels
bug Something isn't working java Pull requests that update Java code
Milestone

Comments

@aj-stein-gsa
Copy link
Contributor

Describe the bug

Currently, when using a recent version of this library built on develop (as of 113e57b), evaluating a function with parameters that are simple atomic types (meta:string) where the parameter argument is the value of a flag node will thrown an exception because the conversion (required by the XPath 3.1 specification) is not completely implemented.

Who is the bug affecting

Developers using Metapath functions with complex arguments and developers supporting it with supporting code in metaschema-java.

How do we replicate this issue

  1. Write a function that has a parameter with a simple atomic type.
  2. Evaluate the instance of a function with a parameter argument that is flag node item's value.
  3. Observe a stack trace that will resemble the one below.

Expected behavior (i.e. solution)

The value of the flag node item is deferenced correctly per the rules, the value is consumed by function evaluation, and no exception is thrown.

Other comments

(NOTE: Re replicating the issue, a unit test with a simpler model to reproduce the bug without full OSCAL models and external constraints, where this issue was originally detected, is forthcoming. This issue and its ID will be used to provide the unit test with a deep link to this bug report.)

@aj-stein-gsa aj-stein-gsa added bug Something isn't working java Pull requests that update Java code labels Dec 31, 2024
@aj-stein-gsa aj-stein-gsa self-assigned this Dec 31, 2024
@david-waltermire david-waltermire moved this from To Triage to Ready in Spec and Tooling Work Board Jan 2, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 3, 2025
@david-waltermire david-waltermire added this to the v2.2.0 milestone Jan 4, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Jan 7, 2025
david-waltermire added a commit that referenced this issue Jan 7, 2025
* Update test and mock flag def builder for #323
* Adjust proper test for only flag, not complex doc for #323
* Refactored some class locations to make them easier to locate.

---------

Co-authored-by: David Waltermire <david.waltermire@nist.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working java Pull requests that update Java code
Projects
Archived in project
2 participants