mirror of
https://github.com/etesync/android
synced 2025-01-11 08:10:58 +00:00
Delombokify: remove RequiredArgsConstructor usages.
This commit is contained in:
parent
6ab3401bf5
commit
13c718977e
@ -44,7 +44,6 @@ import java.util.Locale;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
public class Crypto {
|
||||
public static String deriveKey(String salt, String password) {
|
||||
@ -68,12 +67,16 @@ public class Crypto {
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public static class AsymmetricKeyPair implements Serializable {
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private final byte[] privateKey;
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private final byte[] publicKey;
|
||||
|
||||
public AsymmetricKeyPair(final byte[] privateKey, final byte[] publicKey) {
|
||||
this.privateKey = privateKey;
|
||||
this.publicKey = publicKey;
|
||||
}
|
||||
}
|
||||
|
||||
public static class AsymmetricCryptoManager {
|
||||
|
@ -50,7 +50,6 @@ import at.bitfire.vcard4android.BatchOperation;
|
||||
import at.bitfire.vcard4android.Contact;
|
||||
import at.bitfire.vcard4android.ContactsStorageException;
|
||||
import lombok.Cleanup;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
@ -240,7 +239,6 @@ public class ContactsSyncManager extends SyncManager {
|
||||
|
||||
// downloader helper class
|
||||
|
||||
@RequiredArgsConstructor
|
||||
private class ResourceDownloader implements Contact.Downloader {
|
||||
@Override
|
||||
public byte[] download(String url, String accepts) {
|
||||
|
@ -43,7 +43,6 @@ import java.util.logging.Level;
|
||||
|
||||
import ezvcard.Ezvcard;
|
||||
import lombok.Cleanup;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
public class AboutActivity extends BaseActivity {
|
||||
|
||||
@ -62,12 +61,19 @@ public class AboutActivity extends BaseActivity {
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
}
|
||||
|
||||
|
||||
@RequiredArgsConstructor
|
||||
private static class ComponentInfo {
|
||||
final String title, version, website, copyright;
|
||||
final int licenseInfo;
|
||||
final String licenseTextFile;
|
||||
|
||||
ComponentInfo(final String title, final String version, final String website, final String copyright, final int licenseInfo, final String licenseTextFile) {
|
||||
this.title = title;
|
||||
this.version = version;
|
||||
this.website = website;
|
||||
this.copyright = copyright;
|
||||
this.licenseInfo = licenseInfo;
|
||||
this.licenseTextFile = licenseTextFile;
|
||||
}
|
||||
}
|
||||
|
||||
private final static ComponentInfo components[] = {
|
||||
|
@ -23,7 +23,6 @@ import com.etesync.syncadapter.journalmanager.JournalManager;
|
||||
import com.etesync.syncadapter.journalmanager.UserInfoManager;
|
||||
import com.etesync.syncadapter.model.CollectionInfo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@ -131,9 +130,12 @@ public class AddMemberFragment extends DialogFragment {
|
||||
}
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
class AddResult {
|
||||
final Throwable throwable;
|
||||
|
||||
AddResult(final Throwable throwable) {
|
||||
this.throwable = throwable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,9 +176,12 @@ public class AddMemberFragment extends DialogFragment {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
class AddResultSecond {
|
||||
final Throwable throwable;
|
||||
|
||||
AddResultSecond(final Throwable throwable) {
|
||||
this.throwable = throwable;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import com.etesync.syncadapter.HttpClient;
|
||||
import com.etesync.syncadapter.R;
|
||||
import com.etesync.syncadapter.journalmanager.JournalManager;
|
||||
import com.etesync.syncadapter.model.CollectionInfo;
|
||||
import com.etesync.syncadapter.model.EntryEntity;
|
||||
import com.etesync.syncadapter.model.JournalEntity;
|
||||
import com.etesync.syncadapter.model.JournalModel;
|
||||
|
||||
@ -31,7 +30,6 @@ import java.util.List;
|
||||
|
||||
import io.requery.Persistable;
|
||||
import io.requery.sql.EntityDataStore;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@ -163,10 +161,14 @@ public class CollectionMembersListFragment extends ListFragment implements Adapt
|
||||
}
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
class MembersResult {
|
||||
final List<JournalManager.Member> members;
|
||||
final Throwable throwable;
|
||||
|
||||
MembersResult(final List<JournalManager.Member> members, final Throwable throwable) {
|
||||
this.members = members;
|
||||
this.throwable = throwable;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,14 +15,11 @@ import com.etesync.syncadapter.Constants;
|
||||
import com.etesync.syncadapter.HttpClient;
|
||||
import com.etesync.syncadapter.InvalidAccountException;
|
||||
import com.etesync.syncadapter.R;
|
||||
import com.etesync.syncadapter.journalmanager.Crypto;
|
||||
import com.etesync.syncadapter.journalmanager.JournalManager;
|
||||
import com.etesync.syncadapter.journalmanager.UserInfoManager;
|
||||
import com.etesync.syncadapter.model.CollectionInfo;
|
||||
|
||||
import org.apache.commons.codec.Charsets;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@ -108,9 +105,12 @@ public class RemoveMemberFragment extends DialogFragment {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
class RemoveResult {
|
||||
final Throwable throwable;
|
||||
|
||||
RemoveResult(final Throwable throwable) {
|
||||
this.throwable = throwable;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,13 @@ package com.etesync.syncadapter.ui.setup;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.etesync.syncadapter.HttpClient;
|
||||
import com.etesync.syncadapter.journalmanager.Crypto;
|
||||
import com.etesync.syncadapter.journalmanager.Exceptions;
|
||||
import com.etesync.syncadapter.journalmanager.JournalAuthenticator;
|
||||
import com.etesync.syncadapter.log.StringHandler;
|
||||
import com.etesync.syncadapter.model.CollectionInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
@ -18,14 +25,7 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.etesync.syncadapter.HttpClient;
|
||||
import com.etesync.syncadapter.journalmanager.Crypto;
|
||||
import com.etesync.syncadapter.journalmanager.Exceptions;
|
||||
import com.etesync.syncadapter.journalmanager.JournalAuthenticator;
|
||||
import com.etesync.syncadapter.log.StringHandler;
|
||||
import com.etesync.syncadapter.model.CollectionInfo;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
@ -85,11 +85,20 @@ public class BaseConfigurationFinder {
|
||||
|
||||
// data classes
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@ToString(exclude={"logs", "authtoken", "rawPassword", "password"})
|
||||
public static class Configuration implements Serializable {
|
||||
// We have to use URI here because HttpUrl is not serializable!
|
||||
|
||||
public Configuration(final URI url, final String userName, final String authtoken, final ServiceInfo cardDAV, final ServiceInfo calDAV, final String logs, final boolean failed) {
|
||||
this.url = url;
|
||||
this.userName = userName;
|
||||
this.authtoken = authtoken;
|
||||
this.cardDAV = cardDAV;
|
||||
this.calDAV = calDAV;
|
||||
this.logs = logs;
|
||||
this.failed = failed;
|
||||
}
|
||||
|
||||
@ToString
|
||||
public static class ServiceInfo implements Serializable {
|
||||
public final Map<String, CollectionInfo> collections = new HashMap<>();
|
||||
|
@ -11,12 +11,11 @@ package com.etesync.syncadapter.ui.setup;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.etesync.syncadapter.App;
|
||||
import com.etesync.syncadapter.Constants;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class LoginCredentials implements Parcelable {
|
||||
public final URI uri;
|
||||
|
@ -9,9 +9,7 @@ import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.etesync.syncadapter.AccountSettings;
|
||||
import com.etesync.syncadapter.App;
|
||||
@ -22,7 +20,6 @@ import com.etesync.syncadapter.journalmanager.Constants;
|
||||
import com.etesync.syncadapter.journalmanager.Crypto;
|
||||
import com.etesync.syncadapter.journalmanager.UserInfoManager;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@ -137,10 +134,14 @@ public class SetupUserInfoFragment extends DialogFragment {
|
||||
dismissAllowingStateLoss();
|
||||
}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
class SetupUserInfoResult {
|
||||
final Crypto.AsymmetricKeyPair keyPair;
|
||||
final Exception exception;
|
||||
|
||||
SetupUserInfoResult(final Crypto.AsymmetricKeyPair keyPair, final Exception exception) {
|
||||
this.keyPair = keyPair;
|
||||
this.exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user