diff options
author | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-28 12:23:28 +0200 |
---|---|---|
committer | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-28 12:23:28 +0200 |
commit | 37665fb6d0bc1eb29396ae949354cf7d6f9d54ca (patch) | |
tree | 058204d723fb31b3b30bf8d141cf621c6f42c0c6 /src/ParseAll.java | |
parent | 1d5c4862e136419ab1ed3fcf8d8edaa0ee5fda10 (diff) |
resolving all the comments santo made
Diffstat (limited to 'src/ParseAll.java')
-rw-r--r-- | src/ParseAll.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/ParseAll.java b/src/ParseAll.java index 2662a85..568c89c 100644 --- a/src/ParseAll.java +++ b/src/ParseAll.java @@ -22,7 +22,7 @@ public class ParseAll { // fileStr = "./progs/wrong.py"; try { - if (!file.isFile() || !getExtension(file.getName()).equals("py")) { + if (!file.isFile() || !Share.getExtension(file.getName()).equals("py")) { System.err.println("Wont parse: " + fileStr); continue; } @@ -56,13 +56,4 @@ public class ParseAll { } } } - - public static String getExtension(String fileName) { - int extensionIndex = fileName.lastIndexOf('.'); - if (extensionIndex == -1) { - return fileName; - } else { - return fileName.substring(extensionIndex + 1); - } - } } |