use of com.adobe.cq.wcm.core.components.it.seljup.util.components.image.v2.Image in project openj9 by eclipse.
the class XMLIndexReader method _createCoreImageAfterParseError.
/**
* This is like the setJ9DumpData method but is to be used when we fail to parse the file. It is meant to try to construct the
* Image object with what it was able to get
*
* @param e The cause of the error
*/
private void _createCoreImageAfterParseError(Exception e) {
Builder builder = null;
if (_stream == null) {
// extract directly from the file
builder = new Builder(_coreFile, _reader, 0, _fileResolvingAgent);
} else {
// extract using the data stream
builder = new Builder(_coreFile, _stream, 0, _fileResolvingAgent);
}
_coreFile.extract(builder);
String osType = builder.getOSType();
String cpuType = builder.getCPUType();
String cpuSubType = builder.getCPUSubType();
long creationTime = builder.getCreationTime();
_coreImage = new Image(osType, null, cpuType, cpuSubType, 0, 0, creationTime);
Iterator spaces = builder.getAddressSpaces();
while (spaces.hasNext()) {
ImageAddressSpace addressSpace = (ImageAddressSpace) spaces.next();
// Set all processes as having invalid runtimes
for (Iterator processes = addressSpace.getProcesses(); processes.hasNext(); ) {
ImageProcess process = (ImageProcess) processes.next();
process.runtimeExtractionFailed(e);
}
_coreImage.addAddressSpace(addressSpace);
}
}
Aggregations