Skip to content

Commit 7c25c9b

Browse files
committed
use String.format() instead of concatenation
1 parent 42057b0 commit 7c25c9b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,12 @@ private Collection<RepositoryInfo> addRepositories(File[] files, int allowedNest
760760
try {
761761
repository = RepositoryFactory.getRepository(file, CommandTimeoutType.INDEXER, isNested);
762762
} catch (InstantiationException | NoSuchMethodException | InvocationTargetException e) {
763-
LOGGER.log(Level.WARNING, "Could not create repository for '"
764-
+ file + "', could not instantiate the repository.", e);
763+
LOGGER.log(Level.WARNING,
764+
String.format("Could not create repository for '%s': could not instantiate the repository.",
765+
file), e);
765766
} catch (IllegalAccessException iae) {
766-
LOGGER.log(Level.WARNING, "Could not create repository for '"
767-
+ file + "', missing access rights.", iae);
767+
LOGGER.log(Level.WARNING,
768+
String.format("Could not create repository for '%s': missing access rights.", file), iae);
768769
continue;
769770
} catch (ForbiddenSymlinkException e) {
770771
LOGGER.log(Level.WARNING, "Could not create repository for ''{0}'': {1}",

0 commit comments

Comments
 (0)