From 93a0a2f83de244f5b1d8769df7e1ad3d7d351c9c Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Sat, 6 Jul 2024 22:37:58 +0300 Subject: [PATCH 1/2] BugFix Fixed mismatched number of args in string formats --- .../io/quarkus/oidc/common/runtime/OidcCommonUtils.java | 8 ++++---- .../quarkus/qute/deployment/MessageBundleProcessor.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java index 33c6ce44bbe73..0f0881c594a9a 100644 --- a/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java +++ b/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java @@ -160,8 +160,8 @@ public static void setHttpClientOptions(OidcCommonConfig oidcConfig, HttpClientO } } catch (IOException ex) { throw new ConfigurationException(String.format( - "OIDC truststore file does not exist or can not be read", - oidcConfig.tls.trustStoreFile.get().toString()), ex); + "OIDC truststore file %s does not exist or can not be read", + oidcConfig.tls.trustStoreFile.get()), ex); } } if (oidcConfig.tls.keyStoreFile.isPresent()) { @@ -182,8 +182,8 @@ public static void setHttpClientOptions(OidcCommonConfig oidcConfig, HttpClientO } catch (IOException ex) { throw new ConfigurationException(String.format( - "OIDC keystore file does not exist or can not be read", - oidcConfig.tls.keyStoreFile.get().toString()), ex); + "OIDC keystore file %s does not exist or can not be read", + oidcConfig.tls.keyStoreFile.get()), ex); } } Optional proxyOpt = toProxyOptions(oidcConfig.getProxy()); diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java index 3b45e64f29e94..2a9ff85c3a60c 100644 --- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java +++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java @@ -864,7 +864,7 @@ boolean isEnumConstantMessageKey(String key, IndexView index, ClassInfo bundleIn return true; } throw new MessageBundleException( - String.format("%s is not an enum constant of %: %s", constant, maybeEnum, key)); + String.format("%s is not an enum constant of %s: %s", constant, maybeEnum, key)); } } } From c2b6b86a4a152bf2f353eed55705bab4d43e4197 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Sat, 6 Jul 2024 22:51:28 +0300 Subject: [PATCH 2/2] BugFix Fixed mismatched number of args in string formats --- .../java/io/quarkus/docs/generation/CheckCrossReferences.java | 2 +- .../orm/envers/EnversTestStoreDataAtDeleteResource.java | 2 +- .../hibernate/orm/envers/EnversTestValidationResource.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/main/java/io/quarkus/docs/generation/CheckCrossReferences.java b/docs/src/main/java/io/quarkus/docs/generation/CheckCrossReferences.java index cfcb0f48560ac..8fce62522ef48 100644 --- a/docs/src/main/java/io/quarkus/docs/generation/CheckCrossReferences.java +++ b/docs/src/main/java/io/quarkus/docs/generation/CheckCrossReferences.java @@ -85,7 +85,7 @@ public CheckCrossReferences(Path srcDir, Path referenceIndexPath) if (!Files.exists(referenceIndexPath) || !Files.isReadable(referenceIndexPath)) { throw new IllegalStateException( - String.format("Reference index does not exist or is not readable", referenceIndexPath.toAbsolutePath())); + String.format("Reference index %s does not exist or is not readable", referenceIndexPath.toAbsolutePath())); } ObjectMapper om = new ObjectMapper(new YAMLFactory().enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)); diff --git a/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestStoreDataAtDeleteResource.java b/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestStoreDataAtDeleteResource.java index 282b529ec8f30..007ab91f2677c 100644 --- a/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestStoreDataAtDeleteResource.java +++ b/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestStoreDataAtDeleteResource.java @@ -41,7 +41,7 @@ public String delete() { AuditReader auditReader = AuditReaderFactory.get(em); List revisions = auditReader.getRevisions(MyAuditedEntity.class, entity.getId()); if (revisions.size() != 2) { - throw new IllegalStateException(String.format("found {} revisions", revisions.size())); + throw new IllegalStateException(String.format("found %d revisions", revisions.size())); } for (Number revision : revisions) { diff --git a/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestValidationResource.java b/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestValidationResource.java index 9b18d539bbbce..0556b0cdad7ff 100644 --- a/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestValidationResource.java +++ b/extensions/hibernate-envers/deployment/src/test/java/io/quarkus/hibernate/orm/envers/EnversTestValidationResource.java @@ -41,7 +41,7 @@ public String save(String name) { AuditReader auditReader = AuditReaderFactory.get(em); List revisions = auditReader.getRevisions(MyAuditedEntity.class, entity.getId()); if (revisions.size() != 2) { - throw new IllegalStateException(String.format("found {} revisions", revisions.size())); + throw new IllegalStateException(String.format("found %d revisions", revisions.size())); } MyRevisionEntity revEntity = auditReader.findRevision(MyRevisionEntity.class, revisions.get(0));