1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-12 06:08:25 -05:00

Renamed "tokens" to "tokenizer".

The naturalize tool detected that using "tokenizer" is more consistent
with the current codebase state:
* "tokenizer" in MessageCompose is 60.40% probable ("tokens" 39.60%)
This commit is contained in:
Miltos Allamanis 2014-02-26 14:42:37 +00:00
parent 6075addfd0
commit cfeed40781

View File

@ -1737,28 +1737,28 @@ public class MessageCompose extends K9Activity implements OnClickListener,
if (K9.DEBUG)
Log.d(K9.LOG_TAG, "Got a saved legacy identity: " + identityString);
StringTokenizer tokens = new StringTokenizer(identityString, ":", false);
StringTokenizer tokenizer = new StringTokenizer(identityString, ":", false);
// First item is the body length. We use this to separate the composed reply from the quoted text.
if (tokens.hasMoreTokens()) {
String bodyLengthS = Utility.base64Decode(tokens.nextToken());
if (tokenizer.hasMoreTokens()) {
String bodyLengthS = Utility.base64Decode(tokenizer.nextToken());
try {
identity.put(IdentityField.LENGTH, Integer.valueOf(bodyLengthS).toString());
} catch (Exception e) {
Log.e(K9.LOG_TAG, "Unable to parse bodyLength '" + bodyLengthS + "'");
}
}
if (tokens.hasMoreTokens()) {
identity.put(IdentityField.SIGNATURE, Utility.base64Decode(tokens.nextToken()));
if (tokenizer.hasMoreTokens()) {
identity.put(IdentityField.SIGNATURE, Utility.base64Decode(tokenizer.nextToken()));
}
if (tokens.hasMoreTokens()) {
identity.put(IdentityField.NAME, Utility.base64Decode(tokens.nextToken()));
if (tokenizer.hasMoreTokens()) {
identity.put(IdentityField.NAME, Utility.base64Decode(tokenizer.nextToken()));
}
if (tokens.hasMoreTokens()) {
identity.put(IdentityField.EMAIL, Utility.base64Decode(tokens.nextToken()));
if (tokenizer.hasMoreTokens()) {
identity.put(IdentityField.EMAIL, Utility.base64Decode(tokenizer.nextToken()));
}
if (tokens.hasMoreTokens()) {
identity.put(IdentityField.QUOTED_TEXT_MODE, Utility.base64Decode(tokens.nextToken()));
if (tokenizer.hasMoreTokens()) {
identity.put(IdentityField.QUOTED_TEXT_MODE, Utility.base64Decode(tokenizer.nextToken()));
}
}