review fixes

This commit is contained in:
Clercq 2022-07-25 23:30:54 +03:00
parent 267fe016e8
commit abddfeb69e

View file

@ -1,6 +1,6 @@
package pro.gravit.launchserver.auth.core; package pro.gravit.launchserver.auth.core;
import com.mysql.cj.util.StringUtils; import io.netty.util.internal.StringUtil;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.ClientPermissions;
@ -148,7 +148,7 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c
@Override @Override
public UserHardware getHardwareInfoByPublicKey(byte[] publicKey) { public UserHardware getHardwareInfoByPublicKey(byte[] publicKey) {
if(StringUtils.isNullOrEmpty(getHardwareInfoByPublicKeyUrl)) { if(StringUtil.isNullOrEmpty(getHardwareInfoByPublicKeyUrl)) {
return null; return null;
} }
try { try {
@ -162,7 +162,7 @@ public UserHardware getHardwareInfoByPublicKey(byte[] publicKey) {
@Override @Override
public UserHardware getHardwareInfoByData(HardwareReportRequest.HardwareInfo info) { public UserHardware getHardwareInfoByData(HardwareReportRequest.HardwareInfo info) {
if(StringUtils.isNullOrEmpty(getHardwareInfoByDataUrl)) { if(StringUtil.isNullOrEmpty(getHardwareInfoByDataUrl)) {
return null; return null;
} }
try { try {
@ -178,7 +178,7 @@ public UserHardware getHardwareInfoByData(HardwareReportRequest.HardwareInfo inf
@Override @Override
public UserHardware getHardwareInfoById(String id) { public UserHardware getHardwareInfoById(String id) {
if(StringUtils.isNullOrEmpty(getHardwareInfoByIdUrl)) { if(StringUtil.isNullOrEmpty(getHardwareInfoByIdUrl)) {
return null; return null;
} }
try { try {
@ -192,7 +192,7 @@ public UserHardware getHardwareInfoById(String id) {
@Override @Override
public UserHardware createHardwareInfo(HardwareReportRequest.HardwareInfo info, byte[] publicKey) { public UserHardware createHardwareInfo(HardwareReportRequest.HardwareInfo info, byte[] publicKey) {
if(StringUtils.isNullOrEmpty(createHardwareInfoUrl)) { if(StringUtil.isNullOrEmpty(createHardwareInfoUrl)) {
return null; return null;
} }
try { try {
@ -206,7 +206,7 @@ public UserHardware createHardwareInfo(HardwareReportRequest.HardwareInfo info,
@Override @Override
public void connectUserAndHardware(UserSession userSession, UserHardware hardware) { public void connectUserAndHardware(UserSession userSession, UserHardware hardware) {
if(StringUtils.isNullOrEmpty(connectUserAndHardwareUrl)) { if(StringUtil.isNullOrEmpty(connectUserAndHardwareUrl)) {
return; return;
} }
try { try {
@ -218,7 +218,7 @@ public void connectUserAndHardware(UserSession userSession, UserHardware hardwar
@Override @Override
public void addPublicKeyToHardwareInfo(UserHardware hardware, byte[] publicKey) { public void addPublicKeyToHardwareInfo(UserHardware hardware, byte[] publicKey) {
if(StringUtils.isNullOrEmpty(addPublicKeyToHardwareInfoUrl)) { if(StringUtil.isNullOrEmpty(addPublicKeyToHardwareInfoUrl)) {
return; return;
} }
try { try {
@ -230,7 +230,7 @@ public void addPublicKeyToHardwareInfo(UserHardware hardware, byte[] publicKey)
@Override @Override
public Iterable<User> getUsersByHardwareInfo(UserHardware hardware) { public Iterable<User> getUsersByHardwareInfo(UserHardware hardware) {
if(StringUtils.isNullOrEmpty(getUsersByHardwareInfoUrl)) { if(StringUtil.isNullOrEmpty(getUsersByHardwareInfoUrl)) {
return null; return null;
} }
try { try {
@ -244,7 +244,7 @@ public Iterable<User> getUsersByHardwareInfo(UserHardware hardware) {
@Override @Override
public void banHardware(UserHardware hardware) { public void banHardware(UserHardware hardware) {
if(StringUtils.isNullOrEmpty(banHardwareUrl)) { if(StringUtil.isNullOrEmpty(banHardwareUrl)) {
return; return;
} }
try { try {
@ -256,7 +256,7 @@ public void banHardware(UserHardware hardware) {
@Override @Override
public void unbanHardware(UserHardware hardware) { public void unbanHardware(UserHardware hardware) {
if(StringUtils.isNullOrEmpty(unbanHardwareUrl)) { if(StringUtil.isNullOrEmpty(unbanHardwareUrl)) {
return; return;
} }
try { try {