Fix javadoc errors and warnings

This commit is contained in:
Phillip Webb
2015-06-19 14:04:55 -07:00
parent 890554e8d6
commit f65dfe4bcb
26 changed files with 315 additions and 75 deletions

View File

@@ -60,7 +60,7 @@ public abstract class FileUtils {
* Generate a SHA.1 Hash for a given file.
* @param file the file to hash
* @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 {
try {

View File

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

View File

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

View File

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

View File

@@ -76,7 +76,7 @@ public abstract class MainClassFinder {
* Find the main class from a given folder.
* @param rootFolder the root folder to search
* @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 {
return doWithMainClasses(rootFolder, new ClassNameCallback<String>() {
@@ -91,7 +91,7 @@ public abstract class MainClassFinder {
* Find a single main class from a given folder.
* @param rootFolder the root folder to search
* @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 {
MainClassesCallback callback = new MainClassesCallback();
@@ -161,7 +161,7 @@ public abstract class MainClassFinder {
* @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes
* @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)
throws IOException {
@@ -179,7 +179,7 @@ public abstract class MainClassFinder {
* @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes
* @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)
throws IOException {

View File

@@ -90,7 +90,7 @@ public class Repackager {
/**
* Repackage the source file so that it can be run using '{@literal java -jar}'
* @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 {
repackage(this.source, libraries);
@@ -101,7 +101,7 @@ public class Repackager {
* {@literal java -jar}'
* @param destination the destination file (may be the same as the source)
* @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 {
repackage(destination, libraries, null);
@@ -113,7 +113,7 @@ public class Repackager {
* @param destination the destination file (may be the same as the source)
* @param libraries the libraries required to run the archive
* @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
*/
public void repackage(File destination, Libraries libraries, LaunchScript launchScript)