Skip to content

Commit

Permalink
CQI Fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
nfalco79 committed Aug 2, 2020
1 parent d0e2e93 commit c590abe
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,20 +581,20 @@ 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();
t.printStackTrace(new PrintWriter(s));
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");
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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<Void, Exception> optOutTask = new StatsOptOutTask(androidSdkHome, listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/hudson/plugins/android_emulator/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -378,6 +379,7 @@ private static List<String> 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) {
Expand Down Expand Up @@ -714,7 +716,7 @@ public static String getRelativePath(String from, String to) {

/**
* Determines the number of steps required to get between two paths.
* <p/>
* <p>
* e.g. To get from "/foo/bar/baz" to "/foo/blah" requires making three steps:
* <ul>
* <li>"/foo/bar"</li>
Expand Down Expand Up @@ -822,8 +824,8 @@ public static String getPatternWithHighestSuffixedVersionNumberInMultiLineInput(
*
* @param strVersionA version number to compare against {@code strVersionB}
* @param strVersionB version number to compare against {@code strVersionA}
* @param partsToCompare if > 0 then the number of parts for that version number are compared,
* if <= 0 the complete version number is compared
* @param partsToCompare if &gt; 0 then the number of parts for that version number are compared,
* if &lt;= 0 the complete version number is compared
* @return {@code true} if the versions number (or if requested parts of the version numbers) are identical,
* {@code false} otherwise
*/
Expand Down

0 comments on commit c590abe

Please sign in to comment.