You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Daniel Kasmeroglu (JIRA)" <ji...@apache.org> on 2014/10/19 01:37:33 UTC
[jira] [Commented] (TOMEE-1417) [TEST] Incorrect test function
PropertiesTest assertTest
[ https://issues.apache.org/jira/browse/TOMEE-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176173#comment-14176173 ]
Daniel Kasmeroglu commented on TOMEE-1417:
------------------------------------------
Added a pull request to fix this expression: https://github.com/costamojan/tomee/pull/11
> [TEST] Incorrect test function PropertiesTest assertTest
> --------------------------------------------------------
>
> Key: TOMEE-1417
> URL: https://issues.apache.org/jira/browse/TOMEE-1417
> Project: TomEE
> Issue Type: Improvement
> Affects Versions: 2.0.0
> Reporter: Daniel Kasmeroglu
> Priority: Trivial
> Fix For: 2.0.0
>
>
> The helper function _PropertiesTest$assertProperties_ contains an invalid comparison for a different property:
> {code:java}
> if (expectedValue != expectedValue && (expectedValue == null || !expectedValue.equals(actual))) {
> ...
> }
> {code}
> The comparison *expectedValue != expectedValue* obviously always returns false so the contained code will never be executed.
> Furthermore the only use cases of this function returns at it's entry due to the fact that the supplied parameters are always equal.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)