Skip to content

Commit

Permalink
OLMIS-8030 Revert OrderableDto 'newInstances' to 'newInstance', bump …
Browse files Browse the repository at this point in the history
…up version to 15.2.7-RC2 (#127)

* OLMIS-8030 Revert OrderableDto 'newInstances' to 'newInstance'

* Bumped up version to 15.2.7-RC2
  • Loading branch information
mgrochalskisoldevelo authored Oct 25, 2024
1 parent 9a4fac5 commit bb8b64c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ serviceName=openlmis-referencedata
# Only a Release Manager should update this
# See https://openlmis.atlassian.net/wiki/display/OP/Rolling+a+Release
######################################################################
serviceVersion=15.2.7-RC1
serviceVersion=15.2.7-RC2
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class DataImportControllerIntegrationTest extends BaseWebIntegrationTest
private static final MultipartFile file = new MockMultipartFile(
"orderable.csv", "test-data".getBytes());
private final Orderable orderable = new OrderableDataBuilder().build();
private final OrderableDto orderableDto = OrderableDto.newInstances(orderable);
private final OrderableDto orderableDto = OrderableDto.newInstance(orderable);

@Before
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void setOrderable(OrderableDto orderable) {

@JsonIgnore
public void setOrderable(Orderable orderable) {
this.orderable = OrderableDto.newInstances(orderable);
this.orderable = OrderableDto.newInstance(orderable);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public final class OrderableDto extends BaseDto implements Orderable.Importer,
*/
public static List<OrderableDto> newInstances(Iterable<Orderable> orderables) {
List<OrderableDto> orderableDtos = new LinkedList<>();
orderables.forEach(oe -> orderableDtos.add(newInstances(oe)));
orderables.forEach(oe -> orderableDtos.add(newInstance(oe)));
return orderableDtos;
}

Expand All @@ -107,7 +107,7 @@ public static List<OrderableDto> newInstances(Iterable<Orderable> orderables) {
* @param po instance of Orderable.
* @return new instance of OrderableDto.
*/
public static OrderableDto newInstances(Orderable po) {
public static OrderableDto newInstance(Orderable po) {
if (po == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public ResponseEntity<OrderableDto> create(

return ResponseEntity.ok()
.headers(buildLastModifiedHeader(orderable.getLastUpdated()))
.body(OrderableDto.newInstances(orderable));
.body(OrderableDto.newInstance(orderable));
}

/**
Expand Down Expand Up @@ -167,7 +167,7 @@ public ResponseEntity<OrderableDto> update(

return ResponseEntity.ok()
.headers(buildLastModifiedHeader(savedOrderable.getLastUpdated()))
.body(OrderableDto.newInstances(savedOrderable));
.body(OrderableDto.newInstance(savedOrderable));
}

/**
Expand Down Expand Up @@ -306,7 +306,7 @@ public ResponseEntity<OrderableDto> getChosenOrderable(
|| orderable.wasModifiedSince(parseHttpDateToZonedDateTime(ifModifiedDate)))
? ResponseEntity.ok()
.headers(buildLastModifiedHeader(orderable.getLastUpdated()))
.body(OrderableDto.newInstances(orderable))
.body(OrderableDto.newInstance(orderable))
: ResponseEntity.status(HttpStatus.NOT_MODIFIED)
.headers(buildLastModifiedHeader(orderable.getLastUpdated()))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class OrderableImportPersisterTest {
public void setUp() {
dataStream = mock(InputStream.class);
orderable = new OrderableDataBuilder().build();
dto = OrderableDto.newInstances(orderable);
dto = OrderableDto.newInstance(orderable);

ReflectionTestUtils.setField(
orderableImportPersister,
Expand Down

0 comments on commit bb8b64c

Please sign in to comment.