pre-review cleanup

This commit is contained in:
Ken Stevens 2019-10-03 12:14:11 -04:00
parent 566443d0fe
commit d1deedf247
11 changed files with 7 additions and 20 deletions

View File

@ -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;

View File

@ -156,7 +156,6 @@ public class BundleUtil {
* Extract all of the resources from a given bundle
*/
public static List<BundleEntryParts> 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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -440,7 +440,7 @@ public class TransactionProcessor<BUNDLE extends IBaseBundle, BUNDLEENTRY> {
} 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<BUNDLE extends IBaseBundle, BUNDLEENTRY> {
return response;
}
private boolean isValidVerb(String theVerb) {
try {
return org.hl7.fhir.r4.model.Bundle.HTTPVerb.fromCode(theVerb) != null;

View File

@ -195,7 +195,6 @@ public class SearchNarrowingInterceptor {
BundleUtil.processEntries(ctx, bundle, processor);
}
private class BundleEntryUrlProcessor implements Consumer<ModifiableBundleEntry> {
private final FhirContext myFhirContext;
private final ServletRequestDetails myRequestDetails;
@ -275,4 +274,5 @@ public class SearchNarrowingInterceptor {
}
}
}
}

View File

@ -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<String, List<String>> myHeaders = new HashMap<>();

View File

@ -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 {

View File

@ -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;

View File

@ -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;