Merge branch '1.5.x'
This commit is contained in:
@@ -71,8 +71,8 @@ public class ItemDeprecation {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", "
|
||||
+ "replacement='" + this.replacement + '\'' + ", "
|
||||
+ "level='" + this.level + '\'' + '}';
|
||||
+ "replacement='" + this.replacement + '\'' + ", " + "level='"
|
||||
+ this.level + '\'' + '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -556,16 +556,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
@Test
|
||||
public void mergeExistingPropertyDeprecation() throws Exception {
|
||||
ItemMetadata property = ItemMetadata.newProperty("simple", "comparator", null,
|
||||
null, null, null, null,
|
||||
new ItemDeprecation("Don't use this.", "simple.complex-comparator",
|
||||
"error"));
|
||||
null, null, null, null, new ItemDeprecation("Don't use this.",
|
||||
"simple.complex-comparator", "error"));
|
||||
writeAdditionalMetadata(property);
|
||||
ConfigurationMetadata metadata = compile(SimpleProperties.class);
|
||||
assertThat(metadata)
|
||||
.has(Metadata.withProperty("simple.comparator", "java.util.Comparator<?>")
|
||||
.fromSource(SimpleProperties.class)
|
||||
.withDeprecation("Don't use this.", "simple.complex-comparator",
|
||||
"error"));
|
||||
.fromSource(SimpleProperties.class).withDeprecation(
|
||||
"Don't use this.", "simple.complex-comparator", "error"));
|
||||
assertThat(metadata.getItems()).hasSize(4);
|
||||
}
|
||||
|
||||
@@ -591,8 +589,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
ConfigurationMetadata metadata = compile(DeprecatedSingleProperty.class);
|
||||
assertThat(metadata).has(
|
||||
Metadata.withProperty("singledeprecated.name", String.class.getName())
|
||||
.fromSource(DeprecatedSingleProperty.class)
|
||||
.withDeprecation("renamed", "singledeprecated.new-name", "error"));
|
||||
.fromSource(DeprecatedSingleProperty.class).withDeprecation(
|
||||
"renamed", "singledeprecated.new-name", "error"));
|
||||
assertThat(metadata.getItems()).hasSize(3);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user