return calculateFromChangelog(issue, debtChangelog, period.getSnapshotDate());
}
- private long calculateFromChangelog(DefaultIssue issue, Collection<IssueChangeDto> debtChangelog, long periodDate) {
+ private static long calculateFromChangelog(DefaultIssue issue, Collection<IssueChangeDto> debtChangelog, long periodDate) {
List<FieldDiffs> debtDiffs = from(debtChangelog).transform(ToFieldDiffs.INSTANCE).filter(HasDebtChange.INSTANCE).toSortedList(CHANGE_ORDERING);
FieldDiffs currentChange = issue.currentChange();
if (currentChange != null && HasDebtChange.INSTANCE.apply(currentChange)) {
}
}
- private void writeGroups(JsonWriter json, List<GroupDto> groups, Map<String, Integer> userCountByGroup, Set<String> fields) {
+ private static void writeGroups(JsonWriter json, List<GroupDto> groups, Map<String, Integer> userCountByGroup, Set<String> fields) {
json.name("groups").beginArray();
for (GroupDto group : groups) {
writeGroup(json, group, userCountByGroup.get(group.getName()), fields);
json.endArray();
}
- private void writeGroup(JsonWriter json, GroupDto group, Integer memberCount, Set<String> fields) {
+ private static void writeGroup(JsonWriter json, GroupDto group, Integer memberCount, Set<String> fields) {
json.beginObject()
.prop(FIELD_ID, group.getId().toString())
.prop(FIELD_NAME, fields.contains(FIELD_NAME) ? group.getName() : null)
.endObject();
}
- private Set<String> neededFields(Request request) {
+ private static Set<String> neededFields(Request request) {
Set<String> fields = Sets.newHashSet();
List<String> fieldsFromRequest = request.paramAsStrings(Param.FIELDS);
if (fieldsFromRequest == null || fieldsFromRequest.isEmpty()) {
}
}
- private List<String> keepAuthorizedComponentKeys(final DbSession session, final String componentKey, @Nullable final Integer userId, final String role) {
+ private static List<String> keepAuthorizedComponentKeys(final DbSession session, final String componentKey, @Nullable final Integer userId, final String role) {
if (userId == null) {
return session.getMapper(AuthorizationMapper.class).keepAuthorizedComponentKeysForAnonymous(role, Sets.newHashSet(componentKey));
} else {