Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLMIS-8030 Revert OrderableDto 'newInstances' to 'newInstance', bump up version to 15.2.7-RC2 #127

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading