Removed constant condition, thanks IntelliJ IDEA!

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2700 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2004-05-21 18:53:38 +00:00
parent f488214794
commit 32efa57373

View File

@ -39,23 +39,18 @@ public class AvoidDuplicateLiteralsRule extends AbstractRule {
public Set parse(String in) {
Set result = new HashSet();
StringBuffer currentToken = new StringBuffer();
boolean inEscapeMode = false;
for (int i=0; i<in.length(); i++) {
if (inEscapeMode) {
inEscapeMode = false;
currentToken.append(in.charAt(i));
continue;
}
if (!inEscapeMode && in.charAt(i) == ESCAPE_CHAR) {
if (in.charAt(i) == ESCAPE_CHAR) {
inEscapeMode = true;
continue;
}
if (in.charAt(i) == delimiter) {
result.add(currentToken.toString());
currentToken = new StringBuffer();