FindBugs false positive suppression.

This commit is contained in:
Erik C. Thauvin 2019-07-28 15:57:28 -07:00
parent 2d3d13f360
commit 106accdcf5
2 changed files with 4 additions and 0 deletions

View file

@ -32,6 +32,7 @@
package net.thauvin.erik.mobibot.modules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import okhttp3.HttpUrl;
import java.util.regex.Matcher;
@ -97,6 +98,7 @@ public class ModuleException extends Exception {
*
* @return The sanitized message.
*/
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "false positive?")
String getSanitizedMessage() {
if (hasCause()) {
final String causeMessage = getCause().getMessage();

View file

@ -32,6 +32,7 @@
package net.thauvin.erik.mobibot.modules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import net.thauvin.erik.mobibot.Mobibot;
import net.thauvin.erik.mobibot.Utils;
import net.thauvin.erik.mobibot.msg.ErrorMessage;
@ -82,6 +83,7 @@ public final class StockQuote extends ThreadedModule {
* @return The {@link Message} array containing the stock quote.
* @throws ModuleException If an errors occurs.
*/
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "false positive?")
static List<Message> getQuote(final String symbol, final String apiKey) throws ModuleException {
if (!Utils.isValidString(apiKey)) {
throw new ModuleException(Utils.capitalize(STOCK_CMD) + " is disabled. The API key is missing.");