Skip to content

Commit

Permalink
Add missing @OverRide annotations
Browse files Browse the repository at this point in the history
Added missing @OverRide annotations so that if/when methods in superclasses change
there will be a compile-time error if subclasses haven't been changed accordingly.

This was done using IntelliJ IDEA's "Missing @OverRide annotation" inspection.
  • Loading branch information
InfiniteLoop90 authored and jamesagnew committed Oct 2, 2019
1 parent da9efae commit 08825a8
Show file tree
Hide file tree
Showing 23 changed files with 956 additions and 889 deletions.
Expand Up @@ -87,11 +87,13 @@ private UrlEncodedFormEntity createFormEntity(List<NameValuePair> parameters) {
}


@Override
protected IHttpRequest createHttpRequest() {
IHttpRequest retVal = createHttpRequest((HttpEntity)null);
return retVal;
}

@Override
protected IHttpRequest createHttpRequest(byte[] content) {
/*
* Note: Be careful about changing which constructor we use for
Expand All @@ -109,6 +111,7 @@ private ApacheHttpRequest createHttpRequest(HttpEntity theEntity) {
return result;
}

@Override
protected IHttpRequest createHttpRequest(Map<String, List<String>> theParams) {
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
for (Entry<String, List<String>> nextParam : theParams.entrySet()) {
Expand All @@ -124,6 +127,7 @@ protected IHttpRequest createHttpRequest(Map<String, List<String>> theParams) {
}


@Override
protected IHttpRequest createHttpRequest(String theContents) {
/*
* We aren't using a StringEntity here because the constructors
Expand Down
Expand Up @@ -76,6 +76,7 @@ public LoggingInterceptor(boolean theVerbose) {
}
}

@Override
@Hook(Pointcut.CLIENT_REQUEST)
public void interceptRequest(IHttpRequest theRequest) {
if (myLogRequestSummary) {
Expand All @@ -101,6 +102,7 @@ public void interceptRequest(IHttpRequest theRequest) {
}
}

@Override
@Hook(Pointcut.CLIENT_RESPONSE)
public void interceptResponse(IHttpResponse theResponse) throws IOException {
if (myLogResponseSummary) {
Expand Down
Expand Up @@ -35,10 +35,12 @@ public IgPackParserDstu2(FhirContext theCtx) {
super(massage(theCtx));
}

@Override
protected IValidationSupport createValidationSupport(Map<IIdType, IBaseResource> theIgResources) {
return new IgPackValidationSupportDstu2(theIgResources);
}

@Override
protected FhirVersionEnum provideExpectedVersion() {
return FhirVersionEnum.DSTU2_HL7ORG;
}
Expand Down
Expand Up @@ -37,10 +37,12 @@ public IgPackParserDstu3(FhirContext theCtx) {
super(theCtx);
}

@Override
protected IValidationSupport createValidationSupport(Map<IIdType, IBaseResource> theIgResources) {
return new IgPackValidationSupportDstu3(theIgResources);
}

@Override
protected FhirVersionEnum provideExpectedVersion() {
return FhirVersionEnum.DSTU3;
}
Expand Down
Expand Up @@ -41,11 +41,13 @@ public class WebsocketWithCriteriaDstu2Test extends BaseResourceProviderDstu2Tes
private WebSocketClient myWebSocketClient;
private SocketImplementation mySocketImplementation;

@Override
@After
public void after() throws Exception {
super.after();
}

@Override
@Before
public void before() throws Exception {
super.before();
Expand Down
Expand Up @@ -58,6 +58,7 @@ public class WebsocketWithSubscriptionIdDstu2Test extends BaseResourceProviderDs
@Autowired
private SubscriptionTestUtil mySubscriptionTestUtil;

@Override
@After
public void after() throws Exception {
super.after();
Expand All @@ -70,6 +71,7 @@ public void afterCloseWebsocket() throws Exception {
myWebSocketClient.stop();
}

@Override
@Before
public void before() throws Exception {
super.before();
Expand Down
Expand Up @@ -1021,6 +1021,7 @@ private String genFullUrl(String bundleBase, String entryBase, String type, Stri
return Utilities.appendSlash(base) + type + "/" + id;
}

@Override
public BestPracticeWarningLevel getBasePracticeWarningLevel() {
return bpWarnings;
}
Expand Down Expand Up @@ -1416,6 +1417,7 @@ public void setAnyExtensionsAllowed(boolean anyExtensionsAllowed) {
this.anyExtensionsAllowed = anyExtensionsAllowed;
}

@Override
public void setBestPracticeWarningLevel(BestPracticeWarningLevel value) {
bpWarnings = value;
}
Expand All @@ -1429,10 +1431,12 @@ public void setSuppressLoincSnomedMessages(boolean suppressLoincSnomedMessages)
this.suppressLoincSnomedMessages = suppressLoincSnomedMessages;
}

@Override
public IdStatus getResourceIdRule() {
return resourceIdRule;
}

@Override
public void setResourceIdRule(IdStatus resourceIdRule) {
this.resourceIdRule = resourceIdRule;
}
Expand Down
Expand Up @@ -35,6 +35,7 @@ public class ContainedDt extends BaseContainedDt {
@Child(name = "resource", type = IResource.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
private List<IResource> myContainedResources;

@Override
public List<IResource> getContainedResources() {
if (myContainedResources == null) {
myContainedResources = new ArrayList<IResource>();
Expand Down
Expand Up @@ -114,7 +114,8 @@ public BoundCodeDt<NarrativeStatusEnum> getStatusElement() {
* The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data
* </p>
*/
public BoundCodeDt<NarrativeStatusEnum> getStatus() {
@Override
public BoundCodeDt<NarrativeStatusEnum> getStatus() {
if (myStatus == null) {
myStatus = new BoundCodeDt<NarrativeStatusEnum>(NarrativeStatusEnum.VALUESET_BINDER);
}
Expand Down Expand Up @@ -170,7 +171,8 @@ public XhtmlDt getDivElement() {
* The actual narrative content, a stripped down version of XHTML
* </p>
*/
public XhtmlDt getDiv() {
@Override
public XhtmlDt getDiv() {
if (myDiv == null) {
myDiv = new XhtmlDt();
}
Expand Down
Expand Up @@ -162,7 +162,8 @@ public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T>
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
* </p>
*/
public IdDt getReference() {
@Override
public IdDt getReference() {
if (myReference == null) {
myReference = new IdDt();
}
Expand All @@ -183,6 +184,7 @@ public IdDt getReferenceElement() {
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
* </p>
*/
@Override
public ResourceReferenceDt setReference(IdDt theValue) {
myReference = theValue;
return this;
Expand All @@ -196,7 +198,8 @@ public ResourceReferenceDt setReference(IdDt theValue) {
* A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources
* </p>
*/
public ResourceReferenceDt setReference( String theId) {
@Override
public ResourceReferenceDt setReference(String theId) {
myReference = new IdDt(theId);
return this;
}
Expand Down Expand Up @@ -240,7 +243,8 @@ public ResourceReferenceDt setDisplay(StringDt theValue) {
* Plain text narrative that identifies the resource in addition to the resource reference
* </p>
*/
public ResourceReferenceDt setDisplay( String theString) {
@Override
public ResourceReferenceDt setDisplay(String theString) {
myDisplay = new StringDt(theString);
return this;
}
Expand Down
Expand Up @@ -313,10 +313,12 @@ public void setContained(ContainedDt theContained) {
myContained = theContained;
}

@Override
public void setId(IdDt theId) {
myId = theId;
}

@Override
public BaseResource setId(IIdType theId) {
if (theId instanceof IdDt) {
myId = (IdDt) theId;
Expand All @@ -328,6 +330,7 @@ public BaseResource setId(IIdType theId) {
return this;
}

@Override
public BaseResource setId(String theId) {
if (theId == null) {
myId = null;
Expand Down
Expand Up @@ -142,6 +142,7 @@ public static void assertConcurrent(final String message, final List<? extends R
final CountDownLatch allDone = new CountDownLatch(numThreads);
for (final Runnable submittedTestRunnable : runnables) {
threadPool.submit(new Runnable() {
@Override
public void run() {
allExecutorThreadsReady.countDown();
try {
Expand Down
Expand Up @@ -17,6 +17,7 @@ public class CustomMedicationOrderDstu2 extends MedicationOrder {
@Child(name = "medication", order = Child.REPLACE_PARENT, min = 1, max = 1, summary = false, modifier = false, type = { Medication.class })
private ResourceReferenceDt myMedication;

@Override
public ResourceReferenceDt getMedication() {
return myMedication;
}
Expand Down

0 comments on commit 08825a8

Please sign in to comment.