View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="AvoidNoArgumentSuperConstructorCall"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.coding.avoidnoargumentsuperconstructorcall;
9   
10  // xdoc section -- start
11  class SuperClass {
12    public SuperClass() {}
13    public SuperClass(int arg) {}
14  }
15  class Example1 extends SuperClass {
16    Example1() {
17      super(); // violation
18    }
19  
20    Example1(int arg) {
21      super(arg); // ok, explicit constructor invocation with argument
22    }
23  
24    Example1(long arg) {
25      // ok, no explicit constructor invocation
26    }
27  }
28  // xdoc section -- end