Skip to content

Commit

Permalink
found it: wrong comparison =D
Browse files Browse the repository at this point in the history
  • Loading branch information
iusildra committed Apr 20, 2023
1 parent f3c7e16 commit 54c446e
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@ case class RuntimeEvaluator(
for {
loader <- jdiClassLoader
obj <- Safe(new JdiClassObject(ref.referenceType().classObject(), loader, frame.thread))
value <- {
println(s"invoking ${method.name()} on ${obj.reference} with $args")
val res = obj.invokeStatic(method.name(), args.toList)
println(s"result: ${res.getResult}")
res
}
value <- obj.invokeStatic(method.name(), args.toList)
} yield value

private def invokeMethodOn(
Expand Down Expand Up @@ -124,7 +119,7 @@ case class RuntimeEvaluator(
cls <- loader.loadClass(ref.name())
instance <- Safe(
toScala(cls.reference.referringObjects(0))
.find(!_.isInstanceOf[ClassObjectReference])
.find(r => r.referenceType().equals(ref))
.toTry(s"No existing instances of $ref found")
)
} yield instance
Expand Down

0 comments on commit 54c446e

Please sign in to comment.