Skip to content

Commit 8281c7a

Browse files
Fix nullable optionals (#207)
* Initial commit * Fix lint warnings about @nullable on Optional attributes. This commit removes the @nullable annotation from Optional attributes in several files. This was causing lint warnings because the combination of @nullable and Optional is not recommended. The changes have been made in the following files: - src/main/java/com/spotify/github/v3/activity/events/StatusEvent.java - src/main/java/com/spotify/github/v3/issues/Issue.java - src/main/java/com/spotify/github/v3/repos/RepositoryInvitation.java - src/main/java/com/spotify/github/v3/prs/Review.java - src/main/java/com/spotify/github/v3/activity/events/CreateEvent.java - src/main/java/com/spotify/github/v3/activity/events/PushEvent.java --------- Co-authored-by: labs-code-app[bot] <161369871+labs-code-app[bot]@users.noreply.github.com>
1 parent ec7d32a commit 8281c7a

File tree

6 files changed

+0
-8
lines changed

6 files changed

+0
-8
lines changed

src/main/java/com/spotify/github/v3/activity/events/CreateEvent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public interface CreateEvent extends BaseEvent {
4747
String masterBranch();
4848

4949
/** The repository's current description. */
50-
@Nullable
5150
Optional<String> description();
5251

5352
/** No doc found on github - Usually is "user". */

src/main/java/com/spotify/github/v3/activity/events/PushEvent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public interface PushEvent {
9393
List<PushCommit> commits();
9494

9595
/** The push commit object of the most recent commit on ref after the push. */
96-
@Nullable
9796
Optional<PushCommit> headCommit();
9897

9998
/** Pusher */

src/main/java/com/spotify/github/v3/activity/events/StatusEvent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public interface StatusEvent extends BaseEvent, UpdateTracking {
6666
String context();
6767

6868
/** The optional human-readable description added to the status. */
69-
@Nullable
7069
Optional<String> description();
7170

7271
/** The new state. Can be pending, success, failure, or error. */

src/main/java/com/spotify/github/v3/issues/Issue.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ public interface Issue extends CloseTracking {
4848
URI url();
4949

5050
/** Events URL. */
51-
@Nullable
5251
Optional<URI> eventsUrl();
5352

5453
/** Repository URL. */
55-
@Nullable
5654
Optional<URI> repositoryUrl();
5755

5856
/** Labels URL template. */
@@ -80,7 +78,6 @@ public interface Issue extends CloseTracking {
8078
String title();
8179

8280
/** The contents of the issue. */
83-
@Nullable
8481
Optional<String> body();
8582

8683
/** User. */

src/main/java/com/spotify/github/v3/prs/Review.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public interface Review {
5151
User user();
5252

5353
/** Body. */
54-
@Nullable
5554
Optional<String> body();
5655

5756
/** Submitted at. */

src/main/java/com/spotify/github/v3/repos/RepositoryInvitation.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public interface RepositoryInvitation {
6161
ZonedDateTime createdAt();
6262

6363
/** Whether or not the invitation has expired */
64-
@Nullable
6564
Optional<Boolean> expired();
6665

6766
/** API URL */

0 commit comments

Comments
 (0)