Revert polish on Bean Override support
This commit revers the removal of the `private` keyword in the examples of the reference documentation and the tests for consistency. While the default visibility makes the example more concise, it could imply to the reader that the field (or the factory method) cannot be private. Also, there is no need to multiply anything returned from `Objects.hash` as its very distinct on its own already.
This commit is contained in:
@@ -231,27 +231,27 @@ public class OverrideMetadataTests {
|
||||
|
||||
public static class ConfigA {
|
||||
|
||||
ExampleService noQualifier;
|
||||
private ExampleService noQualifier;
|
||||
|
||||
@Qualifier("test")
|
||||
ExampleService directQualifier;
|
||||
private ExampleService directQualifier;
|
||||
|
||||
@Qualifier("different")
|
||||
ExampleService differentDirectQualifier;
|
||||
private ExampleService differentDirectQualifier;
|
||||
|
||||
@CustomQualifier
|
||||
ExampleService customQualifier;
|
||||
private ExampleService customQualifier;
|
||||
|
||||
}
|
||||
|
||||
public static class ConfigB {
|
||||
|
||||
ExampleService noQualifier;
|
||||
private ExampleService noQualifier;
|
||||
|
||||
ExampleService example;
|
||||
private ExampleService example;
|
||||
|
||||
@Qualifier("test")
|
||||
ExampleService directQualifier;
|
||||
private ExampleService directQualifier;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class TestBeanContextCustomizerEqualityTests {
|
||||
@TestBean
|
||||
private String description;
|
||||
|
||||
static String description() {
|
||||
private static String description() {
|
||||
return "overridden";
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class TestBeanContextCustomizerEqualityTests {
|
||||
@TestBean(name = "descriptionBean")
|
||||
private String description;
|
||||
|
||||
static String description() {
|
||||
private static String description() {
|
||||
return "overridden";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user