Project

General

Profile

Bug #16524

we should not use .size to check if a collection is empty

Added by Nicolas CHARLES 9 months ago. Updated 7 months ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

see https://pavelfatin.com/scala-collections-tips-and-tricks/

.size for to iterate over the whole collection/list, so we should use isEmpty or seq.lengthCompare(n)


Subtasks

Bug #16606: same as parent ticket, but for .lengthReleasedFrançois ARMANDActions

Related issues

Related to Rudder - Bug #16537: Node never updated because of nonEmpty in place of isEmptyReleasedNicolas CHARLESActions
#1

Updated by Nicolas CHARLES 9 months ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
#2

Updated by Nicolas CHARLES 9 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/2710
#3

Updated by Nicolas CHARLES 8 months ago

  • Status changed from Pending technical review to Pending release
#6

Updated by Vincent MEMBRÉ 7 months ago

This bug has been fixed in Rudder 5.0.16 which was released today.

#7

Updated by Vincent MEMBRÉ 7 months ago

  • Related to Bug #16537: Node never updated because of nonEmpty in place of isEmpty added
#8

Updated by Vincent MEMBRÉ 7 months ago

  • Status changed from Pending release to Released

Also available in: Atom PDF