summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNasser Grainawi <nasser.grainawi@linaro.org>2024-05-06 13:27:30 -0600
committerNasser Grainawi <nasser.grainawi@linaro.org>2024-05-07 23:05:18 +0000
commit24fbf0baa641333c87c88e1a7b792ee81fa931f4 (patch)
tree73e974cde8b8e14ab68727bebe01182934a4ddf8
parent91746d58a44f41c91169da0f0b8f2f795f7bd36d (diff)
Change: Consistently apply @Nullable
This annotation was not applied consistently to fields and methods, with some fields having it and their respective getters missing it and vice versa. Also fix the one instance where it was applied but formatted differently than in the rest of the code base. Change-Id: Ie4436fe64642affad7d775c59b10b6bacc0c4acd Release-Notes: skip Forward-Compatible: checked
-rw-r--r--java/com/google/gerrit/entities/Change.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/com/google/gerrit/entities/Change.java b/java/com/google/gerrit/entities/Change.java
index fad3aa84ab..3ad7e03e3f 100644
--- a/java/com/google/gerrit/entities/Change.java
+++ b/java/com/google/gerrit/entities/Change.java
@@ -434,7 +434,7 @@ public final class Change {
private Id changeId;
/** ServerId of the Gerrit instance that has created the change */
- private String serverId;
+ @Nullable private String serverId;
/** Globally assigned unique identifier of the change */
private Key changeKey;
@@ -545,7 +545,8 @@ public final class Change {
* ServerId of the Gerrit instance that created the change. It could be null when the change is
* not fetched from NoteDb but obtained through protobuf deserialisation.
*/
- public @Nullable String getServerId() {
+ @Nullable
+ public String getServerId() {
return serverId;
}
@@ -607,6 +608,7 @@ public final class Change {
return originalSubject != null ? originalSubject : subject;
}
+ @Nullable
public String getOriginalSubjectOrNull() {
return originalSubject;
}
@@ -652,6 +654,7 @@ public final class Change {
originalSubject = null;
}
+ @Nullable
public String getSubmissionId() {
return submissionId;
}
@@ -684,6 +687,7 @@ public final class Change {
return isAbandoned() || isMerged();
}
+ @Nullable
public String getTopic() {
return topic;
}
@@ -720,10 +724,12 @@ public final class Change {
this.revertOf = revertOf;
}
+ @Nullable
public Id getRevertOf() {
return this.revertOf;
}
+ @Nullable
public PatchSet.Id getCherryPickOf() {
return cherryPickOf;
}