Fix compile issues from new version of errorprone

This commit is contained in:
James Agnew 2017-04-03 14:43:59 -04:00
parent 594f6a0d3b
commit 6ab1cb4c2e
14 changed files with 48 additions and 5 deletions

View File

@ -195,7 +195,7 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
*/
public TimeZone getTimeZone() {
if (myTimeZoneZulu) {
return TimeZone.getTimeZone("Z");
return TimeZone.getTimeZone("GMT");
}
return myTimeZone;
}

View File

@ -1778,6 +1778,15 @@ class ParserState<T> {
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;
}
}

View File

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

View File

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

View File

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

View File

@ -201,7 +201,11 @@ public class DateRangeParam implements IQueryParameterAnd<DateParam> {
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<DateParam> {
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());
}
}

View File

@ -110,7 +110,7 @@ public class ResponseHighlighterInterceptor extends InterceptorAdapter {
b.append(nextChar);
b.append("</span>");
inValue = false;
} else if (nextChar == '}' || nextChar == '}' || nextChar == ',') {
} else if (nextChar == '{' || nextChar == '}' || nextChar == ',') {
b.append("<span class='hlControl'>");
b.append(nextChar);
b.append("</span>");

View File

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

View File

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

View File

@ -447,6 +447,8 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
entriesToProcess.put(nextRespEntry, outcome.getEntity());
break;
}
case GET:
break;
}
}

View File

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

View File

@ -455,6 +455,9 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
entriesToProcess.put(nextRespEntry, outcome.getEntity());
break;
}
case GET:
case NULL:
break;
}
}

View File

@ -307,7 +307,7 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
*/
public TimeZone getTimeZone() {
if (myTimeZoneZulu) {
return TimeZone.getTimeZone("Z");
return TimeZone.getTimeZone("GMT");
}
return myTimeZone;
}

View File

@ -162,7 +162,7 @@ public class BaseController {
b.append(nextChar);
b.append("</span>");
inValue = false;
} else if (nextChar == '}' || nextChar == '}' || nextChar == ',') {
} else if (nextChar == '{' || nextChar == '}' || nextChar == ',') {
b.append("<span class='hlControl'>");
b.append(nextChar);
b.append("</span>");
@ -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));
}