1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

switch over some for loops to enhanced for loop syntax per intellij

This commit is contained in:
Jesse Vincent 2010-12-01 03:04:07 +00:00
parent 58e6bd388b
commit 5485d0faf1
4 changed files with 15 additions and 28 deletions

View File

@ -81,9 +81,7 @@ public class FolderListFilter<T> extends Filter
final ArrayList<T> newValues = new ArrayList<T>();
for (int i = 0; i < count; i++)
{
final T value = values.get(i);
for (final T value : values) {
final String valueText = value.toString().toLowerCase();
for (int k = 0; k < wordCount; k++)

View File

@ -140,22 +140,15 @@ public class DomainNameChecker
Collection<?> subjectAltNames = certificate.getSubjectAlternativeNames();
if (subjectAltNames != null)
{
Iterator<?> i = subjectAltNames.iterator();
while (i.hasNext())
{
List<?> altNameEntry = (List<?>)(i.next());
if ((altNameEntry != null) && (2 <= altNameEntry.size()))
{
Integer altNameType = (Integer)(altNameEntry.get(0));
if (altNameType != null)
{
if (altNameType.intValue() == ALT_IPA_NAME)
{
String altName = (String)(altNameEntry.get(1));
if (altName != null)
{
if (K9.DEBUG)
{
for (Object subjectAltName : subjectAltNames) {
List<?> altNameEntry = (List<?>) (subjectAltName);
if ((altNameEntry != null) && (2 <= altNameEntry.size())) {
Integer altNameType = (Integer) (altNameEntry.get(0));
if (altNameType != null) {
if (altNameType == ALT_IPA_NAME) {
String altName = (String) (altNameEntry.get(1));
if (altName != null) {
if (K9.DEBUG) {
Log.v(K9.LOG_TAG, "alternative IP: " + altName);
}
if (thisDomain.equalsIgnoreCase(altName))

View File

@ -538,10 +538,8 @@ public class Base64 implements BinaryEncoder, BinaryDecoder
*/
public static boolean isArrayByteBase64(byte[] arrayOctet)
{
for (int i = 0; i < arrayOctet.length; i++)
{
if (!isBase64(arrayOctet[i]) && !isWhiteSpace(arrayOctet[i]))
{
for (byte anArrayOctet : arrayOctet) {
if (!isBase64(anArrayOctet) && !isWhiteSpace(anArrayOctet)) {
return false;
}
}

View File

@ -43,11 +43,9 @@ public class AccessibleEmailContentActivity extends ListActivity
String[] rawListItems = parsedHtml.toString().split("\n");
ArrayList<String> cleanedList = new ArrayList<String>();
for (int i = 0; i < rawListItems.length; i++)
{
if (rawListItems[i].trim().length() > 0)
{
addToCleanedList(cleanedList, rawListItems[i]);
for (String rawListItem : rawListItems) {
if (rawListItem.trim().length() > 0) {
addToCleanedList(cleanedList, rawListItem);
}
}