Skip to content

Commit 27c9740

Browse files
author
Vladimir Kotal
committed
fix format strings
1 parent b12afbb commit 27c9740

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/GitRepository.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected String findOriginalName(String fullpath, String changeset)
343343

344344
if (status != 0) {
345345
LOGGER.log(Level.WARNING,
346-
"Failed to get original name in revision {3} for: \"{0}\" Exit code: {1}",
346+
"Failed to get original name in revision {2} for: \"{0}\" Exit code: {1}",
347347
new Object[]{fullpath, String.valueOf(status), changeset});
348348
return null;
349349
}
@@ -655,14 +655,13 @@ public String determineCurrentVersion(boolean interactive) throws IOException {
655655
int indexOf = StringUtils.nthIndexOf(output, delim, 1);
656656
if (indexOf < 0) {
657657
throw new IOException(
658-
String.format("Couldn't extract date from \"%s\".",
659-
new Object[]{output}));
658+
String.format("Couldn't extract date from \"%s\".", output));
660659
}
661660

662661
try {
663662
Date date = getDateFormat().parse(output.substring(0, indexOf));
664663
return String.format("%s %s",
665-
new Object[]{outputDateFormat.format(date), output.substring(indexOf + 1)});
664+
outputDateFormat.format(date), output.substring(indexOf + 1));
666665
} catch (ParseException ex) {
667666
throw new IOException(ex);
668667
}

opengrok-indexer/src/main/java/org/opengrok/indexer/history/MercurialRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ private String findOriginalName(String fullpath, String full_rev_to_find)
352352

353353
if (status != 0) {
354354
LOGGER.log(Level.WARNING,
355-
"Failed to get original name in revision {3} for: \"{0}\" Exit code: {1}",
355+
"Failed to get original name in revision {2} for: \"{0}\" Exit code: {1}",
356356
new Object[]{fullpath, String.valueOf(status), full_rev_to_find});
357357
return null;
358358
}

0 commit comments

Comments
 (0)