Search in sources :

Example 1 with NewElfDump

use of com.ibm.dtfj.corereaders.NewElfDump in project openj9 by eclipse.

the class DTFJLibraryAdapter method isLibraryCollectionRequired.

public boolean isLibraryCollectionRequired(File coreFile) {
    ICoreFileReader reader = null;
    try {
        ClosingFileReader closingFile = new ClosingFileReader(coreFile);
        reader = DumpFactory.createDumpForCore(closingFile);
    } catch (Exception e) {
        logger.log(SEVERE, "Could not determine if library collection is required for " + coreFile.getAbsolutePath(), e);
        errorMessages.add(e.getMessage());
        // if this fails, then so would any collection attempt as well
        return false;
    }
    if (reader instanceof NewElfDump) {
        return true;
    }
    if (reader instanceof NewAixDump) {
        return true;
    }
    return false;
}
Also used : NewElfDump(com.ibm.dtfj.corereaders.NewElfDump) ClosingFileReader(com.ibm.dtfj.corereaders.ClosingFileReader) NewAixDump(com.ibm.dtfj.corereaders.NewAixDump) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) ICoreFileReader(com.ibm.dtfj.corereaders.ICoreFileReader)

Aggregations

ClosingFileReader (com.ibm.dtfj.corereaders.ClosingFileReader)1 ICoreFileReader (com.ibm.dtfj.corereaders.ICoreFileReader)1 NewAixDump (com.ibm.dtfj.corereaders.NewAixDump)1 NewElfDump (com.ibm.dtfj.corereaders.NewElfDump)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1