Skip to content

Commit

Permalink
Optimization of the code (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett authored Mar 8, 2023
2 parents 77e3344 + ca52eec commit 1c038b0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 28 deletions.
4 changes: 0 additions & 4 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private void prepareEncounterMessage(@NotNull EventMetadata metadata) {
} else {
log.error("ONE OF THE REFERENCES WAS NULL");
}

this.processBrokers(encounter);
}

Expand Down Expand Up @@ -256,12 +256,12 @@ private Bundle.BundleEntryComponent getConditionBundleComponent(Condition condit

return bundleEntryComponent;
}

private void processBrokers(@Nonnull Encounter encounter) {
log.error("encounter {}", encounter);
Bundle bundle = new Bundle();
this.processThroughBrokers(encounter, bundle);

List<Class<? extends InteropBroker>> brokers = new ArrayList<>(ClassUtils.getInteropBrokers());
log.error("Num of brokers :: {}", brokers.size());
log.error("Brokers :: {}", brokers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public void shouldReturnOpenMRSPatientObject() {
@Test
public void verifySpecifiedActions() {
List<Event.Action> actions = encounterObserver.actions();
assertThat(actions, hasSize(5));
assertThat(actions,
hasItems(Event.Action.CREATED, Event.Action.VOIDED, Event.Action.UNVOIDED, Event.Action.UPDATED));
assertThat(actions, hasSize(2));
assertThat(actions, hasItems(Event.Action.CREATED, Event.Action.UPDATED));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void shouldReturnOpenMRSPatientObject() {
@Test
public void verifySpecifiedActions() {
List<Event.Action> actions = patientObserver.actions();
assertThat(actions, hasSize(5));
assertThat(actions, hasItems(Event.Action.CREATED, Event.Action.VOIDED, Event.Action.UPDATED));
assertThat(actions, hasSize(2));
assertThat(actions, hasItems(Event.Action.CREATED, Event.Action.UPDATED));
}

@Test
Expand Down
4 changes: 0 additions & 4 deletions kafka-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
<artifactId>openhim-connector</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>interop-broker</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions openhim-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
Expand Down Expand Up @@ -186,7 +185,7 @@
</execution>
</executions>
</plugin>
<plugin>
<!--<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.8.0</version>
Expand All @@ -201,7 +200,7 @@
</goals>
</execution>
</executions>
</plugin>
</plugin>-->
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit 1c038b0

Please sign in to comment.