Skip to content

Commit 992adf5

Browse files
committed
Add category exclude list
1 parent 4b4f3d5 commit 992adf5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

swan-assist/src/main/java/de/fraunhofer/iem/swan/assist/data/JSONFileLoader.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public class JSONFileLoader {
2626

27-
static private HashMap<String, MethodWrapper> methods= new HashMap<>();
27+
static private HashMap<String, MethodWrapper> methods = new HashMap<>();
2828
static private String congFile = "";
2929
static public final int NEW_METHOD = 0;
3030
static public final int EXISTING_METHOD = 1;
@@ -232,13 +232,18 @@ public static Set<Category> getCategories() {
232232
*/
233233
public static Set<Category> getAllCategories() {
234234

235-
236235
Set<Category> categorySet = new HashSet<>();
237236

237+
Set<Category> exclude = new HashSet<>();
238+
exclude.add(Category.CWETEST);
239+
exclude.add(Category.NONE);
240+
exclude.add(Category.RELEVANT);
241+
exclude.add(Category.AUTHENTICATION);
242+
exclude.add(Category.CWE_NONE);
243+
238244
for (Category category : Category.values()) {
239245

240-
if (!category.toString().equals(de.fraunhofer.iem.swan.data.Constants.NONE)
241-
&& !category.equals(Category.CWETEST)) {
246+
if (!exclude.contains(category)) {
242247
categorySet.add(category);
243248
}
244249
}

0 commit comments

Comments
 (0)