[Fb-contrib-commit] SF.net SVN: fb-contrib: [526] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/det
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2006-05-10 03:12:50
|
Revision: 526 Author: dbrosius Date: 2006-05-09 20:12:34 -0700 (Tue, 09 May 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=526&view=rev Log Message: ----------- don't report fields that don't have sourcelines. These collections haven't been checked to see that they are actually synchronized. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-05-10 03:07:18 UTC (rev 525) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-05-10 03:12:34 UTC (rev 526) @@ -113,14 +113,18 @@ className = cls.getClassName(); super.visitClassContext(classContext); for (FieldAnnotation fa : staticCollectionFields.values()) { - bugReporter.reportBug(new BugInstance(this, "NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION", NORMAL_PRIORITY) - .addClass(this) - .addField(fa)); + if (fa.getSourceLines() != null) { + bugReporter.reportBug(new BugInstance(this, "NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION", NORMAL_PRIORITY) + .addClass(this) + .addField(fa)); + } } for (FieldAnnotation fa : instanceCollectionFields.values()) { - bugReporter.reportBug(new BugInstance(this, "NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION", NORMAL_PRIORITY) - .addClass(this) - .addField(fa)); + if (fa.getSourceLines() != null) { + bugReporter.reportBug(new BugInstance(this, "NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION", NORMAL_PRIORITY) + .addClass(this) + .addField(fa)); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |