wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.98k stars 1.33k forks source link

Nullability Annotations to Java Classes - Utils #18916

Open ParaskP7 opened 1 year ago

ParaskP7 commented 1 year ago

Parent #18904

This issue is about adding missing nullability annotations (@Nullable & @NonNull) to as many Java-related Utils classes as possible, including fields, arguments, parameters, and return values.

FYI: As a reference, few examples of such classes are AnalyticsUtils.java and ReaderHtmlUtils.java.


### Tasks (`libs/editor`)
- [ ] [EditorMediaUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/editor/src/main/java/org/wordpress/android/editor/EditorMediaUtils.java#L4)
- [ ] [HtmlStyleUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/editor/src/main/java/org/wordpress/android/editor/HtmlStyleUtils.java#L4)
- [ ] [Utils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/editor/src/main/java/org/wordpress/android/editor/Utils.java#L4)
- [ ] [GutenbergUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergUtils.java#L4)

### Tasks (`libs/image-editor`)
- [ ] [ToastUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/image-editor/src/main/kotlin/org/wordpress/android/imageeditor/utils/ToastUtils.java#L4)

### Tasks (`libs/network`)
- [ ] [RestClientUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/libs/networking/src/main/java/org/wordpress/android/networking/RestClientUtils.java#L4)

### Tasks (`WordPress` + `models`)
- [ ] [RoleUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/models/RoleUtils.java#L4)

### Tasks (`WordPress` + `ui`)
- [ ] [JetpackConnectionUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/JetpackConnectionUtils.java#L4)
- [ ] [CommentUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentUtils.java#L4)
- [ ] [NotificationsUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/notifications/utils/NotificationsUtils.java#L4)
- [ ] [PendingDraftsNotificationsUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/notifications/utils/PendingDraftsNotificationsUtils.java#L4)
- [ ] [PeopleUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/people/utils/PeopleUtils.java#L4)
- [ ] [PluginUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/plugins/PluginUtils.java#L4)
- [ ] [PostUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/posts/PostUtils.java#L4)
- [ ] [ReaderHtmlUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderHtmlUtils.java#L4)
- [ ] [ReaderVideoUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderVideoUtils.java#L4)
- [ ] [ReaderXPostUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/reader/utils/ReaderXPostUtils.java#L4)
- [ ] [UploadUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadUtils.java#L4)

### Tasks (`WordPress` + `util`)
- [ ] [AniUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/AniUtils.java#L4)
- [ ] [AuthenticationDialogUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/AuthenticationDialogUtils.java#L4)
- [ ] [AutolinkUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/AutolinkUtils.java#L4)
- [ ] [FluxCUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/FluxCUtils.java#L4)
- [ ] [KeyboardResizeViewUtil.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/KeyboardResizeViewUtil.java#L4)
- [ ] [PhotoPickerUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/PhotoPickerUtils.java#L4)
- [ ] [RtlUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/RtlUtils.java#L4)
- [ ] [SelfSignedSSLUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/SelfSignedSSLUtils.java#L4)
- [ ] [ShortcutUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/ShortcutUtils.java#L4)
- [ ] [SiteUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java#L4)
- [ ] [VolleyUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/VolleyUtils.java#L4)
- [ ] [WPActivityUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/WPActivityUtils.java#L4)
- [ ] [WPMediaUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/WPMediaUtils.java#L4)
- [ ] [WPPermissionUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/WPPermissionUtils.java#L4)
- [ ] [WPPrefUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/WPPrefUtils.java#L4)
- [ ] [WPUrlUtils.java](https://github.com/wordpress-mobile/WordPress-Android/blob/1b38e8c84f8e8b30626406fd0568beeffd8f7676/WordPress/src/main/java/org/wordpress/android/util/WPUrlUtils.java#L4)
- [ ] [WPVideoUtils.java](https://github.com/search?q=repo%3Awordpress-mobile%2FWordPress-Android%20WPVideoUtils.java&type=code)
peril-wordpress-mobile[bot] commented 1 year ago
Fails
:no_entry_sign: Please add a type label to this issue. e.g. '[Type] Enhancement'

Generated by :no_entry_sign: dangerJS

peril-wordpress-mobile[bot] commented 1 year ago
Fails
:no_entry_sign: Please add a type label to this issue. e.g. '[Type] Enhancement'

Generated by :no_entry_sign: dangerJS

peril-wordpress-mobile[bot] commented 1 year ago
Fails
:no_entry_sign: Please add a type label to this issue. e.g. '[Type] Enhancement'

Generated by :no_entry_sign: dangerJS