//
MJsonObject fullLicense = MLicenseManager.generateFullLicense(privateKeyPemString, licenseSkeletonJsonString);
//
- Files.write(fullLicenseFile, fullLicense.getJsonValue(true).getBytes(MConstants.DEFAULT_CHARSET), StandardOpenOption.CREATE);
+ Files.write(fullLicenseFile, fullLicense.getJsonValue(true).getBytes(MConstants.DEFAULT_CHARSET), StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
}
catch (IOException exception) {
throw new MLicensingException("Could not generate full license.", exception);