The local variable c has local index 13 in bytecode, which equals to the '\r' value.
Findbugs reports:
Rank: Of Concern (16), confidence: Normal
Pattern: UC_USELESS_CONDITION
Type: UC, Category: STYLE (Dodgy code)
for (int i = 0; i < line.length(); i++) { char c = line.charAt(i); if (c == ',') { if (inQuote) { // normal character currentStrBf.append(c); } else { lineList.add(currentStrBf.toString()); currentStrBf.setLength(0); } } else if(c == '"') { int j = i + 1; if ('"' == line.charAt(j)) { // escape character currentStrBf.append(line.charAt(j)); i = j; } else { // the enclosed character inQuote = !inQuote; } } else if(c != '\n' || c != '\r') { // UC_USELESS_CONDITION! // normal character currentStrBf.append(c); } }
It's a bug in your code. If c != '\n', the second condition is not checked. If c == '\n', then it's definitely not equal to '\r'. Seems that && was intended instead of ||.
The simplest explanation is the right one :-)