FIx errorprone detected issues

This commit is contained in:
jamesagnew 2019-01-05 13:43:55 -05:00
parent 8f8385627f
commit 39f2062802
5 changed files with 1106 additions and 1104 deletions

View File

@ -111,4 +111,9 @@ public abstract class AbstractJaxRsPageProvider extends AbstractJaxRsProvider im
return BundleInclusionRule.BASED_ON_INCLUDES; return BundleInclusionRule.BASED_ON_INCLUDES;
} }
@Override
public PreferReturnEnum getDefaultPreferReturn() {
return PreferReturnEnum.REPRESENTATION;
}
} }

View File

@ -340,7 +340,12 @@ implements IRestfulServer<JaxRsRequest>, IResourceProvider {
return BundleInclusionRule.BASED_ON_INCLUDES; return BundleInclusionRule.BASED_ON_INCLUDES;
} }
/** @Override
public PreferReturnEnum getDefaultPreferReturn() {
return PreferReturnEnum.REPRESENTATION;
}
/**
* The resource type should return conform to the generic resource included * The resource type should return conform to the generic resource included
* in the topic * in the topic
*/ */

View File

@ -31,7 +31,6 @@ public interface IRestfulServer<T extends RequestDetails> extends IRestfulServer
BundleInclusionRule getBundleInclusionRule(); BundleInclusionRule getBundleInclusionRule();
void setDefaultPreferReturn(PreferReturnEnum theDefaultPreferReturn);
PreferReturnEnum getDefaultPreferReturn(); PreferReturnEnum getDefaultPreferReturn();
} }

View File

@ -1660,7 +1660,6 @@ public class RestfulServer extends HttpServlet implements IRestfulServer<Servlet
* *
* @see <a href="http://hl7.org/fhir/http.html#ops">HL7 FHIR Specification</a> section on the Prefer header * @see <a href="http://hl7.org/fhir/http.html#ops">HL7 FHIR Specification</a> section on the Prefer header
*/ */
@Override
public void setDefaultPreferReturn(PreferReturnEnum theDefaultPreferReturn) { public void setDefaultPreferReturn(PreferReturnEnum theDefaultPreferReturn) {
Validate.notNull(theDefaultPreferReturn, "theDefaultPreferReturn must not be null"); Validate.notNull(theDefaultPreferReturn, "theDefaultPreferReturn must not be null");
myDefaultPreferReturn = theDefaultPreferReturn; myDefaultPreferReturn = theDefaultPreferReturn;

View File

@ -6,13 +6,7 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.codec.Charsets; import org.apache.commons.codec.Charsets;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -265,7 +259,7 @@ public abstract class BaseWorkerContext implements IWorkerContext {
return laterVersion(newParts[i], oldParts[i]); return laterVersion(newParts[i], oldParts[i]);
} }
// This should never happen // This should never happen
throw new Error("Delimited versions have exact match for delimiter '"+delimiter+"' : "+newParts+" vs "+oldParts); throw new Error("Delimited versions have exact match for delimiter '"+delimiter+"' : "+ Arrays.toString(newParts) +" vs "+ Arrays.toString(oldParts));
} }
protected <T extends MetadataResource> void seeMetadataResource(T r, Map<String, T> map, boolean addId) throws FHIRException { protected <T extends MetadataResource> void seeMetadataResource(T r, Map<String, T> map, boolean addId) throws FHIRException {