(HashSet<String> foundJars, String jarFileName, HashSet<String> readies)
| 845 | } |
| 846 | |
| 847 | private static void tryReady(HashSet<String> foundJars, String jarFileName, HashSet<String> readies) { |
| 848 | try { |
| 849 | final var fileName = jarFileName.substring(0, jarFileName.indexOf(".jar")); |
| 850 | //System.out.println("tryInstall " + fileName); |
| 851 | |
| 852 | if (fileName.endsWith(".interface")) { |
| 853 | var namespace = fileName.substring(0, fileName.indexOf(".interface")); |
| 854 | if (foundJars.remove(namespace)) { |
| 855 | readies.add(namespace); |
| 856 | return; // done |
| 857 | } |
| 858 | } else { |
| 859 | var interfaceJar = fileName + ".interface"; |
| 860 | if (foundJars.remove(interfaceJar)) { |
| 861 | readies.add(fileName); |
| 862 | return; // done |
| 863 | } |
| 864 | } |
| 865 | // 两个jar包只发现了一个,先存下来。 |
| 866 | foundJars.add(fileName); |
| 867 | } catch (Exception ex) { |
| 868 | logger.error("", ex); |
| 869 | } |
| 870 | } |
| 871 | |
| 872 | private void loadExistDistributes(HashSet<String> foundJars, HashSet<String> readies) { |
| 873 | var files = new File(distributeDir).listFiles(); |
no test coverage detected