updated to use revised API

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4690 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Brian Remedios
2006-10-17 00:24:21 +00:00
parent 834b9848d6
commit ad68c535bb

View File

@ -57,13 +57,13 @@ public class CloseResource extends AbstractRule {
};
public Object visit(ASTCompilationUnit node, Object data) {
if (closeTargets.isEmpty() && getStringProperty("closeTargets") != null) {
for (StringTokenizer st = new StringTokenizer(getStringProperty("closeTargets"), ","); st.hasMoreTokens();) {
if (closeTargets.isEmpty() && getStringProperty(closeTargetsDescriptor) != null) {
for (StringTokenizer st = new StringTokenizer(getStringProperty(closeTargetsDescriptor), ","); st.hasMoreTokens();) {
closeTargets.add(st.nextToken());
}
}
if (types.isEmpty() && getStringProperty("types") != null) {
for (StringTokenizer st = new StringTokenizer(getStringProperty("types"), ","); st.hasMoreTokens();) {
if (types.isEmpty() && getStringProperty(typesDescriptor) != null) {
for (StringTokenizer st = new StringTokenizer(getStringProperty(typesDescriptor), ","); st.hasMoreTokens();) {
types.add(st.nextToken());
}
}