@Test void shouldRestoreResultBeforeIssuesStatisticsField() throws IOException { XStream2 reportXmlStream = new XStream2(); Path xml = getResourceAsFile("result.xml"); XmlFile xmlFile = new XmlFile(reportXmlStream, xml.toFile()); AnalysisResult restored = (AnalysisResult) xmlFile.read(); assertThat(restored).hasTotalSize(14).hasNewSize(9).hasFixedSize(0); assertThat(restored.getTotals()).hasTotalSize(14).hasNewSize(9).hasFixedSize(0); }
@Whitelisted public IssuesStatistics getTotals() { return totals; }
AnalysisResult implements Serializable, StaticAnalysisRun { @Whitelisted public IssuesStatistics getTotals() { return totals; } }
AnalysisResult implements Serializable, StaticAnalysisRun { @Whitelisted public IssuesStatistics getTotals() { return totals; } @SuppressWarnings("checkstyle:ParameterNumber")  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin,
            final AnalysisResult previousResult);  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin); @VisibleForTesting @SuppressWarnings("checkstyle:ParameterNumber") protected  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report,
            final Blames blames, final RepositoryStatistics repositoryStatistics,
            final QualityGateStatus qualityGateStatus, final Map<String, Integer> sizePerOrigin,
            final boolean canSerialize); }
AnalysisResult implements Serializable, StaticAnalysisRun { @Whitelisted public IssuesStatistics getTotals() { return totals; } @SuppressWarnings("checkstyle:ParameterNumber")  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin,
            final AnalysisResult previousResult);  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin); @VisibleForTesting @SuppressWarnings("checkstyle:ParameterNumber") protected  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report,
            final Blames blames, final RepositoryStatistics repositoryStatistics,
            final QualityGateStatus qualityGateStatus, final Map<String, Integer> sizePerOrigin,
            final boolean canSerialize); Blames getBlames(); RepositoryStatistics getForensics(); @Override String getId(); @Override Run<?, ?> getOwner(); void setOwner(final Run<?, ?> owner); @Override ImmutableList<String> getErrorMessages(); @Override ImmutableList<String> getInfoMessages(); Report getIssues(); Report getOutstandingIssues(); Report getNewIssues(); Report getFixedIssues(); @Override int getNoIssuesSinceBuild(); @Override int getSuccessfulSinceBuild(); boolean isSuccessful(); @Override QualityGateStatus getQualityGateStatus(); @Override String toString(); @Override Optional<Run<?, ?>> getReferenceBuild(); @Whitelisted IssuesStatistics getTotals(); @Override Map<String, Integer> getSizePerOrigin(); Map<Severity, Integer> getSizePerSeverity(); Map<Severity, Integer> getNewSizePerSeverity(); @Override int getTotalSize(); @Override int getTotalSizeOf(final Severity severity); int getTotalErrorsSize(); int getTotalHighPrioritySize(); int getTotalNormalPrioritySize(); int getTotalLowPrioritySize(); @Override int getNewSize(); @Override int getNewSizeOf(final Severity severity); int getNewErrorSize(); int getNewHighPrioritySize(); int getNewNormalPrioritySize(); int getNewLowPrioritySize(); @Override int getFixedSize(); int getDeltaSize(); Build getBuild(); }
AnalysisResult implements Serializable, StaticAnalysisRun { @Whitelisted public IssuesStatistics getTotals() { return totals; } @SuppressWarnings("checkstyle:ParameterNumber")  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin,
            final AnalysisResult previousResult);  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report, final Blames blames,
            final RepositoryStatistics totals, final QualityGateStatus qualityGateStatus,
            final Map<String, Integer> sizePerOrigin); @VisibleForTesting @SuppressWarnings("checkstyle:ParameterNumber") protected  AnalysisResult(final Run<?, ?> owner, final String id, final DeltaReport report,
            final Blames blames, final RepositoryStatistics repositoryStatistics,
            final QualityGateStatus qualityGateStatus, final Map<String, Integer> sizePerOrigin,
            final boolean canSerialize); Blames getBlames(); RepositoryStatistics getForensics(); @Override String getId(); @Override Run<?, ?> getOwner(); void setOwner(final Run<?, ?> owner); @Override ImmutableList<String> getErrorMessages(); @Override ImmutableList<String> getInfoMessages(); Report getIssues(); Report getOutstandingIssues(); Report getNewIssues(); Report getFixedIssues(); @Override int getNoIssuesSinceBuild(); @Override int getSuccessfulSinceBuild(); boolean isSuccessful(); @Override QualityGateStatus getQualityGateStatus(); @Override String toString(); @Override Optional<Run<?, ?>> getReferenceBuild(); @Whitelisted IssuesStatistics getTotals(); @Override Map<String, Integer> getSizePerOrigin(); Map<Severity, Integer> getSizePerSeverity(); Map<Severity, Integer> getNewSizePerSeverity(); @Override int getTotalSize(); @Override int getTotalSizeOf(final Severity severity); int getTotalErrorsSize(); int getTotalHighPrioritySize(); int getTotalNormalPrioritySize(); int getTotalLowPrioritySize(); @Override int getNewSize(); @Override int getNewSizeOf(final Severity severity); int getNewErrorSize(); int getNewHighPrioritySize(); int getNewNormalPrioritySize(); int getNewLowPrioritySize(); @Override int getFixedSize(); int getDeltaSize(); Build getBuild();  }