Skip to content

Commit f71255b

Browse files
committed
Added some missing curlies that made SonarLint angry
1 parent 1a88fab commit f71255b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

application/src/main/java/org/togetherjava/tjbot/commands/free/ChannelMonitor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,10 @@ public void updateStatusFor(@NotNull Guild guild) {
271271
}
272272
long channelId = guildIdToStatusChannel.get(guild.getIdLong());
273273
TextChannel channel = guild.getTextChannelById(channelId);
274-
if (channel == null)
275-
throw new IllegalStateException("Status channel %d does not exist in guild %s"
276-
.formatted(channelId, guild.getName()));
274+
if (channel == null) {
275+
throw new IllegalStateException(
276+
"Status channel %d does not exist in guild %s".formatted(channelId, guild.getName()));
277+
}
277278
return channel;
278279
}
279280

application/src/main/java/org/togetherjava/tjbot/commands/free/ChannelStatus.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ public synchronized void setFree() {
164164
public boolean equals(final Object o) {
165165
// TODO should I overload equals with equals(long) so that a Set may be used instead of a
166166
// Map
167-
if (this == o)
167+
if (this == o) {
168168
return true;
169-
if (o == null || getClass() != o.getClass())
169+
}
170+
if (o == null || getClass() != o.getClass()) {
170171
return false;
172+
}
171173

172174
ChannelStatus channelStatus = (ChannelStatus) o;
173175
return channelId == channelStatus.channelId;

logviewer/src/main/java/org/togetherjava/tjbot/logwatcher/entities/InstantWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public Instant toInstant() {
5353

5454
@Override
5555
public boolean equals(Object o) {
56-
if (!(o instanceof InstantWrapper other))
56+
if (!(o instanceof InstantWrapper other)) {
5757
return false;
58+
}
5859

5960
return epochSecond == other.epochSecond && nanoOfSecond != other.nanoOfSecond;
6061
}

0 commit comments

Comments
 (0)