diff --git a/ivy/ComponentManager.scala b/ivy/ComponentManager.scala index 79b83fc32..6e6e3d95e 100644 --- a/ivy/ComponentManager.scala +++ b/ivy/ComponentManager.scala @@ -25,7 +25,7 @@ class ComponentManager(globalLock: xsbti.GlobalLock, provider: xsbti.ComponentPr try { update(id); getOrElse(createAndCache) } catch { case e: NotInCache => createAndCache } } - def getOrElse(orElse: => Iterable[File]) = + def getOrElse(orElse: => Iterable[File]): Iterable[File] = { val existing = provider.component(id) if(existing.isEmpty) orElse else existing diff --git a/ivy/CustomXmlParser.scala b/ivy/CustomXmlParser.scala index a8b7d9b43..f773b1ce9 100644 --- a/ivy/CustomXmlParser.scala +++ b/ivy/CustomXmlParser.scala @@ -14,10 +14,10 @@ import plugins.repository.Resource import plugins.repository.url.URLResource /** Subclasses the default Ivy file parser in order to provide access to protected methods.*/ -private[sbt] object CustomXmlParser extends XmlModuleDescriptorParser with NotNull +private[sbt] object CustomXmlParser extends XmlModuleDescriptorParser { import XmlModuleDescriptorParser.Parser - class CustomParser(settings: IvySettings, defaultConfig: Option[String]) extends Parser(CustomXmlParser, settings) with NotNull + class CustomParser(settings: IvySettings, defaultConfig: Option[String]) extends Parser(CustomXmlParser, settings) { if(defaultConfig.isDefined) setDefaultConfMapping("*->default(compile)") diff --git a/ivy/Ivy.scala b/ivy/Ivy.scala index b2d59c60d..e0d880a94 100644 --- a/ivy/Ivy.scala +++ b/ivy/Ivy.scala @@ -257,13 +257,7 @@ private object IvySbt javaMap(ea.extraAttributes) } private def javaMap(map: Map[String,String]) = - if(map.isEmpty) null - else - { - val wrap = scala.collection.jcl.Map(new java.util.HashMap[String,String]) - wrap ++= map - wrap.underlying - } + if(map.isEmpty) null else scala.collection.JavaConversions.asMap(map) private object javaMap { @@ -337,7 +331,7 @@ private object IvySbt lazy val allConfigurations = moduleID.getPublicConfigurationsNames for(artifact <- artifacts) { - val configurationStrings = + val configurationStrings: Iterable[String] = { val artifactConfigurations = artifact.configurations if(artifactConfigurations.isEmpty) diff --git a/ivy/IvyActions.scala b/ivy/IvyActions.scala index d80b12e13..b566258a5 100644 --- a/ivy/IvyActions.scala +++ b/ivy/IvyActions.scala @@ -60,8 +60,6 @@ object IvyActions } /** Creates a Maven pom from the given Ivy configuration*/ - @deprecated def makePom(module: IvySbt#Module, extraDependencies: Iterable[ModuleID], configurations: Option[Iterable[Configuration]], extra: NodeSeq, output: File): Unit = - makePom(module, MakePomConfiguration(extraDependencies, configurations, extra), output) def makePom(module: IvySbt#Module, configuration: MakePomConfiguration, output: File) { import configuration.{configurations, extra, extraDependencies, filterRepositories, process} @@ -127,7 +125,7 @@ object IvyActions resolveOptions.setLog(ivyLogLevel(logging)) val resolveReport = ivy.resolve(module, resolveOptions) if(resolveReport.hasError) - throw new ResolveException(resolveReport.getAllProblemMessages.toArray.map(_.toString).toList.removeDuplicates) + throw new ResolveException(resolveReport.getAllProblemMessages.toArray.map(_.toString).distinct) } import UpdateLogging.{Quiet, Full, DownloadOnly} @@ -140,4 +138,4 @@ object IvyActions case Full => LOG_DEFAULT } } -final class ResolveException(messages: List[String]) extends RuntimeException(messages.mkString("\n")) \ No newline at end of file +final class ResolveException(messages: Seq[String]) extends RuntimeException(messages.mkString("\n")) \ No newline at end of file