/** * Keys are the EJB JAR files and the values are the respective client JARs; includes only key * value pairs for which EJB Client JARs are defined and exist. * * @author schacher */ public static Map collectEJBClientJARs(EARFile earFile) { if (earFile == null) return Collections.EMPTY_MAP; Map ejbClientJARs = null; List ejbJARFiles = earFile.getEJBJarFiles(); Archive clientJAR = null; for (int i = 0; i < ejbJARFiles.size(); i++) { EJBJarFile ejbJarFile = (EJBJarFile) ejbJARFiles.get(i); clientJAR = getClientJAR(ejbJarFile, earFile); if (clientJAR != null) { if (ejbClientJARs == null) ejbClientJARs = new HashMap(); ejbClientJARs.put(ejbJarFile, clientJAR); } } return ejbClientJARs == null ? Collections.EMPTY_MAP : ejbClientJARs; }