Merge branch '1.5.x'
This commit is contained in:
@@ -59,7 +59,8 @@ class TypeElementMembers {
|
||||
|
||||
private final FieldValuesParser fieldValuesParser;
|
||||
|
||||
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser, TypeElement element) {
|
||||
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser,
|
||||
TypeElement element) {
|
||||
this.env = env;
|
||||
this.typeUtils = new TypeUtils(this.env);
|
||||
this.fieldValuesParser = fieldValuesParser;
|
||||
|
||||
@@ -357,10 +357,18 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
ConfigurationMetadata metadata = compile(ClassWithNestedProperties.class);
|
||||
assertThat(metadata).has(Metadata.withGroup("nestedChildProps")
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class));
|
||||
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.child-class-property", Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(20));
|
||||
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.parent-class-property", Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(10));
|
||||
assertThat(metadata)
|
||||
.has(Metadata
|
||||
.withProperty("nestedChildProps.child-class-property",
|
||||
Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
|
||||
.withDefaultValue(20));
|
||||
assertThat(metadata)
|
||||
.has(Metadata
|
||||
.withProperty("nestedChildProps.parent-class-property",
|
||||
Integer.class)
|
||||
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
|
||||
.withDefaultValue(10));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -62,6 +62,7 @@ public class TestProject {
|
||||
* incremental builds.
|
||||
*/
|
||||
private File sourceFolder;
|
||||
|
||||
private TestCompiler compiler;
|
||||
|
||||
private Set<File> sourceFiles = new LinkedHashSet<File>();
|
||||
@@ -202,4 +203,5 @@ public class TestProject {
|
||||
private static String getContents(File file) throws Exception {
|
||||
return FileCopyUtils.copyToString(new FileReader(file));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ public class BarProperties {
|
||||
public void setCounter(Integer counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ public class RenamedBarProperties {
|
||||
public void setCounter(Integer counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,9 @@ public class LombokInnerClassProperties {
|
||||
}
|
||||
|
||||
public enum Fourth {
|
||||
|
||||
YES, NO
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public class DeprecatedMethodConfig {
|
||||
public void setFlag(boolean flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ public class MethodAndClassConfig {
|
||||
public void setFlag(boolean flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ public class SimpleMethodConfig {
|
||||
public void setFlag(boolean flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class ClassWithNestedProperties {
|
||||
public void setParentClassProperty(int parentClassProperty) {
|
||||
this.parentClassProperty = parentClassProperty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConfigurationProperties(prefix = "nestedChildProps")
|
||||
@@ -50,5 +51,7 @@ public class ClassWithNestedProperties {
|
||||
public void setChildClassProperty(int childClassProperty) {
|
||||
this.childClassProperty = childClassProperty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,4 +36,5 @@ public class BuilderPojo {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ public class GenericConfig<T> {
|
||||
public Map<String, Integer> getStringToInteger() {
|
||||
return this.stringToInteger;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Bar<U> {
|
||||
@@ -99,6 +100,7 @@ public class GenericConfig<T> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,12 +89,15 @@ public class InnerClassProperties {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum Fourth {
|
||||
|
||||
YES, NO
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ public class InnerClassRootConfig {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class InvalidDoubleRegistrationProperties {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user