37class CollapsibleIfVisitorTest {
38
39 private final Parser<Grammar> p = MiniCParser.create();
40 private final Grammar g = p.getGrammar();41
42 @Test
43 void test() {
40class CollapsibleIfSelectTest {
41
42 private final Parser<Grammar> p = MiniCParser.create();
43 private final Grammar g = p.getGrammar(); 44
45 @Test
46 void test() {
94 public static class MyGrammar extends MyBaseGrammar {
95
96 @SuppressWarnings("unused")
97 private int junkIntField; 98 public Object junkObjectField;
99 public Rule rootRule;
100
87 Rule basePackageRule;
88 public Rule basePublicRule;
89 @SuppressWarnings("unused")
90 private Rule basePrivateRule; 91 protected Rule baseProtectedRule;
92 }
93
76 private static final boolean DUMP = false;
77
78 private static final String UNNAMED_CLASSIFIER_ID = "<unnamed class>";
79 private static final String UNNAMED_ENUM_ID = "<unnamed enumeration>"; 80
81 private static final String TOKEN_OVERRIDE = "override";
82 private String[] headerFileSuffixes = null;
A private field which is not referenced anywhere in this file was detected.
Such a field is useless and can be safely removed.
class SomeClass {
private int unused; // Not used anywhere within `SomeClass`.
// ...
}
Remove the field if is is not used anywhere. If the field was meant to be inherited, mark it as protected
instead.
class SomeClass {
protected int usedInSubclass;
// ...
}