fix .key size 0 crash

pull/8/head
hunter 2021-04-08 10:58:35 +08:00
parent 2225971c59
commit 1199e0b46c
2 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,7 @@ plugins {
}
group 'io.zhile.research.intellij'
version '2.1.13'
version '2.1.14'
sourceCompatibility = 1.7
targetCompatibility = 1.7

View File

@ -13,7 +13,10 @@ public class LicenseFileRecord implements EvalRecord {
public LicenseFileRecord(File file) {
this.file = file;
if (file.length() == 0) {
expireDate = new Date(~System.currentTimeMillis());
return;
}
try (DataInputStream dis = new DataInputStream(new FileInputStream(file))) {
expireDate = new Date(~dis.readLong() + 2592000000L);
} catch (Exception e) {