Skip to content

Commit

Permalink
Merge pull request #107 from xuwei-k/CollectionConverters
Browse files Browse the repository at this point in the history
fix warnings. use `scala.jdk.CollectionConverters`
  • Loading branch information
xuwei-k authored Oct 14, 2024
2 parents 2ac5aed + 256bae7 commit 3eb783f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private[xsbt] class ParallelResolveEngine(
artifactFilter: Filter,
options: DownloadOptions
): Unit = {
import scala.collection.JavaConverters._
import scala.jdk.CollectionConverters._
val start = System.currentTimeMillis
report.getArtifacts match {
case typed: java.util.List[Artifact @unchecked] =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private[xsbt] class ParallelRetrieveEngine(
else settings.resolveFile(IvyPatternHelper.getTokenRoot(destIvyPattern))

implicit val ec = ParallelRetrieveEngine.retrieveExecutionContext
import scala.collection.JavaConverters._
import scala.jdk.CollectionConverters._
type ValueType = julSet[String]
val allRetrivedFuture = artifactsToCopy.entrySet().asScala.map {
case artifactAndPaths: julMap.Entry[ArtifactDownloadReport, ValueType] @unchecked =>
Expand Down
4 changes: 2 additions & 2 deletions launcher-implementation/src/main/scala/xsbt/boot/Update.scala
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ final class Update(config: UpdateConfiguration) {
modules collectFirst { case m if m.getModuleId.equals(dep) => m.getRevision }
}
private[this] def moduleRevisionIDs(report: ResolveReport): Seq[ModuleRevisionId] = {
import collection.JavaConverters._
import scala.jdk.CollectionConverters._
import org.apache.ivy.core.resolve.IvyNode
report.getDependencies.asInstanceOf[java.util.List[IvyNode]].asScala.toSeq map (_.getResolvedId)
}
Expand Down Expand Up @@ -446,7 +446,7 @@ final class Update(config: UpdateConfiguration) {
}
// infrastructure is needed to avoid duplication between this class and the ivy/ subproject
private def hasImplicitClassifier(artifact: IArtifact): Boolean = {
import collection.JavaConverters._
import scala.jdk.CollectionConverters._
artifact.getQualifiedExtraAttributes.asScala.keys.exists(_.asInstanceOf[String] startsWith "m:")
}
// exclude the local Maven repository for Scala -SNAPSHOTs
Expand Down

0 comments on commit 3eb783f

Please sign in to comment.