diff --git a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/JSONArrayAdvisor.java b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/JSONArrayAdvisor.java index 7c4373c..21c055c 100644 --- a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/JSONArrayAdvisor.java +++ b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/JSONArrayAdvisor.java @@ -116,7 +116,8 @@ public static void arrayWriteObject(Object array, int index, Object value) { long threadId = Thread.currentThread().getId(); long timeStamp = System.nanoTime(); - JSONTraceGenerator.arraySetOutput(array.getClass().getName(), Integer.toString(System.identityHashCode(array)), index, value.getClass().getName(), Integer.toString(System.identityHashCode(value)), threadId, timeStamp); + JSONTraceGenerator.arraySetOutput(array.getClass().getName(), Integer.toString(System.identityHashCode(array)), index, + ((value !=null)?value.getClass().getName():"---"), ((value != null)?Integer.toString(System.identityHashCode(value)):"0"), threadId, timeStamp); ((Object [])array)[index] = value; } @@ -124,7 +125,8 @@ Object value = ((Object [])array)[index]; long threadId = Thread.currentThread().getId(); long timeStamp = System.nanoTime(); - JSONTraceGenerator.arrayGetOutput(array.getClass().getName(), Integer.toString(System.identityHashCode(array)), index, value.getClass().getName(), Integer.toString(System.identityHashCode(value)), threadId, timeStamp); + JSONTraceGenerator.arrayGetOutput(array.getClass().getName(), Integer.toString(System.identityHashCode(array)), index, + ((value !=null)?value.getClass().getName():"---"), ((value != null)?Integer.toString(System.identityHashCode(value)):"0"), threadId, timeStamp); return value; } }