*/
public class FileIndex implements BatchComponent {
- private static final String FILE_S_IS_NOT_DECLARED_IN_MODULE_BASEDIR_S = "File '%s' is not declared in module basedir %s";
+ private static final String FILE_IS_NOT_DECLARED_IN_MODULE_BASEDIR = "File '%s' is not declared in module basedir %s";
private static class Progress {
private final Set<String> removedPaths;
String path = pathResolver.relativePath(fileSystem.baseDir(), sourceFile);
if (path == null) {
LoggerFactory.getLogger(getClass()).warn(String.format(
- FILE_S_IS_NOT_DECLARED_IN_MODULE_BASEDIR_S, sourceFile.getAbsoluteFile(), fileSystem.baseDir()
+ FILE_IS_NOT_DECLARED_IN_MODULE_BASEDIR, sourceFile.getAbsoluteFile(), fileSystem.baseDir()
));
} else {
if (exclusionFilters.accept(sourceFile, path, type)) {
String path = pathResolver.relativePath(fileSystem.baseDir(), sourceFile);
if (path == null) {
LoggerFactory.getLogger(getClass()).warn(String.format(
- FILE_S_IS_NOT_DECLARED_IN_MODULE_BASEDIR_S, sourceFile.getAbsoluteFile(), fileSystem.baseDir()
+ FILE_IS_NOT_DECLARED_IN_MODULE_BASEDIR, sourceFile.getAbsoluteFile(), fileSystem.baseDir()
));
} else {
if (exclusionFilters.accept(sourceFile, path, InputFile.TYPE_MAIN)) {
migration.migrateIfNeeded(javaModule, javaInputFiles);
migration.migrateIfNeeded(phpModule, phpInputFiles);
- verify(logger).info("Migrated resource b:org.foo.Bar to b:src/main/java/org/foo/Bar.java");
+ verify(logger).info("Migrated resource {} to {}", "b:org.foo.Bar", "b:src/main/java/org/foo/Bar.java");
verify(logger).warn("Directory with key b:org/foo matches both b:src/main/java/org/foo and b:src/test/java/org/foo. First match is arbitrary chosen.");
- verify(logger).info("Migrated resource b:org.foo.BarTest to b:src/test/java/org/foo/BarTest.java");
- verify(logger).info("Migrated resource b:[default].RootBar to b:src/main/java/RootBar.java");
- verify(logger).info("Migrated resource b:org/foo to b:src/main/java/org/foo");
- verify(logger).info("Migrated resource b:[root] to b:src/main/java");
+ verify(logger).info("Migrated resource {} to {}", "b:org.foo.BarTest", "b:src/test/java/org/foo/BarTest.java");
+ verify(logger).info("Migrated resource {} to {}", "b:[default].RootBar", "b:src/main/java/RootBar.java");
+ verify(logger).info("Migrated resource {} to {}", "b:org/foo", "b:src/main/java/org/foo");
+ verify(logger).info("Migrated resource {} to {}", "b:[root]", "b:src/main/java");
checkTables("shouldMigrateResourceKeys", new String[] {"build_date", "created_at"}, "projects");
}