diff --git a/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java b/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java index 68877964..ca0fd0ad 100644 --- a/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java +++ b/src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java @@ -581,12 +581,12 @@ public boolean tearDown(AbstractBuild build, BuildListener listener) }; } - /** Helper method for writing to the build log in a consistent manner. */ + /* Helper method for writing to the build log in a consistent manner. */ public synchronized static void log(final PrintStream logger, final String message) { log(logger, message, false); } - /** Helper method for writing to the build log in a consistent manner. */ + /* Helper method for writing to the build log in a consistent manner. */ public synchronized static void log(final PrintStream logger, final String message, final Throwable t) { log(logger, message, false); StringWriter s = new StringWriter(); @@ -594,7 +594,7 @@ public synchronized static void log(final PrintStream logger, final String messa log(logger, s.toString(), false); } - /** Helper method for writing to the build log in a consistent manner. */ + /* Helper method for writing to the build log in a consistent manner. */ public synchronized static void log(final PrintStream logger, String message, boolean indent) { if (indent) { message = '\t' + message.replace("\n", "\n\t"); @@ -917,32 +917,32 @@ public boolean isApplicable(AbstractProject item) { return true; } - /** Used in config.jelly: Lists the OS versions available. */ + /* Used in config.jelly: Lists the OS versions available. */ public String[] getAndroidVersions() { return AndroidPlatform.getAllPossibleVersionNames(); } - /** Used in config.jelly: Lists the screen densities available. */ + /* Used in config.jelly: Lists the screen densities available. */ public ScreenDensity[] getDeviceDensities() { return ScreenDensity.values(); } - /** Used in config.jelly: Lists the screen resolutions available. */ + /* Used in config.jelly: Lists the screen resolutions available. */ public ScreenResolution[] getDeviceResolutions() { return ScreenResolution.values(); } - /** Used in config.jelly: Lists the locales available. */ + /* Used in config.jelly: Lists the locales available. */ public String[] getEmulatorLocales() { return Constants.EMULATOR_LOCALES; } - /** Used in config.jelly: Lists common hardware properties that can be set. */ + /* Used in config.jelly: Lists common hardware properties that can be set. */ public String[] getHardwareProperties() { return Constants.HARDWARE_PROPERTIES; } - /** Used in config.jelly: Lists common ABIs that can be set. */ + /* Used in config.jelly: Lists common ABIs that can be set. */ public String[] getTargetAbis() { return Constants.TARGET_ABIS; } diff --git a/src/main/java/hudson/plugins/android_emulator/SdkInstaller.java b/src/main/java/hudson/plugins/android_emulator/SdkInstaller.java index 2220e470..ce35948b 100644 --- a/src/main/java/hudson/plugins/android_emulator/SdkInstaller.java +++ b/src/main/java/hudson/plugins/android_emulator/SdkInstaller.java @@ -60,6 +60,9 @@ public class SdkInstaller { /** * Downloads and installs the Android SDK on the machine we're executing on. * + * @param launcher + * @param listener + * @param androidSdkHome * @return An {@code AndroidSdk} object for the newly-installed SDK. */ public static AndroidSdk install(Launcher launcher, BuildListener listener, String androidSdkHome) @@ -271,6 +274,8 @@ static void installDependencies(PrintStream logger, Launcher launcher, * @param platform Specifies the platform to be installed. * @param abi Specifies the ABI to be installed; may be {@code null}. * @param skipSystemImageInstall Specifies that the system image does not need to be installed (useful for named emulator) + * @throws IOException + * @throws InterruptedException */ public static void installPlatform(PrintStream logger, Launcher launcher, AndroidSdk sdk, String platform, String abi, final boolean skipSystemImageInstall) throws IOException, InterruptedException { @@ -419,6 +424,7 @@ private static String getPlatformFromExistingEmulator(Launcher launcher, * * @param launcher Used for running tasks on the remote node. * @param listener Used to access logger. + * @param androidSdkHome */ public static void optOutOfSdkStatistics(Launcher launcher, BuildListener listener, String androidSdkHome) { Callable optOutTask = new StatsOptOutTask(androidSdkHome, listener); diff --git a/src/main/java/hudson/plugins/android_emulator/builder/AbstractBuilder.java b/src/main/java/hudson/plugins/android_emulator/builder/AbstractBuilder.java index 855d5cd6..76da89e2 100644 --- a/src/main/java/hudson/plugins/android_emulator/builder/AbstractBuilder.java +++ b/src/main/java/hudson/plugins/android_emulator/builder/AbstractBuilder.java @@ -48,6 +48,8 @@ public abstract class AbstractBuilder extends Builder { * @param launcher The launcher for the remote node. * @param listener The listener used to get the environment variables. * @return An Android SDK instance, or {@code null} if none could be found or installed. + * @throws IOException + * @throws InterruptedException */ protected static AndroidSdk getAndroidSdk(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { @@ -184,6 +186,10 @@ private static String expandVariable(AbstractBuild build, BuildListener li /** * Waits for the "android.process.acore" process to start, as this is a prerequisite for using the package manager. * + * @param build + * @param launcher + * @param androidSdk + * @param deviceIdentifier * @return {@code true} if the process has started; {@code false} if it did not start within a reasonable timeout. */ @SuppressFBWarnings("DM_DEFAULT_ENCODING") diff --git a/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java b/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java index f72ef341..1447e561 100644 --- a/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java +++ b/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java @@ -41,15 +41,15 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListen return Utils.sendEmulatorCommand(launcher, logger, port, command, getCommandTimeout()); } - /** Retrieves the time in which the snapshot command should complete, in milliseconds. */ + /* Retrieves the time in which the snapshot command should complete, in milliseconds. */ protected int getCommandTimeout() { return DEFAULT_TIMEOUT_MS; } - /** Retrieves the snapshot action to execute (i.e. "load" or "save"). */ + /* Retrieves the snapshot action to execute (i.e. "load" or "save"). */ protected abstract String getSnapshotAction(); - /** Retrieves the log message to print when performing the snapshot action. */ + /* Retrieves the log message to print when performing the snapshot action. */ protected abstract String getLogMessage(String snapshotName, int avdPort); } diff --git a/src/main/java/hudson/plugins/android_emulator/util/StdoutReader.java b/src/main/java/hudson/plugins/android_emulator/util/StdoutReader.java index ced18880..1508cd75 100644 --- a/src/main/java/hudson/plugins/android_emulator/util/StdoutReader.java +++ b/src/main/java/hudson/plugins/android_emulator/util/StdoutReader.java @@ -42,9 +42,11 @@ private StdoutReader(final InputStream inputStream) { } /** - * Creates a new StdoutReader starting to read the data - * immediately of the given InputStream in an own thread. + * Creates a new StdoutReader starting to read the data immediately of the + * given InputStream in an own thread. + * * @param inputStream InputStream to read the data from + * @return a reader for the given input stream */ public static StdoutReader createAndRunAsyncReader(final InputStream inputStream) { final StdoutReader instance = new StdoutReader(inputStream); diff --git a/src/main/java/hudson/plugins/android_emulator/util/Utils.java b/src/main/java/hudson/plugins/android_emulator/util/Utils.java index 61e4ecfb..d49c4d8d 100644 --- a/src/main/java/hudson/plugins/android_emulator/util/Utils.java +++ b/src/main/java/hudson/plugins/android_emulator/util/Utils.java @@ -296,6 +296,7 @@ public static ValidationResult validateAndroidHome(final File sdkRoot, final boo /** * Locates the Android SDK home directory using the same scheme as the Android SDK does. * + * @param androidSdkHome * @return A {@link File} representing the directory in which the ".android" subdirectory should go. */ public static File getAndroidSdkHomeDirectory(String androidSdkHome) { @@ -378,6 +379,7 @@ private static List getPossibleSdkRootDirectoriesFromPath(final EnvVars /** * Retrieves the path at which the Android SDK should be installed on the current node. * + * @param node * @return Path within the tools folder where the SDK should live. */ public static final FilePath getSdkInstallDirectory(Node node) { @@ -714,7 +716,7 @@ public static String getRelativePath(String from, String to) { /** * Determines the number of steps required to get between two paths. - *

+ *

* e.g. To get from "/foo/bar/baz" to "/foo/blah" requires making three steps: *