diff --git a/gradle.properties b/gradle.properties index 91c325ee..1aa99b4a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/src/integration-test/java/org/openlmis/referencedata/web/DataImportControllerIntegrationTest.java b/src/integration-test/java/org/openlmis/referencedata/web/DataImportControllerIntegrationTest.java index b30b756b..7f34ddcf 100644 --- a/src/integration-test/java/org/openlmis/referencedata/web/DataImportControllerIntegrationTest.java +++ b/src/integration-test/java/org/openlmis/referencedata/web/DataImportControllerIntegrationTest.java @@ -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 diff --git a/src/main/java/org/openlmis/referencedata/dto/ApprovedProductDto.java b/src/main/java/org/openlmis/referencedata/dto/ApprovedProductDto.java index ec466f07..7f522499 100644 --- a/src/main/java/org/openlmis/referencedata/dto/ApprovedProductDto.java +++ b/src/main/java/org/openlmis/referencedata/dto/ApprovedProductDto.java @@ -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 diff --git a/src/main/java/org/openlmis/referencedata/dto/OrderableDto.java b/src/main/java/org/openlmis/referencedata/dto/OrderableDto.java index 919a61ee..93d044a9 100644 --- a/src/main/java/org/openlmis/referencedata/dto/OrderableDto.java +++ b/src/main/java/org/openlmis/referencedata/dto/OrderableDto.java @@ -97,7 +97,7 @@ public final class OrderableDto extends BaseDto implements Orderable.Importer, */ public static List newInstances(Iterable orderables) { List orderableDtos = new LinkedList<>(); - orderables.forEach(oe -> orderableDtos.add(newInstances(oe))); + orderables.forEach(oe -> orderableDtos.add(newInstance(oe))); return orderableDtos; } @@ -107,7 +107,7 @@ public static List newInstances(Iterable 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; } diff --git a/src/main/java/org/openlmis/referencedata/web/OrderableController.java b/src/main/java/org/openlmis/referencedata/web/OrderableController.java index 4a2055d7..1edf30c5 100644 --- a/src/main/java/org/openlmis/referencedata/web/OrderableController.java +++ b/src/main/java/org/openlmis/referencedata/web/OrderableController.java @@ -123,7 +123,7 @@ public ResponseEntity create( return ResponseEntity.ok() .headers(buildLastModifiedHeader(orderable.getLastUpdated())) - .body(OrderableDto.newInstances(orderable)); + .body(OrderableDto.newInstance(orderable)); } /** @@ -167,7 +167,7 @@ public ResponseEntity update( return ResponseEntity.ok() .headers(buildLastModifiedHeader(savedOrderable.getLastUpdated())) - .body(OrderableDto.newInstances(savedOrderable)); + .body(OrderableDto.newInstance(savedOrderable)); } /** @@ -306,7 +306,7 @@ public ResponseEntity 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(); diff --git a/src/test/java/org/openlmis/referencedata/service/export/OrderableImportPersisterTest.java b/src/test/java/org/openlmis/referencedata/service/export/OrderableImportPersisterTest.java index 86920262..bb9fafaa 100644 --- a/src/test/java/org/openlmis/referencedata/service/export/OrderableImportPersisterTest.java +++ b/src/test/java/org/openlmis/referencedata/service/export/OrderableImportPersisterTest.java @@ -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,