mebigfatguy / fb-contrib

a FindBugs/SpotBugs plugin for doing static code analysis for java code bases
http://fb-contrib.sf.net
GNU Lesser General Public License v2.1
155 stars 45 forks source link

False positive PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS w/ autoboxing #198

Closed efenderbosch closed 7 years ago

efenderbosch commented 7 years ago

A constructor signature like public SomeObject(Long param1, Long param2) { ... } will trigger PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS when invoked via new SomeObject(1L, 1L) but not when invoked via new SomeObject(2L, 1L). Guessing that fb-contrib is detecting the duplicate autoboxing.

Maybe this isn't a false positive, but should be a more specific error indicating the duplicate autoboxing?

mebigfatguy commented 7 years ago

yes it's the autoboxing. i probably should just ignore autoboxing duplicates.

mebigfatguy commented 7 years ago

thanks for the report.