ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Custom PMD Rules
Subject:   XPath rule to close JDBC resources
Date:   2005-02-28 04:31:29
From:   PravinD
Hello,


I am attempting to create a XPath rule that detects JDBC resources and pops an error if they are not closed inside the finally block. This rule should take care of all objects like resultsets, statements, preparedstatements, connection objects. For starters I would like to check for connection objects alone. If anyone has written such a rule or knows how the rule should be then please post the rule. Thanks in advance.


Pravin. D


P.S: Is it possible to write such a rule using XPath?


1 to 1 of 1
1 to 1 of 1