Skip to content

Commit

Permalink
use JavaConverters instead of JavaConversions
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Jan 31, 2017
1 parent df5472e commit 02d865d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/src/main/scala/gio.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ package giter8
object GIO {

def readProps(stm: java.io.InputStream) = {
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
val p = new java.util.Properties
p.load(stm)
stm.close()
(Map.empty[String, String] /: p.propertyNames) { (m, k) =>
p.propertyNames.asScala.foldLeft(Map.empty[String, String]) { (m, k) =>
m + (k.toString -> p.getProperty(k.toString))
}
}
Expand Down

0 comments on commit 02d865d

Please sign in to comment.