2020
2121public class ChroniclerJExportRunner extends Thread {
2222
23- private static String mainClass ;
23+ private static String mainClass = "" ;
2424
25- private static String [] mainArgs ;
25+ private static String [] mainArgs = new String [ 0 ] ;
2626
2727 private static ArrayList <String > serializableLogs = new ArrayList <>();
2828
@@ -35,12 +35,16 @@ public static void logMain(String main, String[] args) {
3535 System .arraycopy (args , 0 , mainArgs , 0 , args .length );
3636 }
3737
38- public static void genTestCase () {
38+ public static void genTestCase ()
39+ {
40+ genTestCase ("chroniclerj-crash-" + System .currentTimeMillis () + ".test" );
41+ }
42+ public static void genTestCase (String name ) {
3943 export ();
4044 exportSerializable ();
4145 try {
4246
43- File logFile = new File ("chroniclerj-crash-" + System . currentTimeMillis () + ".test" );
47+ File logFile = new File (name );
4448
4549 Manifest manifest = new Manifest ();
4650 manifest .getMainAttributes ().put (Attributes .Name .MANIFEST_VERSION , "1.0" );
@@ -99,7 +103,8 @@ public static void genTestCase() {
99103 zos .flush ();
100104 zos .close ();
101105 System .out .println ("Chroniclerj exported a test case" );
102-
106+ serializableLogs .clear ();
107+ otherLogs .clear ();
103108 } catch (IOException e ) {
104109 // TODO Auto-generated catch block
105110 e .printStackTrace ();
@@ -149,6 +154,7 @@ public static void export() {
149154 ExportedLog .aLog = Log .aLog ;
150155 ExportedLog .aLog_owners = Log .aLog_owners ;
151156 ExportedLog .aLog_fill = Log .aLog_fill ;
157+ ExportedLog .aLog_debug = Log .aLog_debug ;
152158 Log .logsize = 0 ;
153159 Log .aLog = new Object [Constants .DEFAULT_LOG_SIZE ];
154160 Log .aLog_fill = 0 ;
@@ -211,6 +217,16 @@ public static void exportSerializable() {
211217 ExportedSerializableLog .cLog_owners = SerializableLog .cLog_owners ;
212218 ExportedSerializableLog .sLog_owners = SerializableLog .sLog_owners ;
213219
220+ ExportedSerializableLog .aLog_debug = SerializableLog .aLog_debug ;
221+ ExportedSerializableLog .iLog_debug = SerializableLog .iLog_debug ;
222+ ExportedSerializableLog .jLog_debug = SerializableLog .jLog_debug ;
223+ ExportedSerializableLog .fLog_debug = SerializableLog .fLog_debug ;
224+ ExportedSerializableLog .dLog_debug = SerializableLog .dLog_debug ;
225+ ExportedSerializableLog .bLog_debug = SerializableLog .bLog_debug ;
226+ ExportedSerializableLog .zLog_debug = SerializableLog .zLog_debug ;
227+ ExportedSerializableLog .cLog_debug = SerializableLog .cLog_debug ;
228+ ExportedSerializableLog .sLog_debug = SerializableLog .sLog_debug ;
229+
214230 SerializableLog .aLog = new Object [Constants .DEFAULT_LOG_SIZE ];
215231 SerializableLog .iLog = new int [Constants .DEFAULT_LOG_SIZE ];
216232 SerializableLog .jLog = new long [Constants .DEFAULT_LOG_SIZE ];
@@ -229,6 +245,15 @@ public static void exportSerializable() {
229245 SerializableLog .zLog_owners = new String [Constants .DEFAULT_LOG_SIZE ];
230246 SerializableLog .cLog_owners = new String [Constants .DEFAULT_LOG_SIZE ];
231247 SerializableLog .sLog_owners = new String [Constants .DEFAULT_LOG_SIZE ];
248+ SerializableLog .aLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
249+ SerializableLog .iLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
250+ SerializableLog .jLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
251+ SerializableLog .fLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
252+ SerializableLog .dLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
253+ SerializableLog .bLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
254+ SerializableLog .zLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
255+ SerializableLog .cLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
256+ SerializableLog .sLog_debug = new String [Constants .DEFAULT_LOG_SIZE ];
232257 SerializableLog .logsize = 0 ;
233258 SerializableLog .iLog_fill = 0 ;
234259 SerializableLog .jLog_fill = 0 ;
0 commit comments