Skip to content

Commit

Permalink
get rid of deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIlyenko committed Apr 22, 2014
1 parent 9003f8a commit 2d4ec7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/scaldi/Binder.scala
Expand Up @@ -133,9 +133,9 @@ trait ReflectionBinder {
.map(_.asMethod)
.map { m =>
if (m.returnType <:< typeOf[BindingProvider])
reflection.reflectMethod(m).apply().asInstanceOf[BindingProvider].getBinding(m.name.decoded, m.returnType)
reflection.reflectMethod(m).apply().asInstanceOf[BindingProvider].getBinding(m.name.decodedName.toString, m.returnType)
else
ReflectiveBinding(() => Some(reflection.reflectMethod(m).apply()), List(m.returnType, m.name.decoded))
ReflectiveBinding(() => Some(reflection.reflectMethod(m).apply()), List(m.returnType, m.name.decodedName.toString))
}
.toList
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/scaldi/InjectableSpec.scala
Expand Up @@ -103,7 +103,7 @@ class InjectableSpec extends WordSpec with Matchers {
}

"throw exception if no default provided and bonding not found" in {
evaluating(inject [DateFormat]) should produce [InjectException]
an [InjectException] should be thrownBy inject [DateFormat]
}

"also be available in module, but use resulting (compised) injector" in {
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/scaldi/WordBinderSpec.scala
Expand Up @@ -10,7 +10,7 @@ class WordBinderSpec extends WordSpec with Matchers {
bind [String] identifiedBy 'host
}

evaluating(binder.wordBindings) should produce [BindingException]
an [BindingException] should be thrownBy binder.wordBindings
}

"collect all identifiers for bindings" in {
Expand Down

0 comments on commit 2d4ec7d

Please sign in to comment.