Nils Breunese opened MNG-8482 and commented
Java's instanceof can be used to get rid of casting expressions. The Maven code base contains a lot of snippets like this:
if (val instanceof Boolean) {
return (Boolean) val;
}
By declaring an automatically cast variable this can be simplified:
if (val instance Boolean bool) {
return bool;
}
I can create a merge request to apply this pattern wherever applicable to get rid of the casting expressions after instanceof checks.
Affects: 4.0.0-rc-2
Remote Links:
Backported to: 4.0.0-rc-3
Nils Breunese opened MNG-8482 and commented
Java's
instanceofcan be used to get rid of casting expressions. The Maven code base contains a lot of snippets like this:By declaring an automatically cast variable this can be simplified:
I can create a merge request to apply this pattern wherever applicable to get rid of the casting expressions after
instanceofchecks.Affects: 4.0.0-rc-2
Remote Links:
Backported to: 4.0.0-rc-3