<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -86,15 +86,12 @@ class ActiveObjectProxy(val target: AnyRef, val timeout: Int) extends Invocation
   }
 }
 
-/**
- * Represents a snapshot of the current invocation.
- * 
- * @author &lt;a href=&quot;http://jonasboner.com&quot;&gt;Jonas Bon&amp;#233;r&lt;/a&gt;
- */
 case class Invocation(val method: Method, val args: Array[Object], val target: AnyRef) {
-  def invoke: AnyRef = method.invoke(target, args)
+  method.setAccessible(true);
 
-  override def toString: String = &quot;Invocation [method: &quot; + method.getName + &quot;, args: &quot; + args + &quot;, target: &quot; + target + &quot;]&quot;
+  def invoke: AnyRef = method.invoke(target, args:_*)
+
+  override def toString: String = &quot;Invocation [method: &quot; + method.getName + &quot;, args: &quot; + argsToString(args) + &quot;, target: &quot; + target + &quot;]&quot;
 
   override def hashCode(): Int = {
     var result = HashCode.SEED
@@ -108,11 +105,18 @@ case class Invocation(val method: Method, val args: Array[Object], val target: A
     that != null &amp;&amp;
     that.isInstanceOf[Invocation] &amp;&amp;
     that.asInstanceOf[Invocation].method == method &amp;&amp;
-    that.asInstanceOf[Invocation].args == args
-    that.asInstanceOf[Invocation].target == target
+    that.asInstanceOf[Invocation].target == target &amp;&amp;
+    isEqual(that.asInstanceOf[Invocation].args, args)
   }
+
+  private def isEqual(a1: Array[Object], a2: Array[Object]): Boolean =
+    (a1 == null &amp;&amp; a2 == null) ||
+    (a1 != null &amp;&amp; a2 != null &amp;&amp; a1.size == a2.size &amp;&amp; a1.zip(a2).find(t =&gt; t._1 == t._2).isDefined)
+
+  private def argsToString(array: Array[Object]): String = array.foldLeft(&quot;(&quot;)(_ + &quot; &quot; + _) + &quot;)&quot;
 }
 
+
 /**
  * Reference that can hold either a typed value or an exception.
  *</diff>
      <filename>component/src/main/scala/scala/actors/component/ActiveObject.scala</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8eeddfea06d01de0d04157056db165733adcd796</id>
    </parent>
  </parents>
  <author>
    <name>Jonas Boner</name>
    <email>jonas@jonasboner.com</email>
  </author>
  <url>http://github.com/jboner/scala-otp/commit/738007425bc61fe8b4b044000f3938daf41acdef</url>
  <id>738007425bc61fe8b4b044000f3938daf41acdef</id>
  <committed-date>2009-02-18T03:47:38-08:00</committed-date>
  <authored-date>2009-02-18T03:47:38-08:00</authored-date>
  <message>fixed bug in Invocation.equals/hashCode</message>
  <tree>c56df024882b638d80489eb1e77ada4bdbeb3ac3</tree>
  <committer>
    <name>Jonas Boner</name>
    <email>jonas@jonasboner.com</email>
  </committer>
</commit>
