Project

General

Profile

Bug #14770

Invalid comparision of String and Option[String] in HistorizationService

Added by Nicolas CHARLES 5 months ago. Updated 4 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Maintenance
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

Compiling Rudder in 4.1 causes

[WARNING] /home/nicolas/dev/4.3/rudder/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/services/eventlog/HistorizationService.scala:120: warning: Option[String] and String are unrelated: they will most likely always compare unequal
[WARNING]         case Some(entry) => (entry.nodeName != x.hostname || entry.nodeDescription != x.description )
[WARNING]                                                                                    ^
[WARNING] /home/nicolas/dev/4.3/rudder/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/services/eventlog/HistorizationService.scala:146: warning: Option[String] and String are unrelated: they will most likely always compare unequal
[WARNING]            entry.groupDescription != x.nodeGroup.description ||
[WARNING]                                   ^
[WARNING] /home/nicolas/dev/4.3/rudder/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/services/eventlog/HistorizationService.scala:181: warning: Option[String] and String are unrelated: they will most likely always compare unequal
[WARNING]            || entry.directiveDescription != directive.shortDescription
[WARNING]                                          ^
[WARNING] /home/nicolas/dev/4.3/rudder/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/rudder/services/eventlog/HistorizationService.scala:185: warning: Option[String] and String are unrelated: they will most likely always compare unequal
[WARNING]            || entry.techniqueDescription != technique.description

Associated revisions

Revision 805cc3bb (diff)
Added by Nicolas CHARLES 5 months ago

Fixes #14770: Invalid comparision of String and Option[String] in HistorizationService

History

#1

Updated by Nicolas CHARLES 5 months ago

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

Updated by Nicolas CHARLES 5 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/2203
#3

Updated by Rudder Quality Assistant 5 months ago

  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
#4

Updated by Nicolas CHARLES 5 months ago

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

Updated by Vincent MEMBRÉ 4 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.22, 4.3.12 and 5.0.10 which were released today.

Also available in: Atom PDF