Skip to content

Commit

Permalink
BugFix Fixed mismatched number of args in string formats
Browse files Browse the repository at this point in the history
(cherry picked from commit c2b6b86)
  • Loading branch information
dk2k authored and gsmet committed Aug 8, 2024
1 parent a38be1e commit 6b2c8e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String delete() {
AuditReader auditReader = AuditReaderFactory.get(em);
List<Number> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String save(String name) {
AuditReader auditReader = AuditReaderFactory.get(em);
List<Number> 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));
Expand Down

0 comments on commit 6b2c8e4

Please sign in to comment.