[ANY] Выводим стектрейс, если DirBridge.move получил аргументом null.

This commit is contained in:
Zaxar163 2020-04-14 15:35:20 +03:00
parent 5ad1d58f62
commit 6077a51fd4
2 changed files with 7 additions and 1 deletions

View file

@ -60,7 +60,6 @@ private boolean checkSecure(String hash, String salt) {
byte[] normal_hash = SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256,
server.runtime.clientCheckSecret.concat(".").concat(salt));
byte[] launcher_hash = Base64.getDecoder().decode(hash);
//LogHelper.debug("[checkSecure] %s vs %s", Arrays.toString(normal_hash), Arrays.toString(launcher_hash));
return Arrays.equals(normal_hash, launcher_hash);
}

View file

@ -46,6 +46,13 @@ public class DirBridge {
}
public static void move(Path newDir) throws IOException {
if (newDir == null) {
LogHelper.debug("Invalid dir (null)");
if (LogHelper.isDevEnabled())
LogHelper.dev(LogHelper.toString(new Throwable("Check stack of call DirBridge with null path...")));
return;
}
LogHelper.dev(newDir.toString());
IOHelper.move(dirUpdates, newDir);
dirUpdates = newDir;
}