All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.DLC_Sample Maven / Gradle / Ivy

Go to download

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.

The newest version!
package ex;

import java.util.ArrayList;
import java.util.List;

public class DLC_Sample {
    private List badList = new ArrayList();
    private List goodList = new ArrayList();
    private List questionableList = new ArrayList();

    public void test1(String s1, String s2) {
        if (badList.contains(s1))
            badList.add(s2);

        for (int i = 0; i < badList.size(); i++) {
            String s3 = badList.get(i);
            if (badList.indexOf(s1 + s2) >= 0)
                badList.remove(s3);
        }
    }

    public void test2(String s1, String s2) {
        int idx = goodList.indexOf(s1);
        goodList.set(idx, s2);
    }

    public List test3(String s1) {
        if (questionableList.contains(s1))
            return questionableList;
        List nl = new ArrayList();
        nl.add(s1);
        return nl;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy