…my only guess (without looking) is that maybe one or the other used to be regular “long” and the autoboxing took care of it. Or everything used to share the same pointer and then some autoboing passthrough made one of them different.
Either way, the code is wrong. You can safely ignore the warning. (Out-dented code like that, by my convention, is code I intend to remove or redo in the future anyway.)