[jboss-jira] [JBoss JIRA] (DROOLS-524) Collections are type-unsafe by default and may lead to runtime errors
Mario Fusco (JIRA)
issues at jboss.org
Tue Sep 4 10:51:00 EDT 2018
[ https://issues.jboss.org/browse/DROOLS-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list