Remove extraneous this object references

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@240402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2005-08-27 10:34:09 +00:00
parent 44e2825d74
commit cb3ac6dd3d
1 changed files with 12 additions and 12 deletions

View File

@ -601,7 +601,7 @@ public void add(Object obj) {
*/ */
private void tokenize() { private void tokenize() {
if (tokens == null) { if (tokens == null) {
this.tokens = readTokens(); tokens = readTokens();
} }
} }
@ -643,10 +643,10 @@ private String[] readTokens() {
*/ */
private void addToken(List list, String tok) { private void addToken(List list, String tok) {
if (tok == null || tok.length() == 0) { if (tok == null || tok.length() == 0) {
if (this.isIgnoreEmptyTokens()) { if (isIgnoreEmptyTokens()) {
return; return;
} }
if (this.isEmptyTokenAsNull()) { if (isEmptyTokenAsNull()) {
tok = null; tok = null;
} }
} }
@ -669,11 +669,11 @@ private int readNextToken(char[] chars, int start, int len, StrBuilder workArea,
// field delimiter or the quote character // field delimiter or the quote character
while (start < len) { while (start < len) {
int removeLen = Math.max( int removeLen = Math.max(
this.getIgnoredMatcher().isMatch(chars, start, start, len), getIgnoredMatcher().isMatch(chars, start, start, len),
this.getTrimmerMatcher().isMatch(chars, start, start, len)); getTrimmerMatcher().isMatch(chars, start, start, len));
if (removeLen == 0 || if (removeLen == 0 ||
this.getDelimiterMatcher().isMatch(chars, start, start, len) > 0 || getDelimiterMatcher().isMatch(chars, start, start, len) > 0 ||
this.getQuoteMatcher().isMatch(chars, start, start, len) > 0) { getQuoteMatcher().isMatch(chars, start, start, len) > 0) {
break; break;
} }
start += removeLen; start += removeLen;
@ -686,14 +686,14 @@ private int readNextToken(char[] chars, int start, int len, StrBuilder workArea,
} }
// handle empty token // handle empty token
int delimLen = this.getDelimiterMatcher().isMatch(chars, start, start, len); int delimLen = getDelimiterMatcher().isMatch(chars, start, start, len);
if (delimLen > 0) { if (delimLen > 0) {
addToken(tokens, ""); addToken(tokens, "");
return start + delimLen; return start + delimLen;
} }
// handle found token // handle found token
int quoteLen = this.getQuoteMatcher().isMatch(chars, start, start, len); int quoteLen = getQuoteMatcher().isMatch(chars, start, start, len);
if (quoteLen > 0) { if (quoteLen > 0) {
return readWithQuotes(chars, start + quoteLen, len, workArea, tokens, start, quoteLen); return readWithQuotes(chars, start + quoteLen, len, workArea, tokens, start, quoteLen);
} }
@ -756,7 +756,7 @@ private int readWithQuotes(char[] chars, int start, int len, StrBuilder workArea
// Not in quoting mode // Not in quoting mode
// check for delimiter, and thus end of token // check for delimiter, and thus end of token
int delimLen = this.getDelimiterMatcher().isMatch(chars, pos, start, len); int delimLen = getDelimiterMatcher().isMatch(chars, pos, start, len);
if (delimLen > 0) { if (delimLen > 0) {
// return condition when end of token found // return condition when end of token found
addToken(tokens, workArea.substring(0, trimStart)); addToken(tokens, workArea.substring(0, trimStart));
@ -773,7 +773,7 @@ private int readWithQuotes(char[] chars, int start, int len, StrBuilder workArea
} }
// check for ignored (outside quotes), and ignore // check for ignored (outside quotes), and ignore
int ignoredLen = this.getIgnoredMatcher().isMatch(chars, pos, start, len); int ignoredLen = getIgnoredMatcher().isMatch(chars, pos, start, len);
if (ignoredLen > 0) { if (ignoredLen > 0) {
pos += ignoredLen; pos += ignoredLen;
continue; continue;
@ -782,7 +782,7 @@ private int readWithQuotes(char[] chars, int start, int len, StrBuilder workArea
// check for trimmed character // check for trimmed character
// don't yet know if its at the end, so copy to workArea // don't yet know if its at the end, so copy to workArea
// use trimStart to keep track of trim at the end // use trimStart to keep track of trim at the end
int trimmedLen = this.getTrimmerMatcher().isMatch(chars, pos, start, len); int trimmedLen = getTrimmerMatcher().isMatch(chars, pos, start, len);
if (trimmedLen > 0) { if (trimmedLen > 0) {
workArea.append(chars, pos, trimmedLen); workArea.append(chars, pos, trimmedLen);
pos += trimmedLen; pos += trimmedLen;