Merge branch '1.5.x'

This commit is contained in:
Phillip Webb
2016-12-19 13:21:18 -08:00
362 changed files with 664 additions and 132 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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));
}
}

View File

@@ -53,4 +53,5 @@ public class BarProperties {
public void setCounter(Integer counter) {
this.counter = counter;
}
}

View File

@@ -53,4 +53,5 @@ public class RenamedBarProperties {
public void setCounter(Integer counter) {
this.counter = counter;
}
}

View File

@@ -57,7 +57,9 @@ public class LombokInnerClassProperties {
}
public enum Fourth {
YES, NO
}
}

View File

@@ -52,6 +52,7 @@ public class DeprecatedMethodConfig {
public void setFlag(boolean flag) {
this.flag = flag;
}
}
}

View File

@@ -62,6 +62,7 @@ public class MethodAndClassConfig {
public void setFlag(boolean flag) {
this.flag = flag;
}
}
}

View File

@@ -51,6 +51,7 @@ public class SimpleMethodConfig {
public void setFlag(boolean flag) {
this.flag = flag;
}
}
}

View File

@@ -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;
}
}
}

View File

@@ -36,4 +36,5 @@ public class BuilderPojo {
this.name = name;
return this;
}
}

View File

@@ -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;
}
}
}

View File

@@ -89,12 +89,15 @@ public class InnerClassProperties {
public void setName(String name) {
this.name = name;
}
}
}
public enum Fourth {
YES, NO
}
}

View File

@@ -37,6 +37,7 @@ public class InnerClassRootConfig {
public void setName(String name) {
this.name = name;
}
}
}

View File

@@ -42,6 +42,7 @@ public class InvalidDoubleRegistrationProperties {
public void setName(String name) {
this.name = name;
}
}
}