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.
P.S: Is it possible to write such a rule using XPath?