[Fb-contrib-commit] fb-contrib/src/com/mebigfatguy/fbcontrib/detect SyncCollectionIterators.java,1.7
Brought to you by:
dbrosius
|
From: Dave B. <dbr...@us...> - 2005-12-04 03:47:44
|
Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2032/src/com/mebigfatguy/fbcontrib/detect Modified Files: SyncCollectionIterators.java Log Message: no need to create seperate classes Index: SyncCollectionIterators.java =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SyncCollectionIterators.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- SyncCollectionIterators.java 11 Nov 2005 04:29:25 -0000 1.7 +++ SyncCollectionIterators.java 4 Dec 2005 03:47:36 -0000 1.8 @@ -38,20 +38,20 @@ public class SyncCollectionIterators extends BytecodeScanningDetector implements StatelessDetector { private BugReporter bugReporter; - private static Set<String> synchCollectionNames = new HashSet<String>() - {{ - add("synchronizedSet"); - add("synchronizedMap"); - add("synchronizedList"); - add("synchronizedSortedSet"); - add("synchronizedSortedMap"); - }}; - private static Set<String> mapToSetMethods = new HashSet<String>() - {{ - add("keySet"); - add("entrySet"); - add("values"); - }}; + private static Set<String> synchCollectionNames = new HashSet<String>(); + static { + synchCollectionNames.add("synchronizedSet"); + synchCollectionNames.add("synchronizedMap"); + synchCollectionNames.add("synchronizedList"); + synchCollectionNames.add("synchronizedSortedSet"); + synchCollectionNames.add("synchronizedSortedMap"); + }; + private static Set<String> mapToSetMethods = new HashSet<String>(); + static { + mapToSetMethods.add("keySet"); + mapToSetMethods.add("entrySet"); + mapToSetMethods.add("values"); + }; private static final int SEEN_NOTHING = 0; private static final int SEEN_SYNC = 1; |