From 5789db874394783eba007598a3a7f69d399da390 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Sat, 2 Jan 2016 10:55:52 -0500 Subject: [PATCH] Remove dependency on cobertura at compile time --- .gitignore | 1 + hapi-fhir-android/pom.xml | 15 +---------- .../ca/uhn/fhir/context/ModelScanner.java | 4 --- .../context/RuntimeChildChoiceDefinition.java | 1 - ...ntimeChildDeclaredExtensionDefinition.java | 3 +-- .../RuntimePrimitiveDatatypeDefinition.java | 3 +-- .../context/RuntimeResourceDefinition.java | 1 - .../java/ca/uhn/fhir/model/api/Bundle.java | 3 +-- .../java/ca/uhn/fhir/model/api/IResource.java | 25 ------------------- .../uhn/fhir/model/api/PathSpecification.java | 2 +- .../main/java/ca/uhn/fhir/model/api/Tag.java | 3 +-- .../model/base/composite/BaseCodingDt.java | 1 - .../valueset/QuantityCompararatorEnum.java | 2 +- .../SecurityEventObjectSensitivityEnum.java | 2 +- .../valueset/SecurityEventObjectTypeEnum.java | 2 +- .../fhir/model/primitive/BaseDateTimeDt.java | 7 ++++-- .../ca/uhn/fhir/model/primitive/CodeDt.java | 3 ++- .../ca/uhn/fhir/model/primitive/IdDt.java | 4 +-- .../uhn/fhir/model/primitive/MarkdownDt.java | 2 +- .../fhir/model/primitive/PositiveIntDt.java | 22 +--------------- .../fhir/model/primitive/UnsignedIntDt.java | 22 +--------------- .../valueset/BundleEntrySearchModeEnum.java | 2 +- .../BundleEntryTransactionMethodEnum.java | 2 +- .../fhir/model/valueset/BundleTypeEnum.java | 2 +- .../BaseThymeleafNarrativeGenerator.java | 3 +-- .../java/ca/uhn/fhir/parser/JsonParser.java | 1 - .../java/ca/uhn/fhir/parser/ParserState.java | 8 +++--- .../fhir/rest/api/RestOperationTypeEnum.java | 2 +- .../ca/uhn/fhir/rest/client/BaseClient.java | 1 - .../FhirClientConnectionException.java | 22 +--------------- ...ClientInappropriateForServerException.java | 22 +--------------- .../exceptions/InvalidResponseException.java | 22 +--------------- .../exceptions/NonFhirResponseException.java | 6 ++--- .../BearerTokenAuthInterceptor.java | 2 +- .../fhir/rest/gclient/CompositeCriterion.java | 3 +-- .../rest/gclient/QuantityClientParam.java | 2 +- .../fhir/rest/gclient/TokenClientParam.java | 2 +- .../BaseAddOrDeleteTagsMethodBinding.java | 4 --- .../BaseHttpClientInvocationWithContents.java | 1 - .../fhir/rest/method/BaseMethodBinding.java | 2 +- .../rest/method/ConformanceMethodBinding.java | 1 - .../fhir/rest/method/ElementsParameter.java | 3 +-- .../fhir/rest/method/PageMethodBinding.java | 3 +-- .../uhn/fhir/rest/method/RequestDetails.java | 1 - .../uhn/fhir/rest/method/SortParameter.java | 3 +-- .../rest/method/SummaryEnumParameter.java | 3 +-- .../rest/method/TransactionMethodBinding.java | 1 - .../uhn/fhir/rest/param/BaseAndListParam.java | 1 - .../fhir/rest/param/BaseQueryParameter.java | 1 - .../rest/param/CompositeAndListParam.java | 2 +- .../fhir/rest/param/CompositeOrListParam.java | 2 +- .../uhn/fhir/rest/param/CompositeParam.java | 3 +-- .../uhn/fhir/rest/param/DateAndListParam.java | 2 +- .../uhn/fhir/rest/param/DateOrListParam.java | 2 +- .../uhn/fhir/rest/param/InternalCodingDt.java | 2 +- .../fhir/rest/param/NumberAndListParam.java | 2 +- .../fhir/rest/param/NumberOrListParam.java | 2 +- .../ca/uhn/fhir/rest/param/NumberParam.java | 3 +-- .../fhir/rest/param/QualifiedDateParam.java | 2 +- .../fhir/rest/param/QuantityAndListParam.java | 2 +- .../fhir/rest/param/QuantityOrListParam.java | 2 +- .../ca/uhn/fhir/rest/param/QuantityParam.java | 5 ++-- .../rest/param/ReferenceAndListParam.java | 2 +- .../fhir/rest/param/ReferenceOrListParam.java | 2 +- .../uhn/fhir/rest/param/ReferenceParam.java | 4 +-- .../fhir/rest/param/ResourceParameter.java | 4 +-- .../fhir/rest/param/StringAndListParam.java | 3 +-- .../fhir/rest/param/StringOrListParam.java | 2 +- .../fhir/rest/param/TokenAndListParam.java | 3 +-- .../uhn/fhir/rest/param/TokenOrListParam.java | 2 +- .../ca/uhn/fhir/rest/param/TokenParam.java | 4 +-- .../uhn/fhir/rest/param/UriAndListParam.java | 2 +- .../uhn/fhir/rest/param/UriOrListParam.java | 2 +- .../java/ca/uhn/fhir/rest/param/UriParam.java | 3 +-- .../exceptions/AuthenticationException.java | 2 +- .../ForbiddenOperationException.java | 3 +-- .../exceptions/InternalErrorException.java | 3 +-- .../exceptions/InvalidRequestException.java | 3 +-- .../NotImplementedOperationException.java | 3 +-- .../exceptions/NotModifiedException.java | 3 +-- .../PreconditionFailedException.java | 23 +---------------- .../exceptions/ResourceGoneException.java | 23 +---------------- .../exceptions/ResourceNotFoundException.java | 23 +---------------- .../ResourceVersionConflictException.java | 23 +---------------- .../ResourceVersionNotSpecifiedException.java | 23 +---------------- .../UnclassifiedServerFailureException.java | 4 +-- .../UnprocessableEntityException.java | 23 +---------------- .../server/servlet/ServletRequestDetails.java | 3 --- .../java/ca/uhn/fhir/util/CoverageIgnore.java | 5 ++++ .../java/ca/uhn/fhir/util/FhirTerser.java | 1 - .../java/ca/uhn/fhir/util/IModelVisitor.java | 1 - .../uhn/fhir/util/OperationOutcomeUtil.java | 3 +-- .../java/ca/uhn/fhir/util/ParametersUtil.java | 1 - .../schematron/SchematronBaseValidator.java | 12 ++++----- hapi-fhir-cobertura/pom.xml | 1 + hapi-fhir-jaxrsserver-base/pom.xml | 5 ++++ .../ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java | 4 +-- .../jpa/dao/BaseSearchParamExtractor.java | 1 - .../fhir/jpa/dao/FhirResourceDaoDstu2.java | 2 +- .../fhir/jpa/dao/FhirResourceDaoDstu21.java | 2 +- .../ca/uhn/fhir/jpa/dao/FhirSearchDao.java | 2 -- .../uhn/fhir/jpa/dao/FhirSystemDaoDstu21.java | 3 --- .../main/java/ca/uhn/fhir/jpa/dao/IDao.java | 1 - .../ca/uhn/fhir/jpa/dao/SearchBuilder.java | 1 - .../BaseResourceIndexedSearchParam.java | 1 - .../ResourceIndexedSearchParamNumber.java | 1 - .../ResourceIndexedSearchParamQuantity.java | 1 - .../ResourceIndexedSearchParamString.java | 15 ----------- .../ResourceIndexedSearchParamToken.java | 1 - .../entity/ResourceIndexedSearchParamUri.java | 2 -- .../fhir/jpa/provider/BaseJpaProvider.java | 1 - .../jpa/provider/BaseJpaResourceProvider.java | 2 +- .../BaseJpaResourceProviderValueSetDstu2.java | 2 -- .../provider/JpaConformanceProviderDstu1.java | 2 +- .../provider/JpaConformanceProviderDstu2.java | 2 +- .../JpaConformanceProviderDstu21.java | 2 +- ...quireManualActivationInterceptorDstu2.java | 3 +-- ...uireManualActivationInterceptorDstu21.java | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- pom.xml | 2 ++ src/changes/changes.xml | 4 +++ 121 files changed, 122 insertions(+), 448 deletions(-) create mode 100644 hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java diff --git a/.gitignore b/.gitignore index 0bc1caebc61..682b7151a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ tmp.txt *.hprof tmp.txt ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString/ +ca.uhn.fhir.jpa.entity.ResourceTable/ # Vagrant stuff. .vagrant diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index cbbe5d92ee3..933d6b31e61 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -56,12 +56,6 @@ org.slf4j slf4j-android - - net.sourceforge.cobertura - cobertura - 2.1.1 - true - org.slf4j slf4j-api @@ -142,8 +136,8 @@ javax.xml.stream:stax-api org.codehaus.woodstox:stax2-api org.glassfish:javax.json - net.sourceforge.cobertura:cobertura - - net.sourceforge.cobertura:cobertura - - net/sourceforge/cobertura/CoverageIgnore* - - ca.uhn.hapi.fhir:hapi-fhir-base diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index a4758a19849..7338b931bdd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -26,11 +26,8 @@ import java.io.InputStream; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Proxy; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collection; @@ -54,7 +51,6 @@ import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; import org.hl7.fhir.instance.model.api.IBaseEnumeration; import org.hl7.fhir.instance.model.api.IBaseExtension; -import org.hl7.fhir.instance.model.api.IBaseMetaType; import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseXhtml; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java index 940e1e09027..5d700852346 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildChoiceDefinition.java @@ -30,7 +30,6 @@ import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseDatatype; import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java index d2e1fd86e76..fddc34c4b90 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.context; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.lang.reflect.Field; import java.util.ArrayList; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java index ee4a3999dd2..57ab7d40cb8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.context; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.util.Map; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java index 714b147fd0e..c524e96c7ee 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java @@ -27,7 +27,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java index c1bbc061997..80e96061025 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.model.api; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.util.ArrayList; import java.util.HashMap; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java index b4d3a6d7ba3..71e9fceeaae 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java @@ -1,30 +1,5 @@ package ca.uhn.fhir.model.api; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.base.composite.BaseContainedDt; import ca.uhn.fhir.model.base.composite.BaseNarrativeDt; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/PathSpecification.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/PathSpecification.java index d0735007872..5023885f1ee 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/PathSpecification.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/PathSpecification.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.model.api; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java index c4a4f4c95f0..ce9cea56162 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.model.api; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.net.URI; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java index 4669e072368..6c297dbe0a6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java @@ -21,7 +21,6 @@ package ca.uhn.fhir.model.base.composite; */ import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.IBaseCoding; import ca.uhn.fhir.model.api.BaseIdentifiableElement; import ca.uhn.fhir.model.api.ICompositeDatatype; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java index d37613763dd..9033e864568 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.dstu.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum QuantityCompararatorEnum { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java index dd120b3b6f2..5898113dd73 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.dstu.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum SecurityEventObjectSensitivityEnum { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java index 0874e3867ba..f63ee781d4c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.dstu.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum SecurityEventObjectTypeEnum { 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 d936cf07301..c95c2d8c618 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 @@ -19,8 +19,11 @@ package ca.uhn.fhir.model.primitive; * limitations under the License. * #L% */ - -import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.*; +import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.DAY; +import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MILLI; +import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MONTH; +import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.SECOND; +import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.YEAR; import java.text.ParseException; import java.util.ArrayList; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java index 842c744269d..5b596c13b87 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java @@ -19,8 +19,9 @@ package ca.uhn.fhir.model.primitive; * limitations under the License. * #L% */ +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isBlank; -import static org.apache.commons.lang3.StringUtils.*; import ca.uhn.fhir.model.api.BasePrimitive; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.SimpleSetter; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java index 3446cb699c7..e6f2044a082 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java @@ -19,8 +19,8 @@ package ca.uhn.fhir.model.primitive; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.math.BigDecimal; import java.util.UUID; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java index ce115074072..ecc7a84dfc9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/MarkdownDt.java @@ -21,7 +21,7 @@ package ca.uhn.fhir.model.primitive; */ import ca.uhn.fhir.model.api.annotation.DatatypeDef; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; @DatatypeDef(name = "markdown", profileOf=StringDt.class) @CoverageIgnore diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java index d8ca74d4593..6dbbe945dfd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/PositiveIntDt.java @@ -1,29 +1,9 @@ package ca.uhn.fhir.model.primitive; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.SimpleSetter; import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.util.CoverageIgnore; @DatatypeDef(name = "positiveInt", profileOf=IntegerDt.class) @CoverageIgnore diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java index c087a7ac320..17c4ca9f0ee 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/UnsignedIntDt.java @@ -1,29 +1,9 @@ package ca.uhn.fhir.model.primitive; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.SimpleSetter; import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.util.CoverageIgnore; @DatatypeDef(name = "unsignedInt", profileOf=IntegerDt.class) @CoverageIgnore diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java index d802b56f1d3..d69d2460ffd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntrySearchModeEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum BundleEntrySearchModeEnum { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java index 72ed0b5eef9..df09ceedca9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; /** * This Enum is only used to support using the DSTU1 Bundle structure (ca.uhn.fhir.model.api.Bundle) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java index 680d679015d..27a761c01df 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleTypeEnum.java @@ -24,8 +24,8 @@ package ca.uhn.fhir.model.valueset; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum BundleTypeEnum { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java index d0392f5dc2d..41594d69c77 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.narrative; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.File; import java.io.FileInputStream; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java index d499f27fbb1..77a3d09aa27 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java @@ -50,7 +50,6 @@ import javax.json.stream.JsonGeneratorFactory; import javax.json.stream.JsonParsingException; import org.apache.commons.lang3.StringUtils; -import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBinary; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; 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 949e44829ae..b8f196fde99 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 @@ -19,8 +19,9 @@ package ca.uhn.fhir.parser; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; import java.util.ArrayList; import java.util.HashMap; @@ -28,7 +29,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.TreeSet; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; @@ -39,7 +39,6 @@ import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBinary; -import org.hl7.fhir.instance.model.api.IBaseCoding; import org.hl7.fhir.instance.model.api.IBaseElement; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseHasExtensions; @@ -77,7 +76,6 @@ import ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.Tag; import ca.uhn.fhir.model.api.TagList; -import ca.uhn.fhir.model.base.composite.BaseCodingDt; import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; import ca.uhn.fhir.model.base.resource.ResourceMetadataMap; import ca.uhn.fhir.model.primitive.IdDt; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java index efeef2b5587..1c3afdce49c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/RestOperationTypeEnum.java @@ -24,7 +24,7 @@ package ca.uhn.fhir.rest.api; import java.util.HashMap; import java.util.Map; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public enum RestOperationTypeEnum { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java index 281b3205817..ab6cfa99033 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClient.java @@ -59,7 +59,6 @@ import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.model.base.resource.BaseOperationOutcome; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.api.SummaryEnum; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java index 573749d554f..7eb5e385f2c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientConnectionException.java @@ -1,27 +1,7 @@ package ca.uhn.fhir.rest.client.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import ca.uhn.fhir.util.CoverageIgnore; /** * Represents a failure by the HAPI FHIR Client to successfully communicate diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java index b8c5e69ce58..d94aeb2781b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/FhirClientInappropriateForServerException.java @@ -1,27 +1,7 @@ package ca.uhn.fhir.rest.client.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import ca.uhn.fhir.util.CoverageIgnore; /** * This exception will be thrown by FHIR clients if the client attempts to diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java index 5b4ac7070fc..4e12ea59ac5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/InvalidResponseException.java @@ -1,27 +1,7 @@ package ca.uhn.fhir.rest.client.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public class InvalidResponseException extends BaseServerResponseException { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java index a4142968e84..331d5d0ff46 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java @@ -19,17 +19,15 @@ package ca.uhn.fhir.rest.client.exceptions; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.IOException; import java.io.Reader; -import net.sourceforge.cobertura.CoverageIgnore; - import org.apache.commons.io.IOUtils; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public class NonFhirResponseException extends BaseServerResponseException { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java index 938f6f22148..29dcf899e78 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/interceptor/BearerTokenAuthInterceptor.java @@ -26,7 +26,7 @@ import org.apache.http.client.methods.HttpRequestBase; import ca.uhn.fhir.rest.client.IClientInterceptor; import ca.uhn.fhir.rest.server.Constants; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /** * HTTP interceptor to be used for adding HTTP Authorization using "bearer tokens" to requests. Bearer tokens are used for protocols such as OAUTH2 (see the diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java index ab176bae42d..e3258eb127d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/CompositeCriterion.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.gclient; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; public class CompositeCriterion implements ICompositeWithLeft, ICriterion, ICriterionInternal { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java index 0e11f196366..5824caf1cd7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityClientParam.java @@ -19,8 +19,8 @@ package ca.uhn.fhir.rest.gclient; * limitations under the License. * #L% */ +import static org.apache.commons.lang3.StringUtils.defaultString; -import static org.apache.commons.lang3.StringUtils.*; import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; import ca.uhn.fhir.rest.gclient.NumberClientParam.IMatches; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java index e3bdefb6fc8..42490238b23 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/TokenClientParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.gclient; -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; import java.util.Arrays; import java.util.List; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseAddOrDeleteTagsMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseAddOrDeleteTagsMethodBinding.java index 4129f6498d4..8bd9372537f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseAddOrDeleteTagsMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseAddOrDeleteTagsMethodBinding.java @@ -21,15 +21,12 @@ package ca.uhn.fhir.rest.method; */ import java.io.IOException; -import java.io.PrintWriter; import java.io.Reader; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletResponse; - import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.ConfigurationException; @@ -46,7 +43,6 @@ import ca.uhn.fhir.rest.client.BaseHttpClientInvocation; import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.IResourceProvider; import ca.uhn.fhir.rest.server.IRestfulServer; -import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java index a4704600d3a..19a455cd382 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java @@ -48,7 +48,6 @@ import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.IVersionSpecificBundleFactory; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.util.UrlUtil; /** * @author James Agnew diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java index 97fe24ced0e..894005fd62f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java @@ -19,7 +19,7 @@ package ca.uhn.fhir.rest.method; * limitations under the License. * #L% */ -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.IOException; import java.io.InputStream; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java index c6ecbcbcf1f..7fa97abbc71 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java @@ -32,7 +32,6 @@ import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IRestfulServer; -import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.SimpleBundleProvider; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ElementsParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ElementsParameter.java index d08f12630cc..f88102960b9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ElementsParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ElementsParameter.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.method; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.lang.reflect.Method; import java.util.Collection; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/PageMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/PageMethodBinding.java index 2eaa9c97a07..0c44278b5be 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/PageMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/PageMethodBinding.java @@ -38,7 +38,6 @@ import ca.uhn.fhir.model.valueset.BundleTypeEnum; import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.client.BaseHttpClientInvocation; -import ca.uhn.fhir.rest.method.BaseResourceReturningMethodBinding.ResourceOrDstu1Bundle; import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.IBundleProvider; @@ -49,7 +48,7 @@ import ca.uhn.fhir.rest.server.RestfulServerUtils; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; public class PageMethodBinding extends BaseResourceReturningMethodBinding { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/RequestDetails.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/RequestDetails.java index 5d074f8fbe5..f93f3e7cae2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/RequestDetails.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/RequestDetails.java @@ -33,7 +33,6 @@ import java.util.Map; import org.hl7.fhir.instance.model.api.IIdType; -import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.server.IRestfulResponse; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SortParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SortParameter.java index 38e8bc51bd0..7875bd2368e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SortParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SortParameter.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.method; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.lang.reflect.Method; import java.util.ArrayList; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SummaryEnumParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SummaryEnumParameter.java index d76a9362b12..7628457c1e5 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SummaryEnumParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SummaryEnumParameter.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.method; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.lang.reflect.Method; import java.util.ArrayList; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/TransactionMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/TransactionMethodBinding.java index 4439e895cbe..756de57e785 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/TransactionMethodBinding.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/TransactionMethodBinding.java @@ -45,7 +45,6 @@ import ca.uhn.fhir.rest.param.TransactionParameter; import ca.uhn.fhir.rest.param.TransactionParameter.ParamStyle; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IRestfulServer; -import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java index b56cc8e48a8..8a48fb53ed7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseAndListParam.java @@ -26,7 +26,6 @@ import java.util.List; import ca.uhn.fhir.model.api.IQueryParameterAnd; import ca.uhn.fhir.model.api.IQueryParameterOr; import ca.uhn.fhir.rest.method.QualifiedParamList; -import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; public abstract class BaseAndListParam> implements IQueryParameterAnd { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java index f38412016d4..beb5731a32e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java @@ -29,7 +29,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.FhirContext; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java index d6bf2cc74e8..b3cd13987fe 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeAndListParam.java @@ -1,7 +1,7 @@ package ca.uhn.fhir.rest.param; import ca.uhn.fhir.model.api.IQueryParameterType; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java index 78f92233005..dc71c0fe43c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeOrListParam.java @@ -1,7 +1,7 @@ package ca.uhn.fhir.rest.param; import ca.uhn.fhir.model.api.IQueryParameterType; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java index 2506799265e..a638202ea0a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CompositeParam.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.util.List; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java index 4df4b351b77..57e5ed61b0d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateAndListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java index 34fc5f78269..870fb6c98f7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java index 7ef86ab70c0..4ade9ae6b58 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java @@ -32,7 +32,7 @@ import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.CodeDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; @CoverageIgnore public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java index 91f165fe22c..a4d85951d6e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberAndListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java index 0b464d474af..aa72ea0aa9d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java index 5c18cffa652..a7bbd1e546d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NumberParam.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; import java.math.BigDecimal; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifiedDateParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifiedDateParam.java index e0fedce6463..51467e0ab63 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifiedDateParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QualifiedDateParam.java @@ -23,7 +23,7 @@ package ca.uhn.fhir.rest.param; import java.util.Date; import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /** * @deprecated Use {@link DateParam} instead (this class is identical, but was renamed to be less confusing) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java index fe901acc917..ee643d00afc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityAndListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java index eb220f26229..3108821dfd9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java index 30dd986fdb8..e676d755046 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/QuantityParam.java @@ -19,9 +19,8 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static ca.uhn.fhir.rest.param.ParameterUtil.*; -import static org.apache.commons.lang3.StringUtils.*; +import static ca.uhn.fhir.rest.param.ParameterUtil.escape; +import static org.apache.commons.lang3.StringUtils.defaultString; import java.math.BigDecimal; import java.util.List; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java index 23a54313354..bd0174b0838 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceAndListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java index 33b7b63e2f7..7eff7036eab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java index 5e40ee5bccc..1181d8afaaf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ReferenceParam.java @@ -19,8 +19,8 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java index fa86a054849..cc428ff2aab 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java @@ -19,8 +19,8 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java index 99b305ca595..93ac1a1b349 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringAndListParam.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.param; -import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java index d7eaae1acb6..7b25e0c008f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/StringOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java index 37fd503398b..a0393b83775 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenAndListParam.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.param; -import ca.uhn.fhir.rest.method.RestSearchParameterTypeEnum; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java index 459ed5e6dc8..cdf3c01ca3a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java @@ -5,7 +5,7 @@ import java.util.List; import ca.uhn.fhir.model.base.composite.BaseCodingDt; import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java index 00ce7966e1a..c73b8fcb403 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenParam.java @@ -19,8 +19,8 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java index 3cbb65a5dcb..2e93f050474 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriAndListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java index 1df8ae1f4e1..a323d9e103a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriOrListParam.java @@ -1,6 +1,6 @@ package ca.uhn.fhir.rest.param; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java index 0ea75a510c8..1cad8be83b2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.rest.param; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.defaultString; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ToStringBuilder; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java index 57005048353..2779b68460e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/AuthenticationException.java @@ -1,7 +1,7 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java index 88c83e72c22..a189fbd65e7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ForbiddenOperationException.java @@ -1,10 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java index 72d8cee7991..c4aa7b1f21f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InternalErrorException.java @@ -1,10 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java index 61765c85bcd..4b0b3420fb7 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/InvalidRequestException.java @@ -1,10 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java index 7a2449183bd..3ae4f63db6c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotImplementedOperationException.java @@ -1,10 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java index 178814c2fab..3bba6c57caa 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/NotModifiedException.java @@ -1,10 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /* * #%L diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java index e977bb3a98d..5e4d20400b3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/PreconditionFailedException.java @@ -1,31 +1,10 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.annotation.Update; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /** * Represents an HTTP 412 Precondition Failed response. This exception diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java index bf285cd7846..fbcf3336c4f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceGoneException.java @@ -1,33 +1,12 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /** * Represents an HTTP 410 Resource Gone response, which geenerally diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java index a5a3d3c88f4..15368b1e0d1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceNotFoundException.java @@ -1,27 +1,5 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IIdType; @@ -29,6 +7,7 @@ import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /** * Represents an HTTP 404 Resource Not Found response, which means that the request is pointing to a resource that does not exist. diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java index 199f8e158fe..4cdbc5759bd 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionConflictException.java @@ -1,32 +1,11 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.annotation.Delete; import ca.uhn.fhir.rest.annotation.Update; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /** * Represents an HTTP 409 Conflict response. This exception should be diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java index 414e1bdc9cc..2511bb1308d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/ResourceVersionNotSpecifiedException.java @@ -1,30 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; /** * @deprecated Use {@link PreconditionFailedException} instead - This exception is diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java index 5824e1368da..475dff4237c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnclassifiedServerFailureException.java @@ -1,9 +1,9 @@ package ca.uhn.fhir.rest.server.exceptions; -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; +import ca.uhn.fhir.util.CoverageIgnore; + /* * #%L * HAPI FHIR - Core Library diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java index 3b3a7d43d40..e959f6c77d8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/UnprocessableEntityException.java @@ -1,31 +1,10 @@ package ca.uhn.fhir.rest.server.exceptions; -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import net.sourceforge.cobertura.CoverageIgnore; - import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.server.Constants; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.OperationOutcomeUtil; /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java index 9f30c592882..ff63538075c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/servlet/ServletRequestDetails.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.rest.server.servlet; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; /* * #%L @@ -33,13 +32,11 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; -import org.apache.tools.ant.taskdefs.GUnzip; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.rest.api.RequestTypeEnum; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java new file mode 100644 index 00000000000..2d01b938730 --- /dev/null +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/CoverageIgnore.java @@ -0,0 +1,5 @@ +package ca.uhn.fhir.util; + +public @interface CoverageIgnore { + // nothing +} diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java index 2664349e882..90c14ae7c73 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java @@ -35,7 +35,6 @@ import org.hl7.fhir.instance.model.api.IBaseHasExtensions; import org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions; import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java index 3deb1aa1b9a..efd7f603ada 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/IModelVisitor.java @@ -23,7 +23,6 @@ package ca.uhn.fhir.util; import java.util.List; import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java index 07947926244..903312ce423 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java @@ -19,8 +19,7 @@ package ca.uhn.fhir.util; * limitations under the License. * #L% */ - -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.util.List; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java index df109076cf9..de9bb3ddbec 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ParametersUtil.java @@ -31,7 +31,6 @@ import org.hl7.fhir.instance.model.api.IPrimitiveType; import ca.uhn.fhir.context.BaseRuntimeChildDefinition; import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.model.primitive.StringDt; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/schematron/SchematronBaseValidator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/schematron/SchematronBaseValidator.java index 98397a8f1a7..915aac7d0f2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/schematron/SchematronBaseValidator.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/schematron/SchematronBaseValidator.java @@ -32,6 +32,12 @@ import org.apache.commons.io.IOUtils; import org.hl7.fhir.instance.model.api.IBaseResource; import org.oclc.purl.dsdl.svrl.SchematronOutputType; +import com.phloc.commons.error.IResourceError; +import com.phloc.commons.error.IResourceErrorGroup; +import com.phloc.schematron.ISchematronResource; +import com.phloc.schematron.SchematronHelper; +import com.phloc.schematron.xslt.SchematronResourceSCH; + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.Bundle; import ca.uhn.fhir.model.api.BundleEntry; @@ -45,12 +51,6 @@ import ca.uhn.fhir.validation.SchemaBaseValidator; import ca.uhn.fhir.validation.SingleValidationMessage; import ca.uhn.fhir.validation.ValidationContext; -import com.phloc.commons.error.IResourceError; -import com.phloc.commons.error.IResourceErrorGroup; -import com.phloc.schematron.ISchematronResource; -import com.phloc.schematron.SchematronHelper; -import com.phloc.schematron.xslt.SchematronResourceSCH; - /** * This class is only used using reflection from {@link SchematronProvider} in order * to be truly optional. diff --git a/hapi-fhir-cobertura/pom.xml b/hapi-fhir-cobertura/pom.xml index 678cd1068f9..ab6a18a03c9 100644 --- a/hapi-fhir-cobertura/pom.xml +++ b/hapi-fhir-cobertura/pom.xml @@ -208,6 +208,7 @@ **/valueset/*.class **/exceptions/*.class + ca.uhn.fhir.util.CoverageIgnore diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 46021e8cf5f..d682370cf8b 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -43,6 +43,11 @@ ejb-api provided + + javax.servlet + javax.servlet-api + provided + org.eclipse.jetty diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index b10c70af069..be7dcf383d4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -53,9 +53,9 @@ import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.lang3.StringUtils; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; +import org.hl7.fhir.dstu21.model.Bundle.HTTPVerb; import org.hl7.fhir.dstu21.model.IdType; import org.hl7.fhir.dstu21.model.StringType; -import org.hl7.fhir.dstu21.model.Bundle.HTTPVerb; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.instance.model.api.IBaseCoding; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; @@ -139,9 +139,9 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.util.OperationOutcomeUtil; -import net.sourceforge.cobertura.CoverageIgnore; public abstract class BaseHapiFhirDao implements IDao { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseSearchParamExtractor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseSearchParamExtractor.java index 837198c7650..2da054f1ced 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseSearchParamExtractor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseSearchParamExtractor.java @@ -27,7 +27,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.util.FhirTerser; public class BaseSearchParamExtractor { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2.java index cb4787e682d..4cc7edd3603 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2.java @@ -56,12 +56,12 @@ import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.IValidationContext; import ca.uhn.fhir.validation.IValidatorModule; import ca.uhn.fhir.validation.ValidationResult; -import net.sourceforge.cobertura.CoverageIgnore; public class FhirResourceDaoDstu2 extends BaseHapiFhirResourceDao { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu21.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu21.java index f7838db8b8e..b4bc00a5daf 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu21.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu21.java @@ -54,12 +54,12 @@ import ca.uhn.fhir.rest.server.EncodingEnum; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.FhirTerser; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.IValidationContext; import ca.uhn.fhir.validation.IValidatorModule; import ca.uhn.fhir.validation.ValidationResult; -import net.sourceforge.cobertura.CoverageIgnore; public class FhirResourceDaoDstu21 extends BaseHapiFhirResourceDao { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSearchDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSearchDao.java index a7c2d24e8dd..7d29b8a5e15 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSearchDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSearchDao.java @@ -52,13 +52,11 @@ import org.springframework.transaction.annotation.Transactional; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString; import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.dstu.resource.BaseResource; import ca.uhn.fhir.model.primitive.IdDt; import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu21.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu21.java index 329e89827f9..8ee4d32745a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu21.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu21.java @@ -70,10 +70,7 @@ import ca.uhn.fhir.jpa.entity.ResourceTable; import ca.uhn.fhir.jpa.entity.TagDefinition; import ca.uhn.fhir.jpa.provider.ServletSubRequestDetails; import ca.uhn.fhir.jpa.util.DeleteConflict; -import ca.uhn.fhir.model.api.IResource; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; -import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; -import ca.uhn.fhir.model.primitive.InstantDt; import ca.uhn.fhir.parser.DataFormatException; import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.rest.api.RequestTypeEnum; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java index 247d1cb0754..f81f9b51166 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IDao.java @@ -5,7 +5,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.jpa.entity.BaseHasResource; import ca.uhn.fhir.model.api.IResource; -import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum; import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource; /* 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 419de4493a8..552b723abc7 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 @@ -70,7 +70,6 @@ import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.context.RuntimeChildResourceDefinition; import ca.uhn.fhir.context.RuntimeResourceDefinition; import ca.uhn.fhir.context.RuntimeSearchParam; -import ca.uhn.fhir.jpa.dao.SearchParameterMap.EverythingModeEnum; import ca.uhn.fhir.jpa.dao.data.ISearchResultDao; import ca.uhn.fhir.jpa.entity.BaseHasResource; import ca.uhn.fhir.jpa.entity.BaseResourceIndexedSearchParam; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BaseResourceIndexedSearchParam.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BaseResourceIndexedSearchParam.java index 65fae6bcd4d..c32f1928b94 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BaseResourceIndexedSearchParam.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/BaseResourceIndexedSearchParam.java @@ -32,7 +32,6 @@ import javax.persistence.MappedSuperclass; import org.hibernate.search.annotations.ContainedIn; import org.hibernate.search.annotations.Field; -import org.hibernate.search.annotations.Store; @MappedSuperclass public abstract class BaseResourceIndexedSearchParam implements Serializable { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamNumber.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamNumber.java index db7f1532b5a..20cc30edd9a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamNumber.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamNumber.java @@ -33,7 +33,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.FieldBridge; -import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.NumericField; import ca.uhn.fhir.jpa.util.BigDecimalNumericFieldBridge; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamQuantity.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamQuantity.java index 1836d3c427e..1aa729071a6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamQuantity.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamQuantity.java @@ -33,7 +33,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.FieldBridge; -import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.NumericField; import ca.uhn.fhir.jpa.util.BigDecimalNumericFieldBridge; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java index 2d22e997330..8d3f53652ef 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamString.java @@ -32,28 +32,13 @@ import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import org.apache.lucene.analysis.core.LowerCaseFilterFactory; -import org.apache.lucene.analysis.core.StopFilterFactory; -import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilterFactory; -import org.apache.lucene.analysis.ngram.EdgeNGramFilterFactory; -import org.apache.lucene.analysis.ngram.NGramFilterFactory; -import org.apache.lucene.analysis.pattern.PatternTokenizerFactory; -import org.apache.lucene.analysis.phonetic.PhoneticFilterFactory; -import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory; -import org.apache.lucene.analysis.standard.StandardFilterFactory; -import org.apache.lucene.analysis.standard.StandardTokenizerFactory; import org.hibernate.search.annotations.Analyze; import org.hibernate.search.annotations.Analyzer; -import org.hibernate.search.annotations.AnalyzerDef; -import org.hibernate.search.annotations.AnalyzerDefs; import org.hibernate.search.annotations.ContainedIn; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Fields; import org.hibernate.search.annotations.Indexed; -import org.hibernate.search.annotations.Parameter; import org.hibernate.search.annotations.Store; -import org.hibernate.search.annotations.TokenFilterDef; -import org.hibernate.search.annotations.TokenizerDef; //@formatter:off @Embeddable diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamToken.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamToken.java index 05a8e9497bd..a6f3b407b87 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamToken.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamToken.java @@ -31,7 +31,6 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.hibernate.search.annotations.Field; -import org.hibernate.search.annotations.Indexed; @Embeddable @Entity diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamUri.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamUri.java index 6fa9351f7ef..8f27a136c12 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamUri.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceIndexedSearchParamUri.java @@ -29,9 +29,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; -import org.hibernate.search.annotations.Analyzer; import org.hibernate.search.annotations.Field; -import org.hibernate.search.annotations.Indexed; //@formatter:off @Embeddable diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java index 4e517f0e0ca..d7e56cbed67 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java @@ -30,7 +30,6 @@ import org.apache.commons.lang3.StringUtils; import org.jboss.logging.MDC; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.method.RequestDetails; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; public class BaseJpaProvider { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java index a243d483a75..8251cb45e05 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java @@ -37,7 +37,7 @@ import ca.uhn.fhir.rest.annotation.Read; import ca.uhn.fhir.rest.annotation.Since; import ca.uhn.fhir.rest.server.IBundleProvider; import ca.uhn.fhir.rest.server.IResourceProvider; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; public abstract class BaseJpaResourceProvider extends BaseJpaProvider implements IResourceProvider { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java index c2f1190991c..bd2931e3341 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderValueSetDstu2.java @@ -24,8 +24,6 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.lang3.BooleanUtils; - import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult; import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java index 13e6322a207..447a28b07d0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java @@ -41,8 +41,8 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.provider.ServerConformanceProvider; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.ExtensionConstants; -import net.sourceforge.cobertura.CoverageIgnore; public class JpaConformanceProviderDstu1 extends ServerConformanceProvider { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java index 297358d8ec0..fca4633380d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java @@ -43,8 +43,8 @@ import ca.uhn.fhir.model.primitive.BoundCodeDt; import ca.uhn.fhir.model.primitive.DecimalDt; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.ExtensionConstants; -import net.sourceforge.cobertura.CoverageIgnore; public class JpaConformanceProviderDstu2 extends ServerConformanceProvider { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu21.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu21.java index 03713c378c8..7fc75384517 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu21.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu21.java @@ -43,8 +43,8 @@ import ca.uhn.fhir.context.RuntimeSearchParam; import ca.uhn.fhir.jpa.dao.DaoConfig; import ca.uhn.fhir.jpa.dao.IFhirSystemDao; import ca.uhn.fhir.rest.server.RestfulServer; +import ca.uhn.fhir.util.CoverageIgnore; import ca.uhn.fhir.util.ExtensionConstants; -import net.sourceforge.cobertura.CoverageIgnore; public class JpaConformanceProviderDstu21 extends org.hl7.fhir.dstu21.hapi.rest.server.ServerConformanceProvider { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java index 7eec84b4c04..044071a8943 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu2.java @@ -34,11 +34,10 @@ import ca.uhn.fhir.model.dstu2.resource.Subscription; import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum; import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.method.RequestDetails; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /** * Interceptor which requires newly created {@link Subscription subscriptions} to be in diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu21.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu21.java index f6cf58f513d..558e6df1ed5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu21.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/SubscriptionsRequireManualActivationInterceptorDstu21.java @@ -38,7 +38,7 @@ import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.rest.server.interceptor.InterceptorAdapter; -import net.sourceforge.cobertura.CoverageIgnore; +import ca.uhn.fhir.util.CoverageIgnore; /** * Interceptor which requires newly created {@link Subscription subscriptions} to be in diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 92063216f21..9453a4778a2 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -181,7 +181,7 @@ org.apache.maven.plugins maven-surefire-plugin - false + true random -Dfile.encoding=UTF-8 false diff --git a/pom.xml b/pom.xml index 004e9ec2661..f7922d01791 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,7 @@ + junit junit diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a7886c1f5ff..c918556b385 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -81,6 +81,10 @@ project to provide nice syntax highlighting. Thanks to Rob Hausam for noting that this wasn't there. + + Introduce custom @CoverageIgnore annotation to hapi-fhir-base in order to + remove dependency on cobertura during build and in runtime. +