fix .key size 0 crash
parent
2225971c59
commit
1199e0b46c
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
group 'io.zhile.research.intellij'
|
||||
version '2.1.13'
|
||||
version '2.1.14'
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
targetCompatibility = 1.7
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue