Conrad

Show:

What's happening?

  • Comment: Property CloseTargets not documented on PMD site

    Except that... that property doesn't completely work! Please see my detailed description of this and 2 other bugs in CloseResource, in PMD bug# 1964798. I even provided the code for a fix (but I can not directly access the PMD project code base for contributing to it). Unfortunately, 1964798 was closed for some reason -- I think it was just miscommunication. Which is too bad, because I thought...

    2009-04-24 20:32:47 UTC in PMD

  • Comment: 3 bugs in CloseResourceRule (with fixes attached)

    Responding to shahzadmasud's comment: In the version of CloseResource that I fixed, not only are rs and stmt correctly flagged as not being closed in your second example, but all 3 variables in BOTH of your examples are correctly flagged as not being closed, because having closeTargets=returnConnection should really be closeTargets=DatabaseHandler.returnConnection, etc.

    2008-12-31 16:29:18 UTC in PMD

  • Comment: 3 bugs in CloseResourceRule (with fixes attached)

    I'm not sure which test case you mean by "the very last test case". Looking at revision 6250 of CloseResource.xml that you directed me to, the content of the code element in last test case (lines 252-267) passes my rule with no problems (but beware that I'm still based off of PMD 4.1). If that test case doesn't pass the PMD5 trunk's CloseResourceRule.java, then I don't know what could be wrong...

    2008-06-24 19:22:18 UTC in PMD

  • Comment: 3 bugs in CloseResourceRule (with fixes attached)

    Your test case fails regression test because there is whitespace before "cleanup" in the closeTargets property value. Either that can be removed from the test case, or, if whitespace is supposed to be allowed between comma-separated values in a list property value, then adding ".trim()" after "st.nextToken()" (two places) will fix that. But I'm not sure why you changed expected-problems from...

    2008-06-23 18:03:13 UTC in PMD

  • Comment: 3 bugs in CloseResourceRule (with fixes attached)

    Upon closer examination, I see that the #1 problem above is incorrectly stated. The problem is not with any "MyHelper.myClose" closeTarget, but only when the close target contains the "this" prefix. The test-code below reproduces it. This means that, at a minimum, the two "Found a call to a" comments in my code should be changed. ...

    2008-06-23 14:31:18 UTC in PMD

  • 3 bugs in CloseResourceRule (with fixes attached)

    I found and fixed 3 problems with CloseResourceRule. 1. The closeTargets property does not work if the target method is called by its class name prefix. I.e., MyHelper.closeDbResources. You can reproduce this by changing the existing MyHelper.close regression test to MyHelper.myClose in both the test case java code and the closeTargets property. The reason the MyHelper.close test case works...

    2008-05-15 19:26:13 UTC in PMD

About Me

  • 2008-05-13 (1 year ago)
  • 2086301
  • conradarmstrong (My Site)
  • Conrad

Send me a message