Project

General

Profile

Actions

Bug #16524

closed

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

Added by Nicolas CHARLES over 4 years ago. Updated about 4 years ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

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 1 (0 open1 closed)

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

Updated by Nicolas CHARLES over 4 years ago

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

Updated by Nicolas CHARLES over 4 years 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 4 years ago

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

Updated by François ARMAND about 4 years ago

  • Fix check changed from To do to Checked
Actions #5

Updated by Alexis Mousset about 4 years ago

  • Name check changed from To do to Reviewed
Actions #6

Updated by Vincent MEMBRÉ about 4 years ago

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

Actions #7

Updated by Vincent MEMBRÉ about 4 years ago

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

Updated by Vincent MEMBRÉ about 4 years ago

  • Status changed from Pending release to Released
Actions

Also available in: Atom PDF