False +: System.arraycopy is more efficient
A source code analyzer
Brought to you by:
adangel,
juansotuyo
It needs to check if source and dest are the same primitive type.
public void xxxx(byte[] ayInputChannelNumber)
{
int[] aiInputChannelNumber = new int[ayInputChannelNumber.length];
for (int i = 0; i < aiInputChannelNumber.length; i++)
{
aiInputChannelNumber[i] = ayInputChannelNumber[i];
}
}
I'll see if i can reproduce this issue and maybe fix it...
FYI
I reproduced this issue and just commited the testcase. I'll still have to find a fix.
Hi,
I look into your issue this weekend. As the XPath expression to handle
this rule is already quite complex, it sounds (to me) not really a good
idea to make even more complex just in order to do some type checking. I
think we either have to accept this limitation (which i don't like because
i'm pretty sure people running java in real time constraint can be pissed
off by those false+) or maybe rewrite the rule in Java.
I would do such a rewriting but I'll appreciate if you (or other people
from pmd) have some input about this. i'll hate to rewrite the rule just to
discover that Xavier or Ryan has fixed this issue using a small XPath trick
that i don't knew of :)