(String name)
| 33 | } |
| 34 | |
| 35 | void delete(String name) { |
| 36 | String path1 = null, path2 = null; |
| 37 | File file1, file2; |
| 38 | long date1, date2; |
| 39 | for (int i = 0; i < names.length; i++) { |
| 40 | if (path1 == null && names[i].equals(name)) { |
| 41 | path1 = paths[i] + names[i]; |
| 42 | } else if (path2 == null && names[i].equals(name)) { |
| 43 | path2 = paths[i] + names[i]; |
| 44 | } |
| 45 | if (path1 != null && path2 != null) { |
| 46 | file1 = new File(path1); |
| 47 | file2 = new File(path2); |
| 48 | if (file1 == null || file2 == null) |
| 49 | return; |
| 50 | date1 = file1.lastModified(); |
| 51 | date2 = file2.lastModified(); |
| 52 | if (date1 < date2) |
| 53 | log(path1); |
| 54 | else |
| 55 | log(path2); |
| 56 | break; |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | void log(String path) { |
| 62 | IJ.log("Duplicate plugin: " + path); |
no test coverage detected