Skip to content

Commit

Permalink
fix: checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbuon committed Aug 16, 2024
1 parent 1309682 commit 757f065
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TelemetryEvent implements JsonSerializable, StringTruncatable<Telem
private static final long serialVersionUID = 2843361810242481727L;

/**
* Construct a TelemetryEvent
* Construct a TelemetryEvent.
*
* @param telemetryType {@link TelemetryType}
* @param level {@link Level}
Expand Down Expand Up @@ -72,22 +72,26 @@ public TelemetryEvent truncateStrings(int maxLength) {

@Override
public String toString() {
return "TelemetryEvent{" +
"type='" + type.asJson() + '\'' +
", level='" + level.asJson() + '\'' +
", source='" + source + '\'' +
", timestamp_ms=" + timestamp +
", body=" + body +
'}';
return "TelemetryEvent{"
+ "type='" + type.asJson() + '\''
+ ", level='" + level.asJson() + '\''
+ ", source='" + source + '\''
+ ", timestamp_ms=" + timestamp
+ ", body=" + body
+ '}';
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TelemetryEvent that = (TelemetryEvent) o;
return type == that.type && level == that.level && Objects.equals(timestamp, that.timestamp) &&
Objects.equals(body, that.body) && Objects.equals(source, that.source);
return type == that.type && level == that.level && Objects.equals(timestamp, that.timestamp)
&& Objects.equals(body, that.body) && Objects.equals(source, that.source);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,17 @@ public Body truncateStrings(int maxSize) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Body)) return false;
if (this == o) {
return true;
}

if (!(o instanceof Body)) {
return false;
}

Body body = (Body) o;
return Objects.equals(bodyContent, body.bodyContent) && Objects.equals(telemetryEvents, body.telemetryEvents);
return Objects.equals(bodyContent, body.bodyContent)
&& Objects.equals(telemetryEvents, body.telemetryEvents);
}

@Override
Expand Down

0 comments on commit 757f065

Please sign in to comment.