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

backport: Fix negative xsd range edge cases (#178) #180

Conversation

jkhsjdhjs
Copy link
Contributor

This backports 7369d2e to v2.0.1:

The current implementation uses the abs() function to check that the value is inside the range.
However, the range is not symmetric.
For example, for a byte, which is between [-128, 127],
the value of
maxInclusive should be 127,
and minInclusive
should be -128.

The current implementation uses the `abs()` function to check
that the value is inside the range.
However, the range is not symmetric.
For example, for a [byte](https://www.w3.org/TR/xmlschema11-2/#byte),
which is between [-128, 127],
the value of
[maxInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-maxInclusive)
should be 127,
and [minInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-minInclusive)
 should be -128.
@s-heppner
Copy link
Contributor

LGTM

@s-heppner s-heppner merged commit a550f76 into eclipse-basyx:v2.0.1 Dec 11, 2023
6 checks passed
@s-heppner s-heppner deleted the backport/datatypes_negative_xsd_range_fix branch December 11, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants