/** * Constructor. This is not meant to be called directly; use one of the * factory methods instead. */ private ProjectFilterSettings() { DetectorFactoryCollection.instance(); // ensure detectors loaded // initially all known bug categories are active // using SortedSet to allow better revision control on saved sorted // properties this.activeBugCategorySet = new TreeSet<>(DetectorFactoryCollection.instance().getBugCategories()); this.hiddenBugCategorySet = new HashSet<>(); activeBugCategorySet.remove("NOISE"); hiddenBugCategorySet.add("NOISE"); setMinRank(DEFAULT_MIN_RANK); setMinPriority(DEFAULT_PRIORITY); this.displayFalseWarnings = false; }
@Test public void testPlainCategories() { int count = 0; for (String category : DetectorFactoryCollection.instance().getBugCategories()) { if (!category.equals("NOISE")) { Assert.assertTrue(plain.containsCategory(category)); ++count; } } Assert.assertEquals(count, plain.getActiveCategorySet().size()); }
/** * Constructor. This is not meant to be called directly; use one of the * factory methods instead. */ private ProjectFilterSettings() { DetectorFactoryCollection.instance(); // ensure detectors loaded // initially all known bug categories are active // using SortedSet to allow better revision control on saved sorted // properties this.activeBugCategorySet = new TreeSet<String>(DetectorFactoryCollection.instance().getBugCategories()); this.hiddenBugCategorySet = new HashSet<String>(); activeBugCategorySet.remove("NOISE"); hiddenBugCategorySet.add("NOISE"); setMinRank(DEFAULT_MIN_RANK); setMinPriority(DEFAULT_PRIORITY); this.displayFalseWarnings = false; }