@Override public void accept(DefaultIssue issue, ScmInfo scmInfo) { when(issue.getLocations()).thenReturn(DbIssues.Locations.newBuilder().setTextRange(range(2, 3)).build()); setDateOfChangetsetAtLine(scmInfo, 2, 1200L); setDateOfChangetsetAtLine(scmInfo, 3, 1300L); } }
@Override public void accept(DefaultIssue issue, ScmInfo scmInfo) { Builder locations = DbIssues.Locations.newBuilder() .setTextRange(range(2, 3)) .addFlow(newFlow(newLocation(4, 5))) .addFlow(newFlow(newLocation(6, 7, COMPONENT_UUID), newLocation(8, 9, COMPONENT_UUID))); when(issue.getLocations()).thenReturn(locations.build()); setDateOfChangetsetAtLine(scmInfo, 2, 1200L); setDateOfChangetsetAtLine(scmInfo, 3, 1300L); setDateOfChangetsetAtLine(scmInfo, 4, 1400L); setDateOfChangetsetAtLine(scmInfo, 5, 1500L); // some lines missing should be ok setDateOfChangetsetAtLine(scmInfo, 9, 1900L); } }
@Override public void accept(DefaultIssue issue, ScmInfo scmInfo) { Builder locations = DbIssues.Locations.newBuilder() .setTextRange(range(2, 3)) .addFlow(newFlow(newLocation(4, 5))) .addFlow(newFlow(newLocation(6, 7, COMPONENT_UUID), newLocation(8, 9, "another"))); when(issue.getLocations()).thenReturn(locations.build()); setDateOfChangetsetAtLine(scmInfo, 2, 1200L); setDateOfChangetsetAtLine(scmInfo, 3, 1300L); setDateOfChangetsetAtLine(scmInfo, 4, 1400L); setDateOfChangetsetAtLine(scmInfo, 5, 1500L); setDateOfChangetsetAtLine(scmInfo, 6, 1600L); setDateOfChangetsetAtLine(scmInfo, 7, 1700L); setDateOfChangetsetAtLine(scmInfo, 8, 1800L); setDateOfChangetsetAtLine(scmInfo, 9, 1900L); } }
DbIssues.Locations.Builder dbLocationsBuilder = DbIssues.Locations.newBuilder(); if (reportIssue.hasTextRange()) { dbLocationsBuilder.setTextRange(convertTextRange(reportIssue.getTextRange()));
dbLocationsBuilder.setTextRange(convertTextRange(reportIssue.getTextRange()));
.setTextRange(DbCommons.TextRange.newBuilder() .setStartLine(10) .setEndLine(12)
.setTextRange(DbCommons.TextRange.newBuilder() .setStartLine(10) .setEndLine(12)
.setTextRange(DbCommons.TextRange.newBuilder() .setStartLine(10) .setEndLine(12)
dbLocationsBuilder.setTextRange(convertTextRange(reportIssue.getTextRange()));
DbIssues.Locations.Builder dbLocationsBuilder = DbIssues.Locations.newBuilder(); if (reportExternalIssue.hasTextRange()) { dbLocationsBuilder.setTextRange(convertTextRange(reportExternalIssue.getTextRange()));