diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java index c97ef929ad6..2b72cd9d4ad 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceHistoryTable.java @@ -82,7 +82,7 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl public void addTag(ResourceHistoryTag theTag) { for (ResourceHistoryTag next : getTags()) { - if (next.getTag().equals(theTag)) { + if (next.equals(theTag)) { return; } } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java index 0448a27c68b..26252c3de3b 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceLink.java @@ -165,14 +165,14 @@ public class ResourceLink extends BaseResourceIndex { Validate.isTrue(theTargetResourceUrl.hasBaseUrl()); Validate.isTrue(theTargetResourceUrl.hasResourceType()); - if (theTargetResourceUrl.hasIdPart()) { +// if (theTargetResourceUrl.hasIdPart()) { // do nothing - } else { +// } else { // Must have set an url like http://example.org/something // We treat 'something' as the resource type because of fix for #659. Prior to #659 fix, 'something' was // treated as the id and 'example.org' was treated as the resource type // TODO: log a warning? - } +// } myTargetResourceType = theTargetResourceUrl.getResourceType(); myTargetResourceUrl = theTargetResourceUrl.getValue(); diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java index 238fbde72a3..980a3c3cc3f 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/LinkedBlockingQueueSubscribableChannel.java @@ -53,9 +53,10 @@ public class LinkedBlockingQueueSubscribableChannel implements SubscribableChann StopWatch sw = new StopWatch(); try { theQueue.put(theRunnable); - } catch (InterruptedException theE) { + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); throw new RejectedExecutionException("Task " + theRunnable.toString() + - " rejected from " + theE.toString()); + " rejected from " + e.toString()); } ourLog.info("Slot become available after {}ms", sw.getMillis()); }; diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java index a481e678ae1..7c312368158 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java @@ -97,7 +97,11 @@ public class SubscriptionDeliveringRestHookSubscriber extends BaseSubscriptionDe operation.encoded(thePayloadType); } - ourLog.info("Delivering {} rest-hook payload {} for {}", theMsg.getOperationType(), thePayloadResource.getIdElement().toUnqualified().getValue(), theSubscription.getIdElement(myFhirContext).toUnqualifiedVersionless().getValue()); + String payloadId = null; + if (thePayloadResource != null) { + payloadId = thePayloadResource.getIdElement().toUnqualified().getValue(); + } + ourLog.info("Delivering {} rest-hook payload {} for {}", theMsg.getOperationType(), payloadId, theSubscription.getIdElement(myFhirContext).toUnqualifiedVersionless().getValue()); try { operation.execute();