我收到了“ java.lang.ArrayIndexOutOfBoundsException:-1”

时间:2019-07-05 08:36:41

标签: java sql

我有一个

  

java.lang.ArrayIndexOutOfBoundsException:-1

错误。我想它是从这里来的:

public String getSQLString(Object[] aInputValues) {
        int caseValueCurrent = 0;
        for (int i = 0; i < aInputValues.length; i++) {
            if (aInputValues[i] != null)
                caseValueCurrent |= (1 << i);
        }
        for (int i = 0; i < caseSQL.length - 1; i++) {
            if (caseSQL[i].isAcceptable(caseValueCurrent))
                return caseSQL[i].getSQLString(aInputValues);
        }
        return caseSQL[caseSQL.length - 1].getSQLString(aInputValues);
    }

caseSQL.length不是0

0 个答案:

没有答案