@@ -8,19 +8,19 @@ import org.apache.commons.io.FileUtils
88class BusInject {
99
1010 static void start (HashMap<String , String > bus , File busJar ) {
11- String jarPath = busJar. getAbsolutePath()
12- String decompressedJarPath = jarPath. substring(0 , jarPath. length() - 4 );
13- File decompressedJar = new File (decompressedJarPath)
14- ZipUtils . unzipFile(busJar, decompressedJar)
11+ String jarPath = busJar. getAbsolutePath()
12+ String decompressedJarPath = jarPath. substring(0 , jarPath. length() - 4 );
13+ File decompressedJar = new File (decompressedJarPath)
14+ ZipUtils . unzipFile(busJar, decompressedJar)
1515
16- CtClass busUtils = Config . mPool. get(Config . CLASS_BUS_UTILS )
17- CtMethod callMethod = busUtils. getDeclaredMethod(" post" );
18- callMethod. insertAfter(getInsertContent(bus));
19- busUtils. writeFile(decompressedJarPath)
20- busUtils. defrost();
21- FileUtils . forceDelete(busJar)
22- ZipUtils . zipFile(decompressedJar, busJar)
23- FileUtils . forceDelete(decompressedJar)
16+ CtClass busUtils = Config . mPool. get(Config . CLASS_BUS_UTILS )
17+ CtMethod callMethod = busUtils. getDeclaredMethod(" post" );
18+ callMethod. insertAfter(getInsertContent(bus));
19+ busUtils. writeFile(decompressedJarPath)
20+ busUtils. defrost();
21+ FileUtils . forceDelete(busJar)
22+ ZipUtils . zipFile(decompressedJar, busJar)
23+ FileUtils . forceDelete(decompressedJar)
2424 }
2525
2626 private static String getInsertContent (HashMap<String , String > bus ) {
0 commit comments