From 0c12b97cd2cf80e4050a522a1514f80bc6a39a00 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 8 Sep 2016 20:03:11 +0100 Subject: [PATCH] IllegalType: added more classes from Collections --- README.md | 17 ++++++++++++----- src/main/resources/net/kemitix/checkstyle.xml | 4 +++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0b1d1a7..2598dd6 100644 --- a/README.md +++ b/README.md @@ -1197,16 +1197,23 @@ Checks that labels are not used. #### [IllegalType](http://checkstyle.sourceforge.net/config_coding.html#IllegalType) -Prevents variables, parameters and method returns from being one of the following: +Prevents use of implementation classes as variables, parameters or method returns. Use the interfaces instead. -* java.util.HashSet +Prevents variables, parameters and method returns from being any of the following: + +* java.util.ArrayDeque +* java.util.ArrayList +* java.util.EnumMap +* java.util.EnumSet * java.util.HashMap +* java.util.HashSet +* java.util.IdentityHashMap * java.util.LinkedHashMap * java.util.LinkedHashSet -* java.util.TreeSet +* java.util.LinkedList +* java.util.PriorityQueue * java.util.TreeMap - -> TODO: add more classes from Collections +* java.util.TreeSet Valid: ```` diff --git a/src/main/resources/net/kemitix/checkstyle.xml b/src/main/resources/net/kemitix/checkstyle.xml index 520c9f2..bc75507 100644 --- a/src/main/resources/net/kemitix/checkstyle.xml +++ b/src/main/resources/net/kemitix/checkstyle.xml @@ -100,7 +100,9 @@ - + + +