Consider these six variations of a pattern constraint:<br><br> $a: Student( $someStudent.name != null )<br> $b: Student( $someStudent .name != null )<br> $c: Student( $someStudent. name != null )<br> $d: Student( $someStudent.getName() != null )<br>
$e: Student( $someStudent .getName() != null )<br> $f: Student( $someStudent. getName() != null )<br><br>Where is the bug - surely a space next to a separator can't do any harm? But indeed - $c is flagged with a not very helpful error message: "Unable to build constraint as ' name' is invalid".<br>
<br>Now, what about $d, $e and $f? Is it also $f, b with the space after the dot, which is flagged?<br><br>Surprise, surprise: here it is $e that's pilloried with a lot of gobbledegook (note the invented "method" $someStudent): <br>
<br>Unable to Analyse Expression $someStudent .getName() != null:<br>[Error: unable to resolve method using strict-mode: add2map.Student.$someStudent()]<br>[Near : {... $someStudent .getName() != nul ....}]<br><br>More fun of this kind is to be had from similar expressions on the RHS, especially when dialect "mvel" is set.<br>
<br>Cheers<br>Wolfgang<br><br>