-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancementNew feature or requestNew feature or requestpriority:minorMinor loss of function, or other problem where easy workaround is presentMinor loss of function, or other problem where easy workaround is present
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority:minorMinor loss of function, or other problem where easy workaround is presentMinor loss of function, or other problem where easy workaround is present