[rules-dev] FAO: conan: ClassCastException with from and subtypes...

Michael Anstis michael.anstis at gmail.com
Tue Oct 26 16:45:11 EDT 2010


Hi Mark,

This is the gist of the IRC discussion (raised by nik9000) you was asking
about.

I tried with a new download from trunk and the CCE remains:-

class Taggable {}
class Asset extends Taggable {}
class TagDataReceivedEvent {
  private final Taggable taggable;
  public Taggable getTaggable() { return taggable; }
}

rule "f"
when
    $e: TagDataReceivedEvent(newLocation != oldLocation)
    $a: Asset() from $e.taggable
then
    System.err.println("ASF" + $a);
end

ClassCastException thrown on the "from" - you thought this might have been
changed to fail (I took to mean as "not match" rather than a RTE failue).

Cheers,

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20101026/24761f92/attachment.html 


More information about the rules-dev mailing list