View Javadoc
1   /*
2   MissingOverride
3   javaFiveCompatibility = (default)false
4   
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.annotation.missingoverride;
9   
10  public class InputMissingOverrideBadOverrideFromObject
11  {
12      /**
13       * {@inheritDoc}
14       */
15      public boolean // violation 'include @java.lang.Override annotation when '@inheritDoc''
16      equals(Object obj) {
17          return false;
18      }
19  
20      /**
21       * {@inheritDoc no violation}
22       *
23       * @inheritDocs}
24       *
25       * {@inheritDoc
26       */
27      public int hashCode() {
28          return 1;
29      }
30  
31      class Junk {
32  
33          /**
34           * {@inheritDoc}
35           */
36          protected void // violation 'include @java.lang.Override annotation when '@inheritDoc''
37          finalize() throws Throwable {}
38      }
39  }
40  
41  interface HashEq2 {
42  
43      /**
44       * {@inheritDoc}
45       */
46      public int hashCode(); // violation 'include @java.lang.Override annotation when '@inheritDoc''
47  
48      /**
49       * {@inheritDoc}
50       */
51      @Deprecated // violation 'include @java.lang.Override annotation when '@inheritDoc''
52      public String toString();
53  
54      @SuppressWarnings("")
55      /**
56       * {@inheritDoc}
57       */
58      @Deprecated
59      public boolean equals(Object a); // ok, because javadoc has invalid position
60  
61      @SuppressWarnings("")
62      /**
63       * {@inheritDoc}
64       */
65      public HashEq2 clone(Object a); // ok, because javadoc has invalid position
66  }
67  
68  enum enum3 {
69      B;
70  
71      /**
72       * {@inheritDoc}
73       */
74      public String toString(){//violation 'include @java.lang.Override annotation when '@inheritDoc''
75          return "B";
76      }
77  
78      private static void test() {}
79  }