mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 10:12:21 +00:00
Code analysis - address @NotNull/@Nullable issues.
This commit is contained in:
@@ -540,7 +540,7 @@ public class Contact implements Parcelable {
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public @NonNull String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
if (!TextUtils.isEmpty(street)) {
|
||||
|
||||
@@ -39,17 +39,17 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactFieldViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
public @NonNull ContactFieldViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ContactFieldViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_selectable_contact_field, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ContactFieldViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull ContactFieldViewHolder holder, int position) {
|
||||
holder.bind(fields.get(position), glideRequests, selectable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRecycled(ContactFieldViewHolder holder) {
|
||||
public void onViewRecycled(@NonNull ContactFieldViewHolder holder) {
|
||||
holder.recycle();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,14 @@ public class ContactShareEditAdapter extends RecyclerView.Adapter<ContactShareEd
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactEditViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
public @NonNull ContactEditViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ContactEditViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_editable_contact, parent, false),
|
||||
locale,
|
||||
glideRequests);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ContactEditViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull ContactEditViewHolder holder, int position) {
|
||||
holder.bind(position, contacts.get(position), eventListener);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user