Take care of a bug in the Props library
authorChristos KK Loverdos <loverdos@gmail.com>
Tue, 27 Mar 2012 12:19:28 +0000 (15:19 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Tue, 27 Mar 2012 12:19:28 +0000 (15:19 +0300)
Ints are not properly converted. This is my library (external to the
project) so I must find time to fix it.

src/main/scala/gr/grnet/aquarium/Configurator.scala

index f28811e..ba24838 100644 (file)
@@ -252,6 +252,12 @@ class Configurator(val props: Props) extends Loggable {
     val newProps = new Props(newMap)
     new Configurator(newProps)
   }
+
+  // FIXME: This is instead of props.getInt which currently contains a bug.
+  // FIXME: Fix the original bug and delete this method
+  def getInt(name: String): Maybe[Int] = {
+    props.get(name).map(_.toInt)
+  }
 }
 
 object Configurator {