Add @Override to remaining source files

Issue: SPR-10130
This commit is contained in:
Rob Winch
2013-05-13 16:47:34 -05:00
parent 30db112d37
commit 9468548116
1279 changed files with 5825 additions and 2 deletions

View File

@@ -193,6 +193,7 @@ public class ExtendedBeanInfoTests {
}
}
class Child extends Parent {
@Override
public Integer getProperty1() {
return 2;
}
@@ -214,6 +215,7 @@ public class ExtendedBeanInfoTests {
@Test
public void cornerSpr9453() throws IntrospectionException {
final class Bean implements Spr9453<Class<?>> {
@Override
public Class<?> getProp() {
return null;
}
@@ -603,7 +605,9 @@ public class ExtendedBeanInfoTests {
public Number setFoo(String foo) { return null; }
}
class C extends B {
@Override
public String getFoo() { return null; }
@Override
public Integer setFoo(String foo) { return null; }
}
@@ -875,6 +879,7 @@ public class ExtendedBeanInfoTests {
}
interface TextBookOperations extends BookOperations {
@Override
TextBook getBook();
}
@@ -884,6 +889,7 @@ public class ExtendedBeanInfoTests {
}
class LawLibrary extends Library implements TextBookOperations {
@Override
public LawBook getBook() { return null; }
}
@@ -898,6 +904,7 @@ public class ExtendedBeanInfoTests {
}
class B extends A {
@Override
public boolean isTargetMethod() {
return false;
}

View File

@@ -2632,6 +2632,7 @@ public class DefaultListableBeanFactoryTests {
return this.name;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -2643,6 +2644,7 @@ public class DefaultListableBeanFactoryTests {
return this.name.equals(p.name);
}
@Override
public int hashCode() {
return this.name.hashCode();
}

View File

@@ -262,6 +262,7 @@ public class CallbacksSecurityTests {
return this.name;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -273,6 +274,7 @@ public class CallbacksSecurityTests {
return this.name.equals(p.name);
}
@Override
public int hashCode() {
return this.name.hashCode();
}

View File

@@ -197,6 +197,7 @@ public class PagedListHolderTests {
this.extendedInfo = extendedInfo;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MockFilter)) return false;
@@ -210,6 +211,7 @@ public class PagedListHolderTests {
return true;
}
@Override
public int hashCode() {
int result;
result = name.hashCode();

View File

@@ -23,6 +23,7 @@ public enum CustomEnum {
VALUE_1, VALUE_2;
@Override
public String toString() {
return "CustomEnum: " + name();
}

View File

@@ -42,6 +42,7 @@ public class NestedTestBean implements INestedTestBean {
return company;
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof NestedTestBean)) {
return false;
@@ -50,10 +51,12 @@ public class NestedTestBean implements INestedTestBean {
return this.company.equals(ntb.company);
}
@Override
public int hashCode() {
return this.company.hashCode();
}
@Override
public String toString() {
return "NestedTestBean: " + this.company;
}

View File

@@ -32,10 +32,12 @@ public class Pet {
return name;
}
@Override
public String toString() {
return getName();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -47,6 +49,7 @@ public class Pet {
return true;
}
@Override
public int hashCode() {
return (name != null ? name.hashCode() : 0);
}

View File

@@ -255,10 +255,12 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt
this.stringArray = stringArray;
}
@Override
public Integer[] getSomeIntegerArray() {
return someIntegerArray;
}
@Override
public void setSomeIntegerArray(Integer[] someIntegerArray) {
this.someIntegerArray = someIntegerArray;
}
@@ -461,6 +463,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@@ -472,6 +475,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt
return (ObjectUtils.nullSafeEquals(this.name, tb2.name) && this.age == tb2.age);
}
@Override
public int hashCode() {
return this.age;
}
@@ -486,6 +490,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt
}
}
@Override
public String toString() {
return this.name;
}