[MAGNOLIA-2499] IfVoter returns always false if condition is false Created: 08/Dec/08  Updated: 23/Jan/13  Resolved: 19/Jan/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.6.3
Fix Version/s: 4.0, 3.6.4, 3.6.5

Type: Bug Priority: Major
Reporter: Ralf Hirning Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-2501 Unit tests for IfVoter Sub-task Closed Magnolia International  
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

IfVoter returns always false if condition is false.

to solve:
replace

if(otherwise != null)

{ outcome = otherwise.vote(value); }
outcome = 0 ;

with

if(otherwise != null){ outcome = otherwise.vote(value); }

else

{ outcome = 0 ; }

 Comments   
Comment by Magnolia International [ 09/Dec/08 ]

Care to provide testcases ?

Comment by Magnolia International [ 19/Jan/09 ]

Fixed on 3.6 branch and trunk (4.0).
Added testcases.

Generated at Mon Feb 12 03:37:18 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.