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