normalize license expire date to prevent outstanding value on Java 12
Date(Long.MAX_VALUE) is 292278994-08-17T07:12:55.807Z on Java 12, and make Ultrasonic failed to parse. Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
This commit is contained in:
+4
-3
@@ -170,9 +170,10 @@ public class SubsonicRESTController {
|
||||
|
||||
license.setEmail("airsonic@github.com");
|
||||
license.setValid(true);
|
||||
Date neverExpireDate = new Date(Long.MAX_VALUE);
|
||||
license.setLicenseExpires(jaxbWriter.convertDate(neverExpireDate));
|
||||
license.setTrialExpires(jaxbWriter.convertDate(neverExpireDate));
|
||||
Date farFuture = new Date();
|
||||
farFuture.setYear(farFuture.getYear() + 100);
|
||||
license.setLicenseExpires(jaxbWriter.convertDate(farFuture));
|
||||
license.setTrialExpires(jaxbWriter.convertDate(farFuture));
|
||||
|
||||
Response res = createResponse();
|
||||
res.setLicense(license);
|
||||
|
||||
Reference in New Issue
Block a user