Skip to content

Commit 906f932

Browse files
Merge pull request #1123 from chethann-007/release-8.0.0
feat: Migrate to Play Framework 3.0.5, Apache Pekko 1.0.3, and Scala 2.13.12
2 parents 7abad76 + ade9f68 commit 906f932

File tree

249 files changed

+2514
-3110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+2514
-3110
lines changed

content-api/collection-csv-actors/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</dependency>
2929
<dependency>
3030
<groupId>org.sunbird</groupId>
31-
<artifactId>graph-engine_2.12</artifactId>
31+
<artifactId>graph-engine_2.13</artifactId>
3232
<version>1.0-SNAPSHOT</version>
3333
<type>jar</type>
3434
</dependency>
@@ -78,9 +78,9 @@
7878
<scope>test</scope>
7979
</dependency>
8080
<dependency>
81-
<groupId>com.typesafe.akka</groupId>
82-
<artifactId>akka-testkit_${scala.maj.version}</artifactId>
83-
<version>2.5.22</version>
81+
<groupId>org.apache.pekko</groupId>
82+
<artifactId>pekko-testkit_${scala.maj.version}</artifactId>
83+
<version>1.0.3</version>
8484
<scope>test</scope>
8585
</dependency>
8686
<dependency>

content-api/collection-csv-actors/src/main/scala/org.sunbird/collectioncsv/actors/CollectionCSVActor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import org.sunbird.managers.HierarchyManager
1313
import org.sunbird.telemetry.logger.TelemetryManager
1414

1515
import javax.inject.Inject
16-
import scala.collection.JavaConverters.mapAsJavaMapConverter
1716
import scala.collection.immutable.{HashMap, Map}
17+
import scala.jdk.CollectionConverters._
1818
import scala.concurrent.{ExecutionContext, Future}
1919

2020
class CollectionCSVActor @Inject() (implicit oec: OntologyEngineContext, ss: StorageService) extends BaseActor {

content-api/collection-csv-actors/src/main/scala/org.sunbird/collectioncsv/manager/CollectionCSVManager.scala

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ import java.nio.charset.StandardCharsets
2323
import java.util
2424
import java.util.logging.Logger
2525
import scala.collection.immutable.{ListMap, Map}
26-
import scala.collection.convert.ImplicitConversions._
27-
import scala.collection.JavaConverters.{asJavaIterableConverter, mapAsScalaMapConverter}
26+
import scala.jdk.CollectionConverters._
2827
import scala.collection.mutable
2928
import scala.collection.mutable.ListBuffer
3029
import scala.concurrent.{ExecutionContext, Future}
3130

32-
import scala.collection.JavaConverters._
3331

3432
object CollectionCSVManager extends CollectionInputFileReader {
3533

@@ -239,7 +237,7 @@ object CollectionCSVManager extends CollectionInputFileReader {
239237
}
240238

241239
private def populateFolderInfoMap(folderInfoMap: mutable.Map[String, AnyRef], csvRecords: util.List[CSVRecord], mode: String): Unit = {
242-
csvRecords.map(csvRecord => {
240+
csvRecords.asScala.map(csvRecord => {
243241
val csvRecordFolderHierarchyMap: Map[String, String] = csvRecord.toMap.asScala.toMap.filter(colData => {
244242
folderHierarchyHdrColumnsList.contains(colData._1) && colData._2.nonEmpty
245243
})
@@ -258,11 +256,11 @@ object CollectionCSVManager extends CollectionInputFileReader {
258256
if(nodeInfoMap.contains(CollectionTOCConstants.CHILDREN))
259257
{
260258
var childrenSet = nodeInfoMap(CollectionTOCConstants.CHILDREN).asInstanceOf[Seq[String]]
261-
childrenSet ++= Seq(getCode(sortedFoldersDataList.get(sortedFoldersDataKey.indexOf(folderData._1)+1)))
259+
childrenSet ++= Seq(getCode(sortedFoldersDataList(sortedFoldersDataKey.indexOf(folderData._1)+1)))
262260
nodeInfoMap(CollectionTOCConstants.CHILDREN) = childrenSet
263261
}
264262
else {
265-
val childrenList = Seq(getCode(sortedFoldersDataList.get(sortedFoldersDataKey.indexOf(folderData._1)+1)))
263+
val childrenList = Seq(getCode(sortedFoldersDataList(sortedFoldersDataKey.indexOf(folderData._1)+1)))
266264
nodeInfoMap += (CollectionTOCConstants.CHILDREN -> childrenList)
267265
}
268266
folderInfoMap(folderDataHashCode) = nodeInfoMap
@@ -304,7 +302,7 @@ object CollectionCSVManager extends CollectionInputFileReader {
304302
else {
305303
val childrenList = {
306304
if((sortedFoldersDataKey.indexOf(folderData._1)+1) != sortedFoldersDataList.size)
307-
Seq(getCode(sortedFoldersDataList.get(sortedFoldersDataKey.indexOf(folderData._1)+1)))
305+
Seq(getCode(sortedFoldersDataList(sortedFoldersDataKey.indexOf(folderData._1)+1)))
308306
else Seq.empty[String]
309307
}
310308
scala.collection.mutable.Map(CollectionTOCConstants.NAME -> folderData._2, CollectionTOCConstants.CHILDREN -> childrenList, CollectionTOCConstants.LEVEL -> folderData._1)
@@ -470,9 +468,9 @@ object CollectionCSVManager extends CollectionInputFileReader {
470468
if(nodeInfo(CollectionTOCConstants.DIAL_CODES) != null && nodeInfo(CollectionTOCConstants.DIAL_CODES).toString.nonEmpty)
471469
new util.HashMap[String, String]{put(CollectionTOCConstants.IDENTIFIER, nodeInfo(CollectionTOCConstants.IDENTIFIER).toString); put(CollectionTOCConstants.DIALCODE, nodeInfo(CollectionTOCConstants.DIAL_CODES).toString)}
472470
else new util.HashMap[String, String]()
473-
}).filter(record => record.nonEmpty).toList
471+
}).filter(record => !record.isEmpty).toList
474472

475-
if(linkDIALCodeReqMap.nonEmpty) linkDIALCode(channelID, collectionID, linkDIALCodeReqMap)
473+
if(!linkDIALCodeReqMap.isEmpty) linkDIALCode(channelID, collectionID, linkDIALCodeReqMap)
476474
}
477475

478476

content-api/collection-csv-actors/src/main/scala/org.sunbird/collectioncsv/util/CollectionTOCUtil.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import org.sunbird.graph.OntologyEngineContext
77
import org.sunbird.telemetry.logger.TelemetryManager
88

99
import java.util
10-
import scala.collection.JavaConverters._
1110
import java.text.MessageFormat
1211
import scala.collection.immutable.Map
12+
import scala.jdk.CollectionConverters._
1313
import scala.concurrent.ExecutionContext
1414

1515

0 commit comments

Comments
 (0)