Ternary operator in varargs returning object or array is invalid
<p>This is puzzling me and I would like an explanation.</p>

<pre><code>public foo(EventPoint... eventPoints) { 
  //...
}


boolean isThisHappening;

foo(isThisHappening ? new EventPoint() : new EventPoint[]{});
</code></pre>

<p>Even though <code>foo(new EventPoint());</code> is valid and <code>foo(new EventPoint[]{});</code> is also valid. Is this the ternary operator failing due to type evaluation?</p>

<p>Using JDK 1.7.0
Getting the error:<br>
  required: EventPoint[]
  found: Object
  reason: argument type Object does not conform to vararg element type EventPoint</p>
