addressed sonar code smells

This commit is contained in:
Sheldan
2020-05-27 19:32:19 +02:00
parent 175a92408c
commit 3fa5edf67a
77 changed files with 164 additions and 243 deletions

View File

@@ -7,7 +7,7 @@ import java.util.HashMap;
public class ModMailThreadNotFoundException extends AbstractoRunTimeException implements Templatable {
private Long modMailThreadId;
private final Long modMailThreadId;
public ModMailThreadNotFoundException(Long modMailThreadId) {
super("");

View File

@@ -2,7 +2,6 @@ package dev.sheldan.abstracto.modmail.models.database;
import dev.sheldan.abstracto.core.models.database.*;
import lombok.*;
import net.dv8tion.jda.api.entities.ChannelType;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;

View File

@@ -10,13 +10,13 @@ import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.MessageChannel;
public interface ModMailThreadService {
void createModMailThreadForUser(FullUser userInAServer, Message initialMessage, MessageChannel feedBackChannel, Boolean userInitiated);
void createModMailThreadForUser(FullUser userInAServer, Message initialMessage, MessageChannel feedBackChannel, boolean userInitiated);
boolean hasOpenThread(AUserInAServer aUserInAServer);
boolean hasOpenThread(AUser user);
void setModMailCategoryTo(AServer server, Long categoryId);
void createModMailPrompt(AUser user, Message initialMessage);
void relayMessageToModMailThread(ModMailThread modMailThread, Message message);
void relayMessageToDm(ModMailThread modMailThread, String text, Message message, Boolean anonymous, MessageChannel feedBack);
void closeModMailThread(ModMailThread modMailThread, MessageChannel feedBack, String note, Boolean notifyUser);
void closeModMailThread(ModMailThread modMailThread, MessageChannel feedBack, String note, Boolean notifyUser, Boolean logThread);
void relayMessageToDm(ModMailThread modMailThread, String text, Message message, boolean anonymous, MessageChannel feedBack);
void closeModMailThread(ModMailThread modMailThread, MessageChannel feedBack, String note, boolean notifyUser);
void closeModMailThread(ModMailThread modMailThread, MessageChannel feedBack, String note, boolean notifyUser, boolean logThread);
}