This commit is contained in:
Erik C. Thauvin 2020-12-01 00:57:35 -08:00
parent 549810b4bb
commit 3bd66fb1c4
2 changed files with 4 additions and 1 deletions

View file

@ -32,6 +32,7 @@
package net.thauvin.erik.mobibot.commands.tell; package net.thauvin.erik.mobibot.commands.tell;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
@ -49,6 +50,7 @@ import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* The Tell Messages Manager. * The Tell Messages Manager.
* *
@ -87,6 +89,7 @@ final class TellMessagesMgr {
* @return The {@link TellMessage} array. * @return The {@link TellMessage} array.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@SuppressFBWarnings("OBJECT_DESERIALIZATION")
public static List<TellMessage> load(final String file, final Logger logger) { public static List<TellMessage> load(final String file, final Logger logger) {
try { try {
try (final ObjectInput input = new ObjectInputStream( try (final ObjectInput input = new ObjectInputStream(

View file

@ -67,7 +67,7 @@ public class EntryLinkTest {
} }
final SecureRandom r = new SecureRandom(); final SecureRandom r = new SecureRandom();
for (i = 0; entryLink.getCommentsCount() > 0; i++) { while (entryLink.getCommentsCount() > 0) {
entryLink.deleteComment(r.nextInt(entryLink.getCommentsCount())); entryLink.deleteComment(r.nextInt(entryLink.getCommentsCount()));
} }
assertThat(entryLink.hasComments()).as("hasComments()").isFalse(); assertThat(entryLink.hasComments()).as("hasComments()").isFalse();