]
Mario Fusco resolved DROOLS-524.
--------------------------------
Resolution: Won't Fix
Collections are type-unsafe by default and may lead to runtime
errors
---------------------------------------------------------------------
Key: DROOLS-524
URL:
https://issues.jboss.org/browse/DROOLS-524
Project: Drools
Issue Type: Bug
Affects Versions: 5.5.0.Final, 5.6.0.Final, 6.0.0.Final, 6.0.1.Final, 6.1.0.CR1,
6.1.0.Final
Reporter: Davide Sottara
Assignee: Mario Fusco
Priority: Minor
Collections are type-unsafe, so it is possible to write constraints on non-existing
fields. The compiler will not report any error, but an exception will be thrown at
runtime.
The configuration was needed to support map and list accessors:
{code}
Map( this[ "key" ].someFieldOfTheValue > 0 )
{code}
but an explicit cast would be preferable
{code}
Map( this[ "key" ]#ClassOfTheValue.someFieldOfTheValue > 0 )
{code}
This bug can't be fixed in 6.x due to backward compatibility. It will be fixed in
future major versions.