diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 5c386606a2e..3ba302fa0a1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -32,7 +32,6 @@ import ca.uhn.fhir.model.primitive.XhtmlDt; import ca.uhn.fhir.parser.json.JsonLikeValue.ScalarType; import ca.uhn.fhir.parser.json.JsonLikeValue.ValueType; import ca.uhn.fhir.util.*; -import ca.uhn.fhir.util.BundleUtil; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.tuple.Pair; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java index beb12b1d285..15afe80eb02 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java @@ -156,7 +156,6 @@ public class BundleUtil { * Extract all of the resources from a given bundle */ public static List toListOfEntries(FhirContext theContext, IBaseBundle theBundle) { - EntryListAccumulator entryListAccumulator = new EntryListAccumulator(); processEntries(theContext, theBundle, entryListAccumulator); return entryListAccumulator.getList(); @@ -254,6 +253,4 @@ public class BundleUtil { } return retVal; } - - } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryMutator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryMutator.java index 28a31d9ae24..740e418edc6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryMutator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryMutator.java @@ -12,7 +12,7 @@ public class BundleEntryMutator { private final BaseRuntimeChildDefinition myRequestChildDef; private final BaseRuntimeElementCompositeDefinition myRequestChildContentsDef; - BundleEntryMutator(IBase theEntry, BaseRuntimeChildDefinition theRequestChildDef, BaseRuntimeElementCompositeDefinition theRequestChildContentsDef) { + public BundleEntryMutator(IBase theEntry, BaseRuntimeChildDefinition theRequestChildDef, BaseRuntimeElementCompositeDefinition theRequestChildContentsDef) { myEntry = theEntry; myRequestChildDef = theRequestChildDef; myRequestChildContentsDef = theRequestChildContentsDef; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryParts.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryParts.java index 331e50991f8..b58bb088c5f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryParts.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/BundleEntryParts.java @@ -9,7 +9,7 @@ public class BundleEntryParts { private final String myUrl; private final String myConditionalUrl; - BundleEntryParts(RequestTypeEnum theRequestType, String theUrl, IBaseResource theResource, String theConditionalUrl) { + public BundleEntryParts(RequestTypeEnum theRequestType, String theUrl, IBaseResource theResource, String theConditionalUrl) { super(); myRequestType = theRequestType; myUrl = theUrl; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/ModifiableBundleEntry.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/ModifiableBundleEntry.java index 1cd20db8164..d61f0c05617 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/ModifiableBundleEntry.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/ModifiableBundleEntry.java @@ -1,17 +1,12 @@ package ca.uhn.fhir.util.bundle; -import ca.uhn.fhir.context.BaseRuntimeChildDefinition; -import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.util.ParametersUtil; -import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IPrimitiveType; public class ModifiableBundleEntry { private final BundleEntryParts myBundleEntryParts; private final BundleEntryMutator myBundleEntryMutator; - ModifiableBundleEntry(BundleEntryParts theBundleEntryParts, BundleEntryMutator theBundleEntryMutator) { + public ModifiableBundleEntry(BundleEntryParts theBundleEntryParts, BundleEntryMutator theBundleEntryMutator) { myBundleEntryParts = theBundleEntryParts; myBundleEntryMutator = theBundleEntryMutator; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java index 0c908111a9e..77b2705c28c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/TransactionProcessor.java @@ -440,7 +440,7 @@ public class TransactionProcessor { } catch (NotModifiedException e) { myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(Constants.STATUS_HTTP_304_NOT_MODIFIED)); } catch (BaseServerResponseException e) { - ourLog.info("Failure processing transaction GET {}: {}", requestDetails.getRequestPath(), e.toString()); + ourLog.info("Failure processing transaction GET {}: {}", url, e.toString()); myVersionAdapter.setResponseStatus(nextRespEntry, toStatusString(e.getStatusCode())); populateEntryWithOperationOutcome(e, nextRespEntry); } @@ -463,8 +463,6 @@ public class TransactionProcessor { return response; } - - private boolean isValidVerb(String theVerb) { try { return org.hl7.fhir.r4.model.Bundle.HTTPVerb.fromCode(theVerb) != null; diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java index 5bab834f314..f579c213f49 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptor.java @@ -195,7 +195,6 @@ public class SearchNarrowingInterceptor { BundleUtil.processEntries(ctx, bundle, processor); } - private class BundleEntryUrlProcessor implements Consumer { private final FhirContext myFhirContext; private final ServletRequestDetails myRequestDetails; @@ -275,4 +274,5 @@ public class SearchNarrowingInterceptor { } } } + } diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletSubRequestDetails.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletSubRequestDetails.java index c9bf730467c..cbcc41a5884 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletSubRequestDetails.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletSubRequestDetails.java @@ -25,8 +25,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; - public class ServletSubRequestDetails extends ServletRequestDetails { private Map> myHeaders = new HashMap<>(); diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptorTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptorTest.java index e0361b551c4..eb3eb609af3 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptorTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/server/interceptor/auth/SearchNarrowingInterceptorTest.java @@ -18,7 +18,6 @@ import ca.uhn.fhir.rest.server.FifoMemoryPagingProvider; import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.util.TestUtil; -import ca.uhn.fhir.util.UrlUtil; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; @@ -307,7 +306,6 @@ public class SearchNarrowingInterceptorTest { ourLastBundleRequest = theInput.getEntry().get(0).getRequest(); return theInput; } - } private static class MySearchNarrowingInterceptor extends SearchNarrowingInterceptor { diff --git a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java index 171b6cef74d..e1ec9f95469 100644 --- a/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java +++ b/hapi-fhir-structures-r5/src/test/java/ca/uhn/fhir/rest/client/GenericClientTest.java @@ -43,6 +43,7 @@ import org.mockito.stubbing.Answer; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Arrays; diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java index 233d363c768..0985c710a75 100644 --- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ResourceMinimizerMojo.java @@ -6,6 +6,7 @@ import java.util.Collection; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; +import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.util.BundleUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils;