-
Notifications
You must be signed in to change notification settings - Fork 18
Fix parsing of date-only values with xsd:dateTime type #847
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: berezovskyi <64734+berezovskyi@users.noreply.github.com>
|
@copilot Also add a test that ensures that the correct dateTime processing is not affected by this change, i.e. when the datetime has the time. |
…ng is not affected Co-authored-by: berezovskyi <64734+berezovskyi@users.noreply.github.com>
Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@oslc-bot /test-all |
When OSLC systems like DOORS send date values in xsd:date format (e.g.,
2020-08-10) but annotated as xsd:dateTime, parsing fails withDatatypeFormatException. In non-strict mode, this incorrectly returnedUnparseableLiteralinstead of aDate.Fix: In
JenaModelHelper.handleExtendedPropertyValue(), when xsd:dateTime parsing fails in non-strict mode, attempt to parse as xsd:date before falling back toUnparseableLiteral.Tests Added:
testDateOnlyValueWithDateTimeType(): Verifies that date-only values (e.g.,2020-08-10) with xsd:dateTime type are correctly parsed as Date objectstestFullDateTimeValueStillParsesCorrectly(): Ensures that full dateTime values with time components (e.g.,2020-08-10T14:30:45Z) are still correctly parsed, confirming the fix doesn't affect normal dateTime processingCloses #242
Checklist
@oslc-bot /test-allif not sure) or adds unit/integration tests.mvn package org.openrewrite.maven:rewrite-maven-plugin:run spotless:apply -DskipTests -P'!enforcer'if not, commit & push)Original prompt
This section details on the original issue you should resolve
<issue_title>Property #createdOn could not be parsed as datatype #dateTime</issue_title>
<issue_description>I have a slight issue when trying to read requirements from DOORS via DWA via OSLC via LYO. For most attribute values this works. However, for the dates, the following error is shown: