-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Core library bump 6.3.7 #5772
base: master
Are you sure you want to change the base?
Core library bump 6.3.7 #5772
Conversation
New validation requirement as of 2023-09-16
…i-fhir into do-20231213-core-bump-6-2-6
hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGenerationR4Test.java
Outdated
Show resolved
Hide resolved
...-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java
Outdated
Show resolved
Hide resolved
private static XhtmlNode extractNarrativeFromDomainResource(@Nonnull IBaseResource theResource, FhirContext ctx) { | ||
if (ctx.getResourceDefinition(theResource).getChildByName("text") != null) { | ||
private static XhtmlNode extractNarrativeFromElement(@Nonnull IBase theElement, FhirContext ctx) { | ||
if (ctx.getElementDefinition(theElement.getClass()).getChildByName("text") != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if ctx.getElementDefinition(theElement.getClass()) returns null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a @jamesagnew commit. If you have a quick minute, James, could you check it out. If not, I'll investigate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at a minimum you want to check for null and either throw some sort of meaningful Exception or add an error to the output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a "should not happen" kind of thing. It's not impossible if someone decides to create their own custom class implementing IBase and don't register it properly, but if someone does that there are all kinds of things that will fail. Might be nice to include a Validate.notNull()
check here, but even that is probably never going to hit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending resolution of comments and also strongly suggest getting James to look at the most senstive production code changes.
I wholeheartedly agree. Thank you for the initial review, it's shaking out changes that should be commented on for the record. Attending to code comments now. I've tagged James wherever he comes into the conversation. |
It was working when it left the shop.
@@ -0,0 +1,7 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be moved to the 7.4.0 directory now. :)
provide some guidance on how to derive similar debugging code from the org.hl7.fhir.core test cases. | ||
*/ | ||
@Disabled | ||
public class VersionSpecificWorkerContextWrapperCoreTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
This is a version bump of the org.hl7.fhir.core library from 6.1.2.2 to 6.3.7.
The trivial changes are matching changing method signatures and class changes.
The more difficult changes revolve around the resource validation. HAPI provides its own implementations of IWorkerContext, which are used by core's InstanceValidator to validate resources.
InstanceValidator has changed significantly with regard to logic, particularly regarding code validation:
org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
See comments for discussion of some of these changes.