Fixed NPE on game.getState() usage

This commit is contained in:
Oleg Agafonov 2020-08-26 13:34:08 +04:00
parent cf5b474c29
commit 8ce5c7f907
21 changed files with 97 additions and 83 deletions

View file

@ -4,9 +4,10 @@ import com.amazonaws.AmazonClientException;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.Upload;
import java.io.File;
import org.apache.log4j.Logger;
import java.io.File;
public class S3Uploader {
private static final Logger logger = Logger.getLogger(S3Uploader.class);
@ -18,9 +19,9 @@ public class S3Uploader {
String accessKeyId = System.getenv("AWS_ACCESS_ID");
String secretKeyId = System.getenv("AWS_SECRET_KEY");
if (accessKeyId == null || "".equals(accessKeyId)
|| secretKeyId == null || "".equals(secretKeyId)
|| existingBucketName == null || "".equals(existingBucketName)) {
if (accessKeyId == null || accessKeyId.isEmpty()
|| secretKeyId == null || secretKeyId.isEmpty()
|| existingBucketName == null || existingBucketName.isEmpty()) {
logger.info("Aborting json log sync.");
return false;
}