Add @Override to remaining source files
Issue: SPR-10130
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -23,6 +23,7 @@ public enum CustomEnum {
|
||||
|
||||
VALUE_1, VALUE_2;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CustomEnum: " + name();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user