1 /*
2 MissingOverride
3 javaFiveCompatibility = true
4
5
6 */
7
8 package com.puppycrawl.tools.checkstyle.checks.annotation.missingoverride;
9
10 public class InputMissingOverrideBadOverrideFromObjectJava5
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 HashEq2Java5 {
42
43 /**
44 * {@inheritDoc}
45 */
46 public int hashCode(); // violation 'include @java.lang.Override annotation when '@inheritDoc''
47 }
48
49 enum enum3Java5 {
50 B;
51
52 /**
53 * {@inheritDoc}
54 */
55 public String toString(){//violation 'include @java.lang.Override annotation when '@inheritDoc''
56 return "B";
57 }
58
59 private static void test() {}
60 }