From c2b6b86a4a152bf2f353eed55705bab4d43e4197 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Sat, 6 Jul 2024 22:51:28 +0300 Subject: [PATCH] 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));