Skip to content

Commit d8d7033

Browse files
committed
Add @NotNull to TargetData toJson in Java client
1 parent 6f48105 commit d8d7033

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

client/src/main/java/org/strykeforce/deadeye/DeadeyeJsonAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import okio.BufferedSource;
44

55
import java.io.IOException;
6+
import org.jetbrains.annotations.NotNull;
67

78
/**
89
* A {@code TargetData} class implements {@code DeadeyeJsonAdapter} to enable
@@ -25,5 +26,5 @@ public interface DeadeyeJsonAdapter<T extends TargetData> {
2526
* @return this object in JSON format.
2627
* @throws IOException if a serialization error occurs.
2728
*/
28-
String toJson(T targetData) throws IOException;
29+
String toJson(@NotNull T targetData) throws IOException;
2930
}

client/src/main/java/org/strykeforce/deadeye/MinAreaRectTargetData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public MinAreaRectTargetData fromJson(BufferedSource source) throws IOException
208208
}
209209

210210
@Override
211-
public String toJson(MinAreaRectTargetData targetData) throws IOException {
211+
public String toJson(@NotNull MinAreaRectTargetData targetData) throws IOException {
212212
Buffer buffer = new Buffer();
213213
JsonWriter writer = JsonWriter.of(buffer);
214214
writer.beginObject();

client/src/main/java/org/strykeforce/deadeye/Rect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class Rect {
3030
*
3131
* @param topLeft the coordinates of the top left corner
3232
* @param bottomRight the coordinates of the bottom right corner
33+
* @param contourArea the area of the contour contained by this rectangle
3334
*/
3435
public Rect(@NotNull Point topLeft, @NotNull Point bottomRight, int contourArea) {
3536
Objects.requireNonNull(topLeft);

client/src/main/java/org/strykeforce/deadeye/TargetData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public TargetData fromJson(BufferedSource source) throws IOException {
102102
}
103103

104104
@Override
105-
public String toJson(TargetData targetData) throws IOException {
105+
public String toJson(@NotNull TargetData targetData) throws IOException {
106106
Buffer buffer = new Buffer();
107107
JsonWriter writer = JsonWriter.of(buffer);
108108
writer.beginObject();

client/src/main/java/org/strykeforce/deadeye/TargetListTargetData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public TargetListTargetData fromJson(BufferedSource source) throws IOException {
193193
}
194194

195195
@Override
196-
public String toJson(TargetListTargetData targetData) throws IOException {
196+
public String toJson(@NotNull TargetListTargetData targetData) throws IOException {
197197
Buffer buffer = new Buffer();
198198
JsonWriter writer = JsonWriter.of(buffer);
199199
writer.beginObject();

client/src/main/java/org/strykeforce/deadeye/UprightRectTargetData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public UprightRectTargetData fromJson(BufferedSource source) throws IOException
180180
}
181181

182182
@Override
183-
public String toJson(UprightRectTargetData targetData) throws IOException {
183+
public String toJson(@NotNull UprightRectTargetData targetData) throws IOException {
184184
Buffer buffer = new Buffer();
185185
JsonWriter writer = JsonWriter.of(buffer);
186186
writer.beginObject();

0 commit comments

Comments
 (0)