Fix javadoc errors and warnings

pull/3003/merge
Phillip Webb 10 years ago
parent 890554e8d6
commit f65dfe4bcb

@ -65,6 +65,16 @@
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
@ -75,46 +85,148 @@
<artifactId>json-simple</artifactId> <artifactId>json-simple</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>com.samskivert</groupId> <groupId>com.samskivert</groupId>
<artifactId>jmustache</artifactId> <artifactId>jmustache</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>com.sendgrid</groupId>
<artifactId>sendgrid-java</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.timgroup</groupId>
<artifactId>java-statsd-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>io.dropwizard.metrics</groupId> <groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId> <artifactId>metrics-core</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>io.projectreactor.spring</groupId>
<artifactId>reactor-spring-context</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>io.undertow</groupId> <groupId>io.undertow</groupId>
<artifactId>undertow-servlet</artifactId> <artifactId>undertow-servlet</artifactId>
<optional>true</optional> <optional>true</optional>
<exclusions>
<exclusion>
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
<groupId>org.jboss.spec.javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-websockets-jsr</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>undertow-servlet</artifactId>
<groupId>io.undertow</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.jms</groupId> <groupId>javax.jms</groupId>
<artifactId>jms-api</artifactId> <artifactId>jms-api</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>net.sf.ehcache</groupId>
<artifactId>log4j-api</artifactId> <artifactId>ehcache</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>log4j-core</artifactId> <artifactId>thymeleaf-layout-dialect</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-jms-pool</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-server</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
@ -135,6 +247,21 @@
<artifactId>tomcat-embed-logging-juli</artifactId> <artifactId>tomcat-embed-logging-juli</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.codehaus.btm</groupId> <groupId>org.codehaus.btm</groupId>
<artifactId>btm</artifactId> <artifactId>btm</artifactId>
@ -150,10 +277,21 @@
<artifactId>groovy-xml</artifactId> <artifactId>groovy-xml</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-templates</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.crashub</groupId> <groupId>org.crashub</groupId>
<artifactId>crash.shell</artifactId> <artifactId>crash.shell</artifactId>
<optional>true</optional> <optional>true</optional>
<exclusions>
<exclusion>
<artifactId>groovy-all</artifactId>
<groupId>org.codehaus.groovy</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -170,11 +308,21 @@
<artifactId>jetty-webapp</artifactId> <artifactId>jetty-webapp</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>javax-websocket-server-impl</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.flywaydb</groupId> <groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId> <artifactId>flyway-core</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId> <artifactId>hibernate-entitymanager</artifactId>
@ -190,6 +338,21 @@
<artifactId>hornetq-jms-server</artifactId> <artifactId>hornetq-jms-server</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jcache</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-spring4</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.jolokia</groupId> <groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId> <artifactId>jolokia-core</artifactId>
@ -210,6 +373,16 @@
<artifactId>jul-to-slf4j</artifactId> <artifactId>jul-to-slf4j</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId> <artifactId>spring-messaging</artifactId>
@ -255,11 +428,41 @@
<artifactId>spring-cloud-spring-service-connector</artifactId> <artifactId>spring-cloud-spring-service-connector</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-jmx</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId> <artifactId>spring-security-config</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-linkedin</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-twitter</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.data</groupId> <groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId> <artifactId>spring-data-elasticsearch</artifactId>
@ -275,6 +478,11 @@
<artifactId>spring-data-mongodb</artifactId> <artifactId>spring-data-mongodb</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.data</groupId> <groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-core</artifactId> <artifactId>spring-data-rest-core</artifactId>
@ -320,11 +528,31 @@
<artifactId>thymeleaf-spring4</artifactId> <artifactId>thymeleaf-spring4</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-conditionalcomments</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.mxab.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-data-attribute</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.yaml</groupId> <groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
<profiles> <profiles>
<profile> <profile>

@ -60,7 +60,7 @@ public abstract class FileUtils {
* Generate a SHA.1 Hash for a given file. * Generate a SHA.1 Hash for a given file.
* @param file the file to hash * @param file the file to hash
* @return the hash value as a String * @return the hash value as a String
* @throws IOException * @throws IOException if the file cannot be read
*/ */
public static String sha1Hash(File file) throws IOException { public static String sha1Hash(File file) throws IOException {
try { try {

@ -62,8 +62,8 @@ public class JarWriter {
/** /**
* Create a new {@link JarWriter} instance. * Create a new {@link JarWriter} instance.
* @param file the file to write * @param file the file to write
* @throws IOException * @throws IOException if the file cannot be opened
* @throws FileNotFoundException * @throws FileNotFoundException if the file cannot be found
*/ */
public JarWriter(File file) throws FileNotFoundException, IOException { public JarWriter(File file) throws FileNotFoundException, IOException {
this(file, null); this(file, null);
@ -73,8 +73,8 @@ public class JarWriter {
* Create a new {@link JarWriter} instance. * Create a new {@link JarWriter} instance.
* @param file the file to write * @param file the file to write
* @param launchScript an optional launch script to prepend to the front of the jar * @param launchScript an optional launch script to prepend to the front of the jar
* @throws IOException * @throws IOException if the file cannot be opened
* @throws FileNotFoundException * @throws FileNotFoundException if the file cannot be found
*/ */
public JarWriter(File file, LaunchScript launchScript) throws FileNotFoundException, public JarWriter(File file, LaunchScript launchScript) throws FileNotFoundException,
IOException { IOException {
@ -102,7 +102,7 @@ public class JarWriter {
/** /**
* Write the specified manifest. * Write the specified manifest.
* @param manifest the manifest to write * @param manifest the manifest to write
* @throws IOException * @throws IOException of the manifest cannot be written
*/ */
public void writeManifest(final Manifest manifest) throws IOException { public void writeManifest(final Manifest manifest) throws IOException {
JarEntry entry = new JarEntry("META-INF/MANIFEST.MF"); JarEntry entry = new JarEntry("META-INF/MANIFEST.MF");
@ -117,7 +117,7 @@ public class JarWriter {
/** /**
* Write all entries from the specified jar file. * Write all entries from the specified jar file.
* @param jarFile the source jar file * @param jarFile the source jar file
* @throws IOException * @throws IOException if the entries cannot be written
*/ */
public void writeEntries(JarFile jarFile) throws IOException { public void writeEntries(JarFile jarFile) throws IOException {
Enumeration<JarEntry> entries = jarFile.entries(); Enumeration<JarEntry> entries = jarFile.entries();
@ -194,7 +194,7 @@ public class JarWriter {
/** /**
* Write the required spring-boot-loader classes to the JAR. * Write the required spring-boot-loader classes to the JAR.
* @throws IOException * @throws IOException if the classes cannot be written
*/ */
public void writeLoaderClasses() throws IOException { public void writeLoaderClasses() throws IOException {
URL loaderJar = getClass().getClassLoader().getResource(NESTED_LOADER_JAR); URL loaderJar = getClass().getClassLoader().getResource(NESTED_LOADER_JAR);
@ -211,7 +211,7 @@ public class JarWriter {
/** /**
* Close the writer. * Close the writer.
* @throws IOException * @throws IOException if the file cannot be closed
*/ */
public void close() throws IOException { public void close() throws IOException {
this.jarOutput.close(); this.jarOutput.close();

@ -37,7 +37,7 @@ public interface Libraries {
/** /**
* Iterate all relevant libraries. * Iterate all relevant libraries.
* @param callback a callback for each relevant library. * @param callback a callback for each relevant library.
* @throws IOException * @throws IOException if the operation fails
*/ */
void doWithLibraries(LibraryCallback callback) throws IOException; void doWithLibraries(LibraryCallback callback) throws IOException;

@ -29,7 +29,7 @@ public interface LibraryCallback {
/** /**
* Callback to for a single library backed by a {@link File}. * Callback to for a single library backed by a {@link File}.
* @param library the library * @param library the library
* @throws IOException * @throws IOException if the operation fails
*/ */
void library(Library library) throws IOException; void library(Library library) throws IOException;

@ -76,7 +76,7 @@ public abstract class MainClassFinder {
* Find the main class from a given folder. * Find the main class from a given folder.
* @param rootFolder the root folder to search * @param rootFolder the root folder to search
* @return the main class or {@code null} * @return the main class or {@code null}
* @throws IOException * @throws IOException if the folder cannot be read
*/ */
public static String findMainClass(File rootFolder) throws IOException { public static String findMainClass(File rootFolder) throws IOException {
return doWithMainClasses(rootFolder, new ClassNameCallback<String>() { return doWithMainClasses(rootFolder, new ClassNameCallback<String>() {
@ -91,7 +91,7 @@ public abstract class MainClassFinder {
* Find a single main class from a given folder. * Find a single main class from a given folder.
* @param rootFolder the root folder to search * @param rootFolder the root folder to search
* @return the main class or {@code null} * @return the main class or {@code null}
* @throws IOException * @throws IOException if the folder cannot be read
*/ */
public static String findSingleMainClass(File rootFolder) throws IOException { public static String findSingleMainClass(File rootFolder) throws IOException {
MainClassesCallback callback = new MainClassesCallback(); MainClassesCallback callback = new MainClassesCallback();
@ -161,7 +161,7 @@ public abstract class MainClassFinder {
* @param jarFile the jar file to search * @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes * @param classesLocation the location within the jar containing classes
* @return the main class or {@code null} * @return the main class or {@code null}
* @throws IOException * @throws IOException if the jar file cannot be read
*/ */
public static String findMainClass(JarFile jarFile, String classesLocation) public static String findMainClass(JarFile jarFile, String classesLocation)
throws IOException { throws IOException {
@ -179,7 +179,7 @@ public abstract class MainClassFinder {
* @param jarFile the jar file to search * @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes * @param classesLocation the location within the jar containing classes
* @return the main class or {@code null} * @return the main class or {@code null}
* @throws IOException * @throws IOException if the jar file cannot be read
*/ */
public static String findSingleMainClass(JarFile jarFile, String classesLocation) public static String findSingleMainClass(JarFile jarFile, String classesLocation)
throws IOException { throws IOException {

@ -90,7 +90,7 @@ public class Repackager {
/** /**
* Repackage the source file so that it can be run using '{@literal java -jar}' * Repackage the source file so that it can be run using '{@literal java -jar}'
* @param libraries the libraries required to run the archive * @param libraries the libraries required to run the archive
* @throws IOException * @throws IOException if the file cannot be repackaged
*/ */
public void repackage(Libraries libraries) throws IOException { public void repackage(Libraries libraries) throws IOException {
repackage(this.source, libraries); repackage(this.source, libraries);
@ -101,7 +101,7 @@ public class Repackager {
* {@literal java -jar}' * {@literal java -jar}'
* @param destination the destination file (may be the same as the source) * @param destination the destination file (may be the same as the source)
* @param libraries the libraries required to run the archive * @param libraries the libraries required to run the archive
* @throws IOException * @throws IOException if the file cannot be repackaged
*/ */
public void repackage(File destination, Libraries libraries) throws IOException { public void repackage(File destination, Libraries libraries) throws IOException {
repackage(destination, libraries, null); repackage(destination, libraries, null);
@ -113,7 +113,7 @@ public class Repackager {
* @param destination the destination file (may be the same as the source) * @param destination the destination file (may be the same as the source)
* @param libraries the libraries required to run the archive * @param libraries the libraries required to run the archive
* @param launchScript an optional launch script prepended to the front of the jar * @param launchScript an optional launch script prepended to the front of the jar
* @throws IOException * @throws IOException if the file cannot be repackaged
* @since 1.3.0 * @since 1.3.0
*/ */
public void repackage(File destination, Libraries libraries, LaunchScript launchScript) public void repackage(File destination, Libraries libraries, LaunchScript launchScript)

@ -119,7 +119,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
* Called to post-process archive entries before they are used. Implementations can * Called to post-process archive entries before they are used. Implementations can
* add and remove entries. * add and remove entries.
* @param archives the archives * @param archives the archives
* @throws Exception * @throws Exception if the post processing fails
*/ */
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception { protected void postProcessClassPathArchives(List<Archive> archives) throws Exception {
} }

@ -70,7 +70,7 @@ public abstract class Launcher {
* Create a classloader for the specified archives. * Create a classloader for the specified archives.
* @param archives the archives * @param archives the archives
* @return the classloader * @return the classloader
* @throws Exception * @throws Exception if the classloader cannot be created
*/ */
protected ClassLoader createClassLoader(List<Archive> archives) throws Exception { protected ClassLoader createClassLoader(List<Archive> archives) throws Exception {
List<URL> urls = new ArrayList<URL>(archives.size()); List<URL> urls = new ArrayList<URL>(archives.size());
@ -86,7 +86,7 @@ public abstract class Launcher {
* Create a classloader for the specified URLs * Create a classloader for the specified URLs
* @param urls the URLs * @param urls the URLs
* @return the classloader * @return the classloader
* @throws Exception * @throws Exception if the classloader cannot be created
*/ */
protected ClassLoader createClassLoader(URL[] urls) throws Exception { protected ClassLoader createClassLoader(URL[] urls) throws Exception {
return new LaunchedURLClassLoader(urls, getClass().getClassLoader()); return new LaunchedURLClassLoader(urls, getClass().getClassLoader());
@ -97,7 +97,7 @@ public abstract class Launcher {
* @param args the incoming arguments * @param args the incoming arguments
* @param mainClass the main class to run * @param mainClass the main class to run
* @param classLoader the classloader * @param classLoader the classloader
* @throws Exception * @throws Exception if the launch fails
*/ */
protected void launch(String[] args, String mainClass, ClassLoader classLoader) protected void launch(String[] args, String mainClass, ClassLoader classLoader)
throws Exception { throws Exception {
@ -114,7 +114,7 @@ public abstract class Launcher {
* @param args the incoming arguments * @param args the incoming arguments
* @param classLoader the classloader * @param classLoader the classloader
* @return a runnable used to start the application * @return a runnable used to start the application
* @throws Exception * @throws Exception if the main method runner cannot be created
*/ */
protected Runnable createMainMethodRunner(String mainClass, String[] args, protected Runnable createMainMethodRunner(String mainClass, String[] args,
ClassLoader classLoader) throws Exception { ClassLoader classLoader) throws Exception {
@ -127,14 +127,14 @@ public abstract class Launcher {
/** /**
* Returns the main class that should be launched. * Returns the main class that should be launched.
* @return the name of the main class * @return the name of the main class
* @throws Exception * @throws Exception if the main class cannot be obtained
*/ */
protected abstract String getMainClass() throws Exception; protected abstract String getMainClass() throws Exception;
/** /**
* Returns the archives that will be used to construct the class path. * Returns the archives that will be used to construct the class path.
* @return the class path archives * @return the class path archives
* @throws Exception * @throws Exception if the class path archives cannot be obtained
*/ */
protected abstract List<Archive> getClassPathArchives() throws Exception; protected abstract List<Archive> getClassPathArchives() throws Exception;

@ -37,7 +37,7 @@ public abstract class Archive {
/** /**
* Returns a URL that can be used to load the archive. * Returns a URL that can be used to load the archive.
* @return the archive URL * @return the archive URL
* @throws MalformedURLException * @throws MalformedURLException if the URL is malformed
*/ */
public abstract URL getUrl() throws MalformedURLException; public abstract URL getUrl() throws MalformedURLException;
@ -45,7 +45,7 @@ public abstract class Archive {
* Obtain the main class that should be used to launch the application. By default * Obtain the main class that should be used to launch the application. By default
* this method uses a {@code Start-Class} manifest entry. * this method uses a {@code Start-Class} manifest entry.
* @return the main class * @return the main class
* @throws Exception * @throws Exception if the main class cannot be obtained
*/ */
public String getMainClass() throws Exception { public String getMainClass() throws Exception {
Manifest manifest = getManifest(); Manifest manifest = getManifest();
@ -73,7 +73,7 @@ public abstract class Archive {
/** /**
* Returns the manifest of the archive. * Returns the manifest of the archive.
* @return the manifest * @return the manifest
* @throws IOException * @throws IOException if the manifest cannot be read
*/ */
public abstract Manifest getManifest() throws IOException; public abstract Manifest getManifest() throws IOException;
@ -87,7 +87,7 @@ public abstract class Archive {
* Returns nested {@link Archive}s for entries that match the specified filter. * Returns nested {@link Archive}s for entries that match the specified filter.
* @param filter the filter used to limit entries * @param filter the filter used to limit entries
* @return nested archives * @return nested archives
* @throws IOException * @throws IOException if nested archives cannot be read
*/ */
public abstract List<Archive> getNestedArchives(EntryFilter filter) public abstract List<Archive> getNestedArchives(EntryFilter filter)
throws IOException; throws IOException;
@ -96,7 +96,7 @@ public abstract class Archive {
* Returns a filtered version of the archive. * Returns a filtered version of the archive.
* @param filter the filter to apply * @param filter the filter to apply
* @return a filter archive * @return a filter archive
* @throws IOException * @throws IOException if the archive cannot be read
*/ */
public abstract Archive getFilteredArchive(EntryRenameFilter filter) public abstract Archive getFilteredArchive(EntryRenameFilter filter)
throws IOException; throws IOException;

@ -32,7 +32,7 @@ public interface RandomAccessData {
* caller is responsible close the underlying stream. * caller is responsible close the underlying stream.
* @param access hint indicating how the underlying data should be accessed * @param access hint indicating how the underlying data should be accessed
* @return a new input stream that can be used to read the underlying data. * @return a new input stream that can be used to read the underlying data.
* @throws IOException * @throws IOException if the stream cannot be opened
*/ */
InputStream getInputStream(ResourceAccess access) throws IOException; InputStream getInputStream(ResourceAccess access) throws IOException;

@ -100,7 +100,7 @@ public final class JarEntryData {
* @return the underlying {@link RandomAccessData} for this entry. Generally this * @return the underlying {@link RandomAccessData} for this entry. Generally this
* method should not be called directly and instead data should be accessed via * method should not be called directly and instead data should be accessed via
* {@link JarFile#getInputStream(ZipEntry)}. * {@link JarFile#getInputStream(ZipEntry)}.
* @throws IOException * @throws IOException if the data cannot be read
*/ */
public RandomAccessData getData() throws IOException { public RandomAccessData getData() throws IOException {
if (this.data == null) { if (this.data == null) {

@ -89,7 +89,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/** /**
* Create a new {@link JarFile} backed by the specified file. * Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file * @param file the root jar file
* @throws IOException * @throws IOException if the file cannot be read
*/ */
public JarFile(File file) throws IOException { public JarFile(File file) throws IOException {
this(new RandomAccessDataFile(file)); this(new RandomAccessDataFile(file));
@ -98,7 +98,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/** /**
* Create a new {@link JarFile} backed by the specified file. * Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file * @param file the root jar file
* @throws IOException * @throws IOException if the file cannot be read
*/ */
JarFile(RandomAccessDataFile file) throws IOException { JarFile(RandomAccessDataFile file) throws IOException {
this(file, "", file); this(file, "", file);
@ -110,7 +110,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* @param rootFile the root jar file * @param rootFile the root jar file
* @param pathFromRoot the name of this file * @param pathFromRoot the name of this file
* @param data the underlying data * @param data the underlying data
* @throws IOException * @throws IOException if the file cannot be read
*/ */
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot, private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data) throws IOException { RandomAccessData data) throws IOException {
@ -320,19 +320,19 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/** /**
* Return a nested {@link JarFile} loaded from the specified entry. * Return a nested {@link JarFile} loaded from the specified entry.
* @param ze the zip entry * @param entry the zip entry
* @return a {@link JarFile} for the entry * @return a {@link JarFile} for the entry
* @throws IOException * @throws IOException if the nested jar file cannot be read
*/ */
public synchronized JarFile getNestedJarFile(final ZipEntry ze) throws IOException { public synchronized JarFile getNestedJarFile(final ZipEntry entry) throws IOException {
return getNestedJarFile(getContainedEntry(ze).getSource()); return getNestedJarFile(getContainedEntry(entry).getSource());
} }
/** /**
* Return a nested {@link JarFile} loaded from the specified entry. * Return a nested {@link JarFile} loaded from the specified entry.
* @param sourceEntry the zip entry * @param sourceEntry the zip entry
* @return a {@link JarFile} for the entry * @return a {@link JarFile} for the entry
* @throws IOException * @throws IOException if the nested jar file cannot be read
*/ */
public synchronized JarFile getNestedJarFile(JarEntryData sourceEntry) public synchronized JarFile getNestedJarFile(JarEntryData sourceEntry)
throws IOException { throws IOException {
@ -388,7 +388,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* Return a new jar based on the filtered contents of this file. * Return a new jar based on the filtered contents of this file.
* @param filters the set of jar entry filters to be applied * @param filters the set of jar entry filters to be applied
* @return a filtered {@link JarFile} * @return a filtered {@link JarFile}
* @throws IOException * @throws IOException if the jar file cannot be read
*/ */
public synchronized JarFile getFilteredJarFile(JarEntryFilter... filters) public synchronized JarFile getFilteredJarFile(JarEntryFilter... filters)
throws IOException { throws IOException {
@ -418,7 +418,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* Return a URL that can be used to access this JAR file. NOTE: the specified URL * Return a URL that can be used to access this JAR file. NOTE: the specified URL
* cannot be serialized and or cloned. * cannot be serialized and or cloned.
* @return the URL * @return the URL
* @throws MalformedURLException * @throws MalformedURLException if the URL is malformed
*/ */
public URL getUrl() throws MalformedURLException { public URL getUrl() throws MalformedURLException {
if (this.url == null) { if (this.url == null) {

@ -42,7 +42,7 @@ public final class AsciiBytes {
/** /**
* Create a new {@link AsciiBytes} from the specified String. * Create a new {@link AsciiBytes} from the specified String.
* @param string * @param string the source string
*/ */
public AsciiBytes(String string) { public AsciiBytes(String string) {
this(string.getBytes(UTF_8)); this(string.getBytes(UTF_8));
@ -52,7 +52,7 @@ public final class AsciiBytes {
/** /**
* Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes * Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes
* are not expected to change. * are not expected to change.
* @param bytes the bytes * @param bytes the source bytes
*/ */
public AsciiBytes(byte[] bytes) { public AsciiBytes(byte[] bytes) {
this(bytes, 0, bytes.length); this(bytes, 0, bytes.length);
@ -61,7 +61,7 @@ public final class AsciiBytes {
/** /**
* Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes * Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes
* are not expected to change. * are not expected to change.
* @param bytes the bytes * @param bytes the source bytes
* @param offset the offset * @param offset the offset
* @param length the length * @param length the length
*/ */

@ -119,7 +119,6 @@ import org.springframework.web.context.support.StandardServletEnvironment;
* generally recommended that a single {@code @Configuration} class is used to bootstrap * generally recommended that a single {@code @Configuration} class is used to bootstrap
* your application, however, any of the following sources can also be used: * your application, however, any of the following sources can also be used:
* *
* <p>
* <ul> * <ul>
* <li>{@link Class} - A Java class to be loaded by {@link AnnotatedBeanDefinitionReader}</li> * <li>{@link Class} - A Java class to be loaded by {@link AnnotatedBeanDefinitionReader}</li>
* *

@ -405,7 +405,7 @@ public class SpringApplicationBuilder {
/** /**
* Default properties for the environment. Multiple calls to this method are * Default properties for the environment. Multiple calls to this method are
* cumulative. * cumulative.
* @param defaults * @param defaults the default properties
* @return the current builder * @return the current builder
* @see SpringApplicationBuilder#properties(String...) * @see SpringApplicationBuilder#properties(String...)
*/ */

@ -68,7 +68,8 @@ public class ContextIdApplicationContextInitializer implements
} }
/** /**
* @param name * Create a new {@link ContextIdApplicationContextInitializer} instance.
* @param name the name of the application (can include placeholders)
*/ */
public ContextIdApplicationContextInitializer(String name) { public ContextIdApplicationContextInitializer(String name) {
this.name = name; this.name = name;
@ -91,7 +92,6 @@ public class ContextIdApplicationContextInitializer implements
private String getApplicationId(ConfigurableEnvironment environment) { private String getApplicationId(ConfigurableEnvironment environment) {
String name = environment.resolvePlaceholders(this.name); String name = environment.resolvePlaceholders(this.name);
String index = environment.resolvePlaceholders(INDEX_PATTERN); String index = environment.resolvePlaceholders(INDEX_PATTERN);
String profiles = StringUtils.arrayToCommaDelimitedString(environment String profiles = StringUtils.arrayToCommaDelimitedString(environment
.getActiveProfiles()); .getActiveProfiles());
if (StringUtils.hasText(profiles)) { if (StringUtils.hasText(profiles)) {

@ -114,28 +114,32 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
} }
/** /**
* @param propertySources * Set the property sources to bind.
* @param propertySources the property sources
*/ */
public void setPropertySources(PropertySources propertySources) { public void setPropertySources(PropertySources propertySources) {
this.propertySources = propertySources; this.propertySources = propertySources;
} }
/** /**
* @param validator the validator to set * Set the bean validator used to validate property fields.
* @param validator the validator
*/ */
public void setValidator(Validator validator) { public void setValidator(Validator validator) {
this.validator = validator; this.validator = validator;
} }
/** /**
* @param conversionService the conversionService to set * Set the conversion service used to convert property values.
* @param conversionService the conversion service
*/ */
public void setConversionService(ConversionService conversionService) { public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService; this.conversionService = conversionService;
} }
/** /**
* @param beans the bean meta data to set * Set the bean meta-data store.
* @param beans the bean meta data store
*/ */
public void setBeanMetaDataStore(ConfigurationBeanFactoryMetaData beans) { public void setBeanMetaDataStore(ConfigurationBeanFactoryMetaData beans) {
this.beans = beans; this.beans = beans;
@ -163,11 +167,9 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
if (this.propertySources == null) { if (this.propertySources == null) {
this.propertySources = deducePropertySources(); this.propertySources = deducePropertySources();
} }
if (this.validator == null) { if (this.validator == null) {
this.validator = getOptionalBean(VALIDATOR_BEAN_NAME, Validator.class); this.validator = getOptionalBean(VALIDATOR_BEAN_NAME, Validator.class);
if (this.validator == null && isJsr303Present()) { if (this.validator == null && isJsr303Present()) {
@ -176,7 +178,6 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
this.ownedValidator = true; this.ownedValidator = true;
} }
} }
if (this.conversionService == null) { if (this.conversionService == null) {
this.conversionService = getOptionalBean( this.conversionService = getOptionalBean(
ConfigurableApplicationContext.CONVERSION_SERVICE_BEAN_NAME, ConfigurableApplicationContext.CONVERSION_SERVICE_BEAN_NAME,

@ -42,6 +42,7 @@ public @interface EnableConfigurationProperties {
/** /**
* Convenient way to quickly register {@link ConfigurationProperties} beans with * Convenient way to quickly register {@link ConfigurationProperties} beans with
* Spring. Standard Spring Beans will also be scanned regardless of this value. * Spring. Standard Spring Beans will also be scanned regardless of this value.
* @return {@link ConfigurationProperties} beans to register
*/ */
Class<?>[] value() default {}; Class<?>[] value() default {};

@ -45,7 +45,7 @@ public interface PropertySourceLoader {
* used to load multi-document files (such as YAML). Simple property formats should * used to load multi-document files (such as YAML). Simple property formats should
* {@code null} when asked to load a profile. * {@code null} when asked to load a profile.
* @return a property source or {@code null} * @return a property source or {@code null}
* @throws IOException * @throws IOException if the source cannot be loaded
*/ */
PropertySource<?> load(String name, Resource resource, String profile) PropertySource<?> load(String name, Resource resource, String profile)
throws IOException; throws IOException;

@ -69,7 +69,7 @@ public class PropertySourcesLoader {
* Load the specified resource (if possible) and add it as the first source. * Load the specified resource (if possible) and add it as the first source.
* @param resource the source resource (may be {@code null}). * @param resource the source resource (may be {@code null}).
* @return the loaded property source or {@code null} * @return the loaded property source or {@code null}
* @throws IOException * @throws IOException if the source cannot be loaded
*/ */
public PropertySource<?> load(Resource resource) throws IOException { public PropertySource<?> load(Resource resource) throws IOException {
return load(resource, null); return load(resource, null);
@ -81,7 +81,7 @@ public class PropertySourcesLoader {
* @param resource the source resource (may be {@code null}). * @param resource the source resource (may be {@code null}).
* @param profile a specific profile to load or {@code null} to load the default. * @param profile a specific profile to load or {@code null} to load the default.
* @return the loaded property source or {@code null} * @return the loaded property source or {@code null}
* @throws IOException * @throws IOException if the source cannot be loaded
*/ */
public PropertySource<?> load(Resource resource, String profile) throws IOException { public PropertySource<?> load(Resource resource, String profile) throws IOException {
return load(resource, resource.getDescription(), profile); return load(resource, resource.getDescription(), profile);
@ -94,7 +94,7 @@ public class PropertySourcesLoader {
* @param name the root property name (may be {@code null}). * @param name the root property name (may be {@code null}).
* @param profile a specific profile to load or {@code null} to load the default. * @param profile a specific profile to load or {@code null} to load the default.
* @return the loaded property source or {@code null} * @return the loaded property source or {@code null}
* @throws IOException * @throws IOException if the source cannot be loaded
*/ */
public PropertySource<?> load(Resource resource, String name, String profile) public PropertySource<?> load(Resource resource, String name, String profile)
throws IOException { throws IOException {
@ -115,7 +115,7 @@ public class PropertySourcesLoader {
* @param name the root property name (may be {@code null}). * @param name the root property name (may be {@code null}).
* @param profile a specific profile to load or {@code null} to load the default. * @param profile a specific profile to load or {@code null} to load the default.
* @return the loaded property source or {@code null} * @return the loaded property source or {@code null}
* @throws IOException * @throws IOException if the source cannot be loaded
*/ */
public PropertySource<?> load(Resource resource, String group, String name, public PropertySource<?> load(Resource resource, String group, String name,
String profile) throws IOException { String profile) throws IOException {

@ -118,7 +118,7 @@ public class AtomikosProperties {
/** /**
* Specifies whether VM shutdown should trigger forced shutdown of the transaction * Specifies whether VM shutdown should trigger forced shutdown of the transaction
* core. Defaults to false. * core. Defaults to false.
* @param forceShutdownOnVmExit * @param forceShutdownOnVmExit if VM shutdown should be forced
*/ */
public void setForceShutdownOnVmExit(boolean forceShutdownOnVmExit) { public void setForceShutdownOnVmExit(boolean forceShutdownOnVmExit) {
set("force_shutdown_on_vm_exit", forceShutdownOnVmExit); set("force_shutdown_on_vm_exit", forceShutdownOnVmExit);

@ -53,16 +53,17 @@ public @interface EntityScan {
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation * Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
* declarations e.g.: {@code @EntityScan("org.my.pkg")} instead of * declarations e.g.: {@code @EntityScan("org.my.pkg")} instead of
* {@code @EntityScan(basePackages="org.my.pkg")}. * {@code @EntityScan(basePackages="org.my.pkg")}.
* @return the base packages to scan
*/ */
String[] value() default {}; String[] value() default {};
/** /**
* Base packages to scan for annotated entities. * Base packages to scan for annotated entities. {@link #value()} is an alias for (and
* <p> * mutually exclusive with) this attribute.
* {@link #value()} is an alias for (and mutually exclusive with) this attribute.
* <p> * <p>
* Use {@link #basePackageClasses()} for a type-safe alternative to String-based * Use {@link #basePackageClasses()} for a type-safe alternative to String-based
* package names. * package names.
* @return the base packages to scan
*/ */
String[] basePackages() default {}; String[] basePackages() default {};
@ -72,6 +73,7 @@ public @interface EntityScan {
* <p> * <p>
* Consider creating a special no-op marker class or interface in each package that * Consider creating a special no-op marker class or interface in each package that
* serves no purpose other than being referenced by this attribute. * serves no purpose other than being referenced by this attribute.
* @return classes form the base packages to scan
*/ */
Class<?>[] basePackageClasses() default {}; Class<?>[] basePackageClasses() default {};

@ -56,6 +56,7 @@ public @interface IntegrationTest {
/** /**
* Properties in form {@literal key=value} that should be added to the Spring * Properties in form {@literal key=value} that should be added to the Spring
* {@link Environment} before the test runs. * {@link Environment} before the test runs.
* @return the environment properties
*/ */
String[] value() default {}; String[] value() default {};

@ -45,31 +45,37 @@ public @interface SpringApplicationConfiguration {
/** /**
* @see ContextConfiguration#locations() * @see ContextConfiguration#locations()
* @return the context configuration locations
*/ */
String[] locations() default {}; String[] locations() default {};
/** /**
* @see ContextConfiguration#classes() * @see ContextConfiguration#classes()
* @return the context configuration classes
*/ */
Class<?>[] classes() default {}; Class<?>[] classes() default {};
/** /**
* @see ContextConfiguration#initializers() * @see ContextConfiguration#initializers()
* @return the context configuration initializers
*/ */
Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>[] initializers() default {}; Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>[] initializers() default {};
/** /**
* @see ContextConfiguration#inheritLocations() * @see ContextConfiguration#inheritLocations()
* @return if context locations should be inherited
*/ */
boolean inheritLocations() default true; boolean inheritLocations() default true;
/** /**
* @see ContextConfiguration#inheritInitializers() * @see ContextConfiguration#inheritInitializers()
* @return if context initializers should be inherited
*/ */
boolean inheritInitializers() default true; boolean inheritInitializers() default true;
/** /**
* @see ContextConfiguration#name() * @see ContextConfiguration#name()
* @return if context configuration name
*/ */
String name() default ""; String name() default "";

@ -49,6 +49,7 @@ public @interface WebIntegrationTest {
/** /**
* Properties in form {@literal key=value} that should be added to the Spring * Properties in form {@literal key=value} that should be added to the Spring
* {@link Environment} before the test runs. * {@link Environment} before the test runs.
* @return properties to add to the context
*/ */
String[] value() default {}; String[] value() default {};
@ -57,6 +58,7 @@ public @interface WebIntegrationTest {
* {@link Environment} property which usually triggers listening on a random port. * {@link Environment} property which usually triggers listening on a random port.
* Often used in conjunction with a <code>&#064;Value("${local.server.port}")</code> * Often used in conjunction with a <code>&#064;Value("${local.server.port}")</code>
* injected field on the test. * injected field on the test.
* @return if a random port should be used
*/ */
boolean randomPort() default false; boolean randomPort() default false;

Loading…
Cancel
Save