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

[fix] castable as for untyped atomic value(s) #4900

Merged

Conversation

alanpaxton
Copy link
Collaborator

@alanpaxton alanpaxton commented May 2, 2023

Description:

It appears perfectly acceptable for UntypedAtomicValue.convertTo to convert to subtypes of Type.STRING as StringValue(… value, requiredType). The conversion was omitted, and the omission was breaking “castable as” for Type.NCNAME in particular.

These conversions are already acceptable for StringValue(s), and are borrowed from there.

Reference:

Closes #4518

Type of tests:

xquery unit test added which tests a variety of atomic values castable as an NCName successfully. Failing prior to the code change.

@joewiz joewiz added this to the eXist-7.0.0 milestone May 2, 2023
@joewiz joewiz added the bug issue confirmed as bug label May 2, 2023
@adamretter
Copy link
Member

There are two additional XQTS failures caused by this PR that need to be examined...

It appears perfectly acceptable for UntypedAtomicValue.convertTo to convert to subtypes of Type.STRING as StringValue(… value, requiredType). The conversion was omitted, and the omission was breaking “castable as” for Type.NCNAME in particular.

These conversions are already acceptable for StringValue(s), and are borrowed from there.
@alanpaxton alanpaxton force-pushed the hotfix/eb-4518-castable-error branch from de8e4e8 to b364aa7 Compare May 17, 2023 10:38
@sonarcloud
Copy link

sonarcloud bot commented May 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@reinhapa reinhapa merged commit 43ce5ff into eXist-db:develop May 17, 2023
9 of 11 checks passed
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.

[BUG] The first argument of castable as is apparently not being atomized
5 participants