chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Guillaume ...@nuxeo.com>
Subject Re: svn commit: r1147715 - in /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck: ./ impl/ runner/ tests/basics/
Date Mon, 18 Jul 2011 15:35:22 GMT
Please don't do this.
The code as you wrote it uses implicit unboxing, which Eclipse warns
about (rightfully as it can cause lots of NPE (although not in this
particular case)).

The original code was fine, although I'd rather it be written as:
        if (Boolean.FALSE.equals(test))

Florent

On Sun, Jul 17, 2011 at 11:00 PM,  <sfermigier@apache.org> wrote:
> Author: sfermigier
> Date: Sun Jul 17 21:00:50 2011
> New Revision: 1147715
>
> URL: http://svn.apache.org/viewvc?rev=1147715&view=rev
> Log:
> Simplify.
>
>     protected CmisTestResult assertIsFalse(Boolean test, CmisTestResult success, CmisTestResult
failure) {
> -        if ((test != null) && (!test.booleanValue())) {
> +        if (test != null && !test) {
>             return success;
>         }
>


-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Mime
View raw message