You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2020/12/13 21:54:28 UTC
[tapestry-5] branch master updated: TAP5-2641: migrator tool also
processing Groovy source files
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/master by this push:
new 0b4bddf TAP5-2641: migrator tool also processing Groovy source files
0b4bddf is described below
commit 0b4bddfb0e26503f13e75855542c07483095462a
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Sun Dec 13 18:54:09 2020 -0300
TAP5-2641: migrator tool also processing Groovy source files
---
.../main/java/org/apache/tapestry5/versionmigrator/Main.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tapestry-version-migrator/src/main/java/org/apache/tapestry5/versionmigrator/Main.java b/tapestry-version-migrator/src/main/java/org/apache/tapestry5/versionmigrator/Main.java
index 48dc5ba..65de091 100644
--- a/tapestry-version-migrator/src/main/java/org/apache/tapestry5/versionmigrator/Main.java
+++ b/tapestry-version-migrator/src/main/java/org/apache/tapestry5/versionmigrator/Main.java
@@ -76,14 +76,14 @@ public class Main
throw new RuntimeException(e);
}
- List<File> javaFiles = getJavaFiles();
+ List<File> sourceFiles = getJavaFiles();
System.out.println("Number of renamed or moved classes: " + properties.size());
- System.out.println("Number of Java source files found: " + javaFiles.size());
+ System.out.println("Number of source files found: " + sourceFiles.size());
int totalCount = 0;
int totalChanged = 0;
- for (File file : javaFiles)
+ for (File file : sourceFiles)
{
boolean changed = upgrade(file, properties);
if (changed) {
@@ -98,7 +98,7 @@ public class Main
if (totalCount % 100 == 0)
{
System.out.printf("Processed %5d out of %d files (%.1f%%)\n",
- totalCount, javaFiles.size(), totalCount * 100.0 / javaFiles.size());
+ totalCount, sourceFiles.size(), totalCount * 100.0 / sourceFiles.size());
}
}
@@ -140,7 +140,7 @@ public class Main
private static void collectJavaFiles(File currentFolder, List<File> javaFiles)
{
- File[] javaFilesInFolder = currentFolder.listFiles((f) -> f.isFile() && f.getName().endsWith(".java"));
+ File[] javaFilesInFolder = currentFolder.listFiles((f) -> f.isFile() && (f.getName().endsWith(".java") || f.getName().endsWith(".groovy")));
for (File file : javaFilesInFolder) {
javaFiles.add(file);
}