#630 Spring cleanup #2: dangerous code

Accepted
closed
nobody
None
cdk-1.4.x
1
2013-05-03
2013-05-02
No

When doing some code clean up, I ran FindBug on some more code.

The first patch replaces a few "&" with "&&" which was what I had in mind. Mind you, for the lines where the first bool tests for nullness, this is critical. Yet, it does not seem to have caused problems before.

The second patch compares int values rather than Integer objects.

1 Attachments

Discussion

  • John May

    John May - 2013-05-02

    Compiler might have optimised out the & as false & true will always be false. For me FindBugs found lots of errors in soap clients generated by axis... made me think.

     
  • John May

    John May - 2013-05-03

    looks good, applied and pushed.

     
  • John May

    John May - 2013-05-03
    • status: open --> closed
    • Group: Needs_Review --> Accepted
     

Log in to post a comment.