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

@@ -77,4 +77,5 @@ public class ValueHint implements Serializable {
return "ValueHint{" + "value=" + this.value + ", description='" + this.description
+ '\'' + '}';
}
}

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

View File

@@ -233,6 +233,7 @@ class ProjectLibraries implements Libraries {
public String toString() {
return getFile().getAbsolutePath();
}
}
/**

View File

@@ -99,4 +99,5 @@ public class RunPluginFeatures implements PluginFeatures {
}
});
}
}

View File

@@ -39,7 +39,6 @@ public final class BuildPropertiesWriter {
/**
* Creates a new {@code BuildPropertiesWriter} that will write to the given
* {@code outputFile}.
*
* @param outputFile the output file
*/
public BuildPropertiesWriter(File outputFile) {
@@ -168,4 +167,5 @@ public final class BuildPropertiesWriter {
}
}
}

View File

@@ -89,4 +89,5 @@ public abstract class FileUtils {
}
return hex.toString();
}
}

View File

@@ -356,6 +356,7 @@ public class JarWriter implements LoaderClassesWriter {
public boolean hasZipHeader() {
return Arrays.equals(this.header, ZIP_HEADER);
}
}
/**
@@ -396,6 +397,7 @@ public class JarWriter implements LoaderClassesWriter {
entry.setCrc(this.crc.getValue());
entry.setMethod(ZipEntry.STORED);
}
}
/**

View File

@@ -39,10 +39,13 @@ public abstract class LogbackInitializer {
}
private static class Initializer {
public void setRootLogLevel() {
ILoggerFactory factory = StaticLoggerBinder.getSingleton().getLoggerFactory();
Logger logger = factory.getLogger(Logger.ROOT_LOGGER_NAME);
((ch.qos.logback.classic.Logger) logger).setLevel(Level.INFO);
}
}
}

View File

@@ -392,7 +392,6 @@ public abstract class MainClassFinder {
* Creates a new {@code MainClass} rather represents the main class with the given
* {@code name}. The class is annotated with the annotations with the given
* {@code annotationNames}.
*
* @param name the name of the class
* @param annotationNames the names of the annotations on the class
*/

View File

@@ -60,6 +60,7 @@ public class RepackagerTests {
};
private static final long JAN_1_1980;
private static final long JAN_1_1985;
static {

View File

@@ -628,4 +628,5 @@ public class PropertiesLauncher extends Launcher {
}
}
}

View File

@@ -65,7 +65,8 @@ public class ExplodedArchive implements Archive {
* Create a new {@link ExplodedArchive} instance.
* @param root the root folder
* @param recursive if recursive searching should be used to locate the manifest.
* Defaults to {@code true}, folders with a large tree might want to set this to {@code
* Defaults to {@code true}, folders with a large tree might want to set this to
* {@code
* false}.
*/
public ExplodedArchive(File root, boolean recursive) {

View File

@@ -404,7 +404,9 @@ public class JarFile extends java.util.jar.JarFile {
* The type of a {@link JarFile}.
*/
enum JarFileType {
DIRECT, NESTED_DIRECTORY, NESTED_JAR
}
}

View File

@@ -32,7 +32,6 @@ import java.util.Set;
* @author Juergen Hoeller
* @author Rob Harrop
* @author Dave Syer
*
* @see System#getProperty(String)
*/
public abstract class SystemPropertyUtils {

View File

@@ -122,6 +122,7 @@ class InternalOutputCapture implements TestRule {
this.copy.flush();
this.original.flush();
}
}
}

View File

@@ -253,6 +253,7 @@ public class PropertiesLauncherTests {
protected Class<?> findClass(String name) throws ClassNotFoundException {
return super.findClass(name);
}
}
}

View File

@@ -60,4 +60,5 @@ public class WarLauncherTests extends AbstractExecutableArchiveLauncherTests {
new URL("jar:" + jarRoot.toURI().toURL() + "!/WEB-INF/classes!/"),
new URL("jar:" + jarRoot.toURI().toURL() + "!/WEB-INF/lib/foo.jar!/"));
}
}

View File

@@ -134,4 +134,5 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo {
}
return cleaned.toString();
}
}

View File

@@ -506,6 +506,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
class LaunchRunner implements Runnable {
private final String startClassName;
private final String[] args;
LaunchRunner(String startClassName, String... args) {

View File

@@ -93,4 +93,5 @@ public class DependencyFilterMojoTests {
}
}
}

View File

@@ -87,6 +87,7 @@ public final class Verify {
public static class ArchiveVerifier {
private final ZipFile zipFile;
private final Map<String, ZipEntry> content;
public ArchiveVerifier(ZipFile zipFile) {
@@ -253,6 +254,7 @@ public final class Verify {
assertThat(manifest.getMainAttributes().getValue("Not-Used"))
.isEqualTo("Foo");
}
}
public static class WarArchiveVerification extends AbstractArchiveVerification {
@@ -286,6 +288,7 @@ public final class Verify {
assertThat(manifest.getMainAttributes().getValue("Not-Used"))
.isEqualTo("Foo");
}
}
private static class ZipArchiveVerification extends AbstractArchiveVerification {
@@ -303,6 +306,7 @@ public final class Verify {
assertThat(manifest.getMainAttributes().getValue("Not-Used"))
.isEqualTo("Foo");
}
}
private static class ModuleArchiveVerification extends AbstractArchiveVerification {