From f56403d091e126912a389d60581005d6b30a9f85 Mon Sep 17 00:00:00 2001 From: "stirlingbot[bot]" <195170888+stirlingbot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:43:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20format=20everything=20with=20pre?= =?UTF-8?q?-commit=20by=20=20(#3374)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-generated by [create-pull-request][1] with **stirlingbot** [1]: https://github.com/peter-evans/create-pull-request Signed-off-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> --- .../software/SPDF/EE/KeygenLicenseVerifier.java | 12 ++++++------ .../SPDF/controller/web/UploadLimitService.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java index ce3c94435..e4bd06312 100644 --- a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java +++ b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java @@ -390,7 +390,7 @@ public class KeygenLicenseVerifier { // Extract max users and isEnterprise from policy or metadata int users = policyObj.optInt("users", 0); isEnterpriseLicense = policyObj.optBoolean("isEnterprise", false); - + if (users > 0) { applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users", users); @@ -402,7 +402,7 @@ public class KeygenLicenseVerifier { users = metadata.optInt("users", 1); applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users (from metadata)", users); - + // Check for isEnterprise flag in metadata isEnterpriseLicense = metadata.optBoolean("isEnterprise", false); } else { @@ -411,7 +411,7 @@ public class KeygenLicenseVerifier { log.info("Using default of 1 user for license"); } } - + } return true; @@ -507,16 +507,16 @@ public class KeygenLicenseVerifier { .path("users") .asInt(0); applicationProperties.getPremium().setMaxUsers(users); - + // Extract isEnterprise flag - isEnterpriseLicense = + isEnterpriseLicense = jsonResponse .path("data") .path("attributes") .path("metadata") .path("isEnterprise") .asBoolean(false); - + log.info(applicationProperties.toString()); } else { diff --git a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java index c1c9aebcf..f760f986a 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java +++ b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java @@ -16,7 +16,7 @@ public class UploadLimitService { private ApplicationProperties applicationProperties; public long getUploadLimit() { - String maxUploadSize = + String maxUploadSize = applicationProperties.getSystem().getFileUploadLimit() != null ? applicationProperties.getSystem().getFileUploadLimit() : ""; @@ -52,4 +52,4 @@ public class UploadLimitService { String pre = "KMGTPE".charAt(exp - 1) + "B"; return String.format("%.1f %s", bytes / Math.pow(1024, exp), pre); } -} \ No newline at end of file +}