lift language level to java 7, and some code cleanup
This commit is contained in:
@@ -78,7 +78,7 @@ public class CertifyOperation extends BaseOperation {
|
||||
return new CertifyResult(CertifyResult.RESULT_ERROR, log);
|
||||
}
|
||||
|
||||
ArrayList<UncachedKeyRing> certifiedKeys = new ArrayList<UncachedKeyRing>();
|
||||
ArrayList<UncachedKeyRing> certifiedKeys = new ArrayList<>();
|
||||
|
||||
log.add(LogType.MSG_CRT_CERTIFYING, 1);
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import org.sufficientlysecure.keychain.pgp.Progressable;
|
||||
import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper.NotFoundException;
|
||||
import org.sufficientlysecure.keychain.service.CertifyActionsParcel;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult.LogType;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult.OperationLog;
|
||||
import org.sufficientlysecure.keychain.operations.results.SaveKeyringResult;
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ImportExportOperation extends BaseOperation {
|
||||
}
|
||||
|
||||
int newKeys = 0, oldKeys = 0, badKeys = 0, secret = 0;
|
||||
ArrayList<Long> importedMasterKeyIds = new ArrayList<Long>();
|
||||
ArrayList<Long> importedMasterKeyIds = new ArrayList<>();
|
||||
|
||||
boolean cancelled = false;
|
||||
int position = 0;
|
||||
|
||||
@@ -735,7 +735,7 @@ public abstract class OperationResult implements Parcelable {
|
||||
|
||||
public static class OperationLog implements Iterable<LogEntryParcel> {
|
||||
|
||||
private final List<LogEntryParcel> mParcels = new ArrayList<LogEntryParcel>();
|
||||
private final List<LogEntryParcel> mParcels = new ArrayList<>();
|
||||
|
||||
/// Simple convenience method
|
||||
public void add(LogType type, int indent, Object... parameters) {
|
||||
@@ -760,7 +760,7 @@ public abstract class OperationResult implements Parcelable {
|
||||
}
|
||||
|
||||
public boolean containsType(LogType type) {
|
||||
for(LogEntryParcel entry : new IterableIterator<LogEntryParcel>(mParcels.iterator())) {
|
||||
for(LogEntryParcel entry : new IterableIterator<>(mParcels.iterator())) {
|
||||
if (entry.mType == type) {
|
||||
return true;
|
||||
}
|
||||
@@ -769,7 +769,7 @@ public abstract class OperationResult implements Parcelable {
|
||||
}
|
||||
|
||||
public boolean containsWarnings() {
|
||||
for(LogEntryParcel entry : new IterableIterator<LogEntryParcel>(mParcels.iterator())) {
|
||||
for(LogEntryParcel entry : new IterableIterator<>(mParcels.iterator())) {
|
||||
if (entry.mType.mLevel == LogLevel.WARN || entry.mType.mLevel == LogLevel.ERROR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user