src.samples.java.ex.MAC_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fb-contrib Show documentation
Show all versions of fb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
package ex;
public class MAC_Sample {
public void test(String[] a) {
String[] b = new String[a.length];
for (int i = 0; i < a.length; i++)
b[i] = a[i];
}
public void testFP(String[] a) {
String[] b = new String[a.length];
int insPos = 0;
for (int i = 0; i < a.length; i++) {
if (!a[0].equals("*"))
b[insPos++] = a[i];
}
}
}