public JaCoCoReportReader readJacocoReport ( IExecutionDataVisitor executionDataVisitor , ISessionInfoVisitor sessionInfoStore ) { if ( jacocoExecutionData == null ) { return this ; } JaCoCoExtensions . logger ( ) . info ( "Analysing {}" , jacocoExecutionData ) ; try ( InputStream inputStream = new BufferedInputStream ( new FileInputStream ( jacocoExecutionData ) ) ) { if ( useCurrentBinaryFormat ) { ExecutionDataReader reader = new ExecutionDataReader ( inputStream ) ; reader . setSessionInfoVisitor ( sessionInfoStore ) ; reader . setExecutionDataVisitor ( executionDataVisitor ) ; reader . read ( ) ; } else { org . jacoco . previous . core . data . ExecutionDataReader reader = new org . jacoco . previous . core . data . ExecutionDataReader ( inputStream ) ; reader . setSessionInfoVisitor ( sessionInfoStore ) ; reader . setExecutionDataVisitor ( executionDataVisitor ) ; reader . read ( ) ; } } catch ( IOException e ) { throw new IllegalArgumentException ( String . format ( "Unable to read %s" , jacocoExecutionData . getAbsolutePath ( ) ) , e ) ; } return this ; }
Read JaCoCo report determining the format to be used .