Skip to content

Commit 1102797

Browse files
author
Valerian
committed
refactoring
1 parent 5742bca commit 1102797

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/scala/dynamodb/mapper.scala

+1-8
Original file line numberDiff line numberDiff line change
@@ -588,21 +588,14 @@ trait AmazonDynamoDBScalaMapper {
588588
def scan[T](
589589
scanFilter: Map[String, Condition] = Map.empty
590590
)(implicit serializer: DynamoDBSerializer[T]): Future[Seq[T]] = {
591-
val scanRequest =
592-
new ScanRequest()
593-
.withTableName(tableName)
594-
.withScanFilter(scanFilter.asJava)
595-
if (logger.isDebugEnabled)
596-
scanRequest.setReturnConsumedCapacity(ReturnConsumedCapacity.TOTAL)
597-
598591
val builder = Seq.newBuilder[T]
599592

600593
def local(lastKey: Option[DynamoDBKey] = None): Future[Seq[T]] =
601594
scanProgressively(scanFilter, lastEvaluatedKey = lastKey).flatMap {
602595
case (key, result) =>
603596
builder ++= result
604597
key match {
605-
case None => Future.successful(builder.result)
598+
case None => Future.successful(builder.result())
606599
case optKey => local(optKey)
607600
}
608601
}

0 commit comments

Comments
 (0)