1 | String filepath = (String) e.nextElement();↵ | | 1 | String filepath = (String) e.nextElement();↵
|
|
2 | if (wlEntries.containsKey(filepath)) {↵ | | 2 | if (wasEntries.containsKey(filepath)) {↵
|
3 | // File name/path match↵ | | 3 | // File name/path match↵
|
|
4 | // Check files see if same↵ | | 4 | // Check files see if same↵
|
5 | JarEntry genericEntry = (JarEntry) genericEntries.get(filepath);↵ | | 5 | JarEntry genericEntry = (JarEntry) genericEntries.get(filepath);↵
|
6 | JarEntry wlEntry = (JarEntry) wlEntries.get(filepath);↵ | | 6 | JarEntry wasEntry = (JarEntry) wasEntries.get(filepath);↵
|
|
7 | if ((genericEntry.getCrc() != wlEntry.getCrc())↵ | | 7 | if ((genericEntry.getCrc() != wasEntry.getCrc())↵
|
8 | || (genericEntry.getSize() != wlEntry.getSize())) {↵ | | 8 | || (genericEntry.getSize() != wasEntry.getSize())) {↵
|
|
9 | if (genericEntry.getName().endsWith(".class")) {↵ | | 9 | if (genericEntry.getName().endsWith(".class")) {↵
|
10 | //File are different see if its an object or an interface↵ | | 10 | //File are different see if its an object or an interface↵
|
11 | String classname↵ | | 11 | String classname↵
|
12 | = genericEntry.getName().replace(File.separatorChar, '.');↵ | | 12 | = genericEntry.getName().replace(File.separatorChar, '.');↵
|
|
13 | classname = classname.substring(0, classname.lastIndexOf(".class"));↵ | | 13 | classname = classname.substring(0, classname.lastIndexOf(".class"));↵
|
|
14 | Class genclass = genericLoader.loadClass(classname);↵ | | 14 | Class genclass = genericLoader.loadClass(classname);↵
|
|
15 | if (genclass.isInterface()) {↵ | | 15 | if (genclass.isInterface()) {↵
|
16 | //Interface changed rebuild jar.↵ | | 16 | //Interface changed rebuild jar.↵
|
17 | log("Interface " + genclass.getName()↵ | | 17 | log("Interface " + genclass.getName()↵
|
18 | + " has changed", Project.MSG_VERBOSE);↵ | | 18 | + " has changed", Project.MSG_VERBOSE);↵
|
19 | rebuild = true;↵ | | 19 | rebuild = true;↵
|
20 | break;↵ | | 20 | break;↵
|
21 | } else {↵ | | 21 | } else {↵
|
22 | //Object class Changed update it.↵ | | 22 | //Object class Changed update it.↵
|
23 | replaceEntries.put(filepath, genericEntry);↵ | | 23 | replaceEntries.put(filepath, genericEntry);↵
|
24 | }↵ | | 24 | }↵
|
25 | } else {↵ | | 25 | } else {↵
|
26 | // is it the manifest. If so ignore it↵ | | 26 | // is it the manifest. If so ignore it↵
|
27 | if (!genericEntry.getName().equals("META-INF/MANIFEST.MF")) {↵ | | 27 | if (!genericEntry.getName().equals("META-INF/MANIFEST.MF")) {↵
|
28 | //File other then class changed rebuild↵ | | 28 | //File other then class changed rebuild↵
|
29 | log("Non class file " + genericEntry.getName()↵ | | 29 | log("Non class file " + genericEntry.getName()↵
|
30 | + " has changed", Project.MSG_VERBOSE);↵ | | 30 | + " has changed", Project.MSG_VERBOSE);↵
|
31 | rebuild = true;↵ | | 31 | rebuild = true;↵
|
32 | break;↵ | | 32 | }↵
|
33 | }↵ | | 33 | break;↵
|
34 | }↵ | | 34 | }↵
|
35 | }↵ | | 35 | }↵
|
36 | } else {↵ | | 36 | } else {↵
|
37 | // a file doesnt exist rebuild↵ | | 37 | // a file doesn't exist rebuild↵
|
|
38 | log("File " + filepath + " not present in weblogic jar",↵ | | 38 | log("File " + filepath + " not present in websphere jar",↵
|
39 | Project.MSG_VERBOSE);↵ | | 39 | Project.MSG_VERBOSE);↵
|
40 | rebuild = true;↵ | | 40 | rebuild = true;↵
|
41 | break;↵ | | 41 | break;↵
|
42 | } | | 42 | }
|