Project

General

Profile

Actions

Bug #16524

closed

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

Added by Nicolas CHARLES over 1 year ago. Updated about 1 year 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 1 (0 open1 closed)

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
Actions #1

Updated by Nicolas CHARLES over 1 year ago

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

Updated by Nicolas CHARLES over 1 year 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
Actions #3

Updated by Nicolas CHARLES over 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

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

Actions #7

Updated by Vincent MEMBRÉ about 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released
Actions

Also available in: Atom PDF