Project

General

Profile

Bug #14770

Invalid comparision of String and Option[String] in HistorizationService

Added by Nicolas CHARLES about 1 year ago. Updated about 1 year 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


Related issues

Related to Rudder - Bug #17778: table nodes contains on entry per node per generation, which is too muchPending releaseFrançois ARMANDActions

Also available in: Atom PDF