diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java index f579baccf1b..4c7c5c105b5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java @@ -195,7 +195,7 @@ public abstract class BaseDateTimeDt extends BasePrimitive { */ public TimeZone getTimeZone() { if (myTimeZoneZulu) { - return TimeZone.getTimeZone("Z"); + return TimeZone.getTimeZone("GMT"); } return myTimeZone; } 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 2f83a218d09..9c882b5e2bb 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 @@ -1778,6 +1778,15 @@ class ParserState { push(newState); return; } + case CONTAINED_RESOURCES: + case CONTAINED_RESOURCE_LIST: + case EXTENSION_DECLARED: + case PRIMITIVE_XHTML: + case PRIMITIVE_XHTML_HL7ORG: + case RESOURCE: + case RESOURCE_BLOCK: + case UNDECL_EXT: + break; } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DynamicSearchParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DynamicSearchParameter.java index 438f77d3b3d..0c0fb350661 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DynamicSearchParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DynamicSearchParameter.java @@ -143,6 +143,9 @@ public class DynamicSearchParameter implements IParameter { uriOrListParam.setValuesAsQueryTokens(ctx, unqualifiedParamName, paramList); retVal.add(next, uriOrListParam); break; + case HAS: + // Should not happen + break; } } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java index 5ee93f41ebe..2551a38b22f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java @@ -306,6 +306,7 @@ public class MethodUtil { return index; } + @SuppressWarnings("GetClassOnAnnotation") public static Integer findParamAnnotationIndex(Method theMethod, Class toFind) { int paramIndex = 0; for (Annotation[] annotations : theMethod.getParameterAnnotations()) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java index 97f2d571313..59f762316f6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java @@ -213,7 +213,7 @@ public class SearchMethodBinding extends BaseResourceReturningMethodBinding { qualifiedNames = processWhitelistAndBlacklist(qualifiedNames, temp.getQualifierWhitelist(), temp.getQualifierBlacklist()); methodParamsTemp.addAll(qualifiedNames); } - if (!qualifiedParamNames.contains(name) && !qualifiedParamNames.contains(name)) { + if (!qualifiedParamNames.contains(name)) { methodParamsTemp.add(name); } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java index b8003cc9f24..f250ef1a048 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java @@ -201,7 +201,11 @@ public class DateRangeParam implements IQueryParameterAnd { case GREATERTHAN_OR_EQUALS: break; case LESSTHAN: + case APPROXIMATE: case LESSTHAN_OR_EQUALS: + case ENDS_BEFORE: + case NOT_EQUAL: + case STARTS_AFTER: throw new IllegalStateException("Unvalid lower bound comparator: " + myLowerBound.getPrefix()); } } @@ -229,6 +233,10 @@ public class DateRangeParam implements IQueryParameterAnd { break; case GREATERTHAN_OR_EQUALS: case GREATERTHAN: + case APPROXIMATE: + case ENDS_BEFORE: + case NOT_EQUAL: + case STARTS_AFTER: throw new IllegalStateException("Unvalid upper bound comparator: " + myUpperBound.getPrefix()); } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java index 1c8d6eb8c48..4d4d867d063 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java @@ -110,7 +110,7 @@ public class ResponseHighlighterInterceptor extends InterceptorAdapter { b.append(nextChar); b.append(""); inValue = false; - } else if (nextChar == '}' || nextChar == '}' || nextChar == ',') { + } else if (nextChar == '{' || nextChar == '}' || nextChar == ',') { b.append(""); b.append(nextChar); b.append(""); diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java index 3027206200e..00e0f24d007 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplConditional.java @@ -50,6 +50,7 @@ public class RuleImplConditional extends BaseRule implements IAuthRule { if (theOperation == myOperationType) { switch (myAppliesTo) { case ALL_RESOURCES: + case INSTANCES: break; case TYPES: if (theInputResource == null || !myAppliesToTypes.contains(theInputResource.getClass())) { diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java b/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java index 9976760cc5e..97bf6e80bc2 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java @@ -109,6 +109,10 @@ public class RunServerCommand extends BaseCommand { case DSTU3: theSce.getServletContext().setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, FhirServerConfigDstu3.class.getName()); break; + case DSTU1: + case DSTU2_1: + case DSTU2_HL7ORG: + break; } cll.contextInitialized(theSce); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java index 7ad8a92cc4d..5f6a84d7508 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java @@ -447,6 +447,8 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao { entriesToProcess.put(nextRespEntry, outcome.getEntity()); break; } + case GET: + break; } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java index e607c61083f..7beae42edc5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java @@ -1046,6 +1046,12 @@ public class SearchBuilder { retVal = createPredicateQuantity(builder, dateJoin, leftValue); break; } + case COMPOSITE: + case HAS: + case NUMBER: + case REFERENCE: + case URI: + break; } if (retVal == null) { @@ -1936,6 +1942,9 @@ public class SearchBuilder { } } break; + case HAS: + // should not happen + break; } } } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java index 94c51d69ee1..cc9b86a38ad 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3.java @@ -455,6 +455,9 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao { entriesToProcess.put(nextRespEntry, outcome.getEntity()); break; } + case GET: + case NULL: + break; } } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseDateTimeType.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseDateTimeType.java index 07a7afbceea..2a86454e549 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseDateTimeType.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseDateTimeType.java @@ -307,7 +307,7 @@ public abstract class BaseDateTimeType extends PrimitiveType { */ public TimeZone getTimeZone() { if (myTimeZoneZulu) { - return TimeZone.getTimeZone("Z"); + return TimeZone.getTimeZone("GMT"); } return myTimeZone; } diff --git a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java index a2e680944ad..0dc74dd9e46 100644 --- a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java +++ b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java @@ -162,7 +162,7 @@ public class BaseController { b.append(nextChar); b.append(""); inValue = false; - } else if (nextChar == '}' || nextChar == '}' || nextChar == ',') { + } else if (nextChar == '{' || nextChar == '}' || nextChar == ',') { b.append(""); b.append(nextChar); b.append(""); @@ -321,6 +321,9 @@ public class BaseController { return loadAndAddConfDstu2(theServletRequest, theRequest, theModel); case DSTU3: return loadAndAddConfDstu3(theServletRequest, theRequest, theModel); + case DSTU2_1: + case DSTU2_HL7ORG: + break; } throw new IllegalStateException("Unknown version: " + theRequest.getFhirVersion(myConfig)); }