-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2868 from wordpress-mobile/analysis/add-missing-n…
…ullability-annotations-to-comment-clients [Nullability Annotations to Java Classes] Add Missing Nullability Annotations to `Comment` Network Client Classes (`safe`)
- Loading branch information
Showing
16 changed files
with
413 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
299 changes: 114 additions & 185 deletions
299
...c/main/java/org/wordpress/android/fluxc/network/rest/wpcom/comment/CommentRestClient.java
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 22 additions & 18 deletions
40
...java/org/wordpress/android/fluxc/network/rest/wpcom/comment/CommentWPComRestResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
package org.wordpress.android.fluxc.network.rest.wpcom.comment; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import java.util.List; | ||
|
||
@SuppressWarnings("NotNullFieldNotInitialized") | ||
public class CommentWPComRestResponse { | ||
public class CommentsWPComRestResponse { | ||
public List<CommentWPComRestResponse> comments; | ||
public static class CommentsWPComRestResponse { | ||
@Nullable public List<CommentWPComRestResponse> comments; | ||
} | ||
|
||
public class Post { | ||
public static class Post { | ||
public long ID; | ||
public String title; | ||
public String type; | ||
public String link; | ||
@NonNull public String title; | ||
@NonNull public String type; | ||
@NonNull public String link; | ||
} | ||
|
||
public class Author { | ||
public static class Author { | ||
public long ID; | ||
public String email; // can be boolean "false" if not set | ||
public String name; | ||
public String URL; | ||
public String avatar_URL; | ||
@NonNull public String email; // can be boolean "false" if not set | ||
@NonNull public String name; | ||
@NonNull public String URL; | ||
@NonNull public String avatar_URL; | ||
} | ||
|
||
public long ID; | ||
public CommentParent parent; | ||
public Post post; | ||
public Author author; | ||
public String date; | ||
public String status; | ||
public String content; | ||
@Nullable public CommentParent parent; | ||
@Nullable public Post post; | ||
@Nullable public Author author; | ||
@NonNull public String date; | ||
@NonNull public String status; | ||
@NonNull public String content; | ||
public boolean i_like; | ||
public String URL; | ||
@NonNull public String URL; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.