diff options
author | Julien Desprez <jdesprez@google.com> | 2016-07-05 08:15:45 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-07-05 08:15:45 +0000 |
commit | 8f9195f188896ceba98a4c6ed15a5665236db771 (patch) | |
tree | e8cc1b552de74958b7739d7ec9742277828635aa | |
parent | 7288f8b951d1ea1b7a7ff00d261d3ac4f1053b1b (diff) | |
parent | af9792b7f54ec0d15bb5b4da6536ace14e558b70 (diff) | |
download | tradefederation-8f9195f188896ceba98a4c6ed15a5665236db771.tar.gz |
Merge "Fix project warnings for easier readability"
44 files changed, 66 insertions, 77 deletions
diff --git a/src/com/android/tradefed/build/AppBuildInfo.java b/src/com/android/tradefed/build/AppBuildInfo.java index f084eba84..e4cbb003f 100644 --- a/src/com/android/tradefed/build/AppBuildInfo.java +++ b/src/com/android/tradefed/build/AppBuildInfo.java @@ -42,7 +42,7 @@ public class AppBuildInfo extends BuildInfo implements IAppBuildInfo { } /** - * @see {@link BuildInfo#BuildInfo(BuildInfo)} + * @see BuildInfo#BuildInfo(BuildInfo) */ public AppBuildInfo(BuildInfo buildToCopy) { super(buildToCopy); diff --git a/src/com/android/tradefed/build/DeviceBuildDescriptor.java b/src/com/android/tradefed/build/DeviceBuildDescriptor.java index 426259197..880e54682 100644 --- a/src/com/android/tradefed/build/DeviceBuildDescriptor.java +++ b/src/com/android/tradefed/build/DeviceBuildDescriptor.java @@ -43,7 +43,7 @@ public class DeviceBuildDescriptor { * Determines if given {@link IBuildInfo} contains device build metadata * * @param build - * @return + * @return True if the {@link IBuildInfo} contains the device build metadata, false otherwise */ public static boolean describesDeviceBuild(IBuildInfo build) { return build.getBuildAttributes().containsKey(DEVICE_BUILD_ID); @@ -113,7 +113,7 @@ public class DeviceBuildDescriptor { * Google Galaxy Nexus 4.2 * * @param device - * @return + * @return The device description string * @throws DeviceNotAvailableException */ public static String generateDeviceDesc(ITestDevice device) diff --git a/src/com/android/tradefed/build/FileDownloadCacheFactory.java b/src/com/android/tradefed/build/FileDownloadCacheFactory.java index b4ddd16d6..20c908a77 100644 --- a/src/com/android/tradefed/build/FileDownloadCacheFactory.java +++ b/src/com/android/tradefed/build/FileDownloadCacheFactory.java @@ -36,7 +36,6 @@ public class FileDownloadCacheFactory { /** * Get the singleton instance of FileDownloadCacheFactory - * @return */ public static FileDownloadCacheFactory getInstance() { return SingletonHolder.INSTANCE; diff --git a/src/com/android/tradefed/build/FolderBuildInfo.java b/src/com/android/tradefed/build/FolderBuildInfo.java index b213e771f..652579922 100644 --- a/src/com/android/tradefed/build/FolderBuildInfo.java +++ b/src/com/android/tradefed/build/FolderBuildInfo.java @@ -29,14 +29,14 @@ public class FolderBuildInfo extends BuildInfo implements IFolderBuildInfo { private File mRootDir; /** - * @see {@link BuildInfo#BuildInfo(String, String, String)} + * @see BuildInfo#BuildInfo(String, String, String) */ public FolderBuildInfo(String buildId, String testTarget, String buildName) { super(buildId, testTarget, buildName); } /** - * @see {@link BuildInfo#BuildInfo(BuildInfo)} + * @see BuildInfo#BuildInfo(BuildInfo) */ FolderBuildInfo(BuildInfo buildToCopy) { super(buildToCopy); diff --git a/src/com/android/tradefed/build/LocalSdkBuildProvider.java b/src/com/android/tradefed/build/LocalSdkBuildProvider.java index 5a0e6dc19..1aa5aca11 100644 --- a/src/com/android/tradefed/build/LocalSdkBuildProvider.java +++ b/src/com/android/tradefed/build/LocalSdkBuildProvider.java @@ -88,7 +88,7 @@ public class LocalSdkBuildProvider implements IBuildProvider { * <i> * ${ANDROID_BUILD_TOP}/out/host/{os.name}-x86/sdk/android-sdk_eng.{user.name}_{os.name}-x86 * </i> - * @return + * @return the {@link File} to the output sdk location. */ private File getSdkFromBuildEnv() { String buildRoot = System.getenv("ANDROID_BUILD_TOP"); diff --git a/src/com/android/tradefed/build/SdkFolderBuildInfo.java b/src/com/android/tradefed/build/SdkFolderBuildInfo.java index ebed43b72..ac1e5e01b 100644 --- a/src/com/android/tradefed/build/SdkFolderBuildInfo.java +++ b/src/com/android/tradefed/build/SdkFolderBuildInfo.java @@ -35,6 +35,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol public SdkFolderBuildInfo() { } + @Override public void cleanUp() { if (mSdkBuild != null) { mSdkBuild.cleanUp(); @@ -44,6 +45,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol } } + @Override public File getRootDir() { if (mFolderBuild != null) { return mFolderBuild.getRootDir(); @@ -51,12 +53,14 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public void setRootDir(File rootDir) { if (mFolderBuild != null) { mFolderBuild.setRootDir(rootDir); } } + @Override public File getSdkDir() { if (mSdkBuild != null) { return mSdkBuild.getSdkDir(); @@ -64,6 +68,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public File getTestsDir() { if (mSdkBuild != null) { return mSdkBuild.getTestsDir(); @@ -71,24 +76,28 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public void setTestsDir(File testsDir) { if (mSdkBuild != null) { mSdkBuild.setTestsDir(testsDir); } } + @Override public void setSdkDir(File sdkDir) { if (mSdkBuild != null) { mSdkBuild.setSdkDir(sdkDir); } } + @Override public void setSdkDir(File sdkDir, boolean deleteParent) { if (mSdkBuild != null) { mSdkBuild.setSdkDir(sdkDir, deleteParent); } } + @Override public String getAndroidToolPath() { if (mSdkBuild != null) { return mSdkBuild.getAndroidToolPath(); @@ -96,6 +105,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public String getEmulatorToolPath() { if (mSdkBuild != null) { return mSdkBuild.getEmulatorToolPath(); @@ -103,6 +113,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public String[] getSdkTargets() { if (mSdkBuild != null) { return mSdkBuild.getSdkTargets(); @@ -110,6 +121,7 @@ public class SdkFolderBuildInfo extends BuildInfo implements ISdkBuildInfo, IFol return null; } + @Override public void makeToolsExecutable() { if (mSdkBuild != null) { mSdkBuild.makeToolsExecutable(); diff --git a/src/com/android/tradefed/command/CommandFileParser.java b/src/com/android/tradefed/command/CommandFileParser.java index b1edc4592..6d8ed863f 100644 --- a/src/com/android/tradefed/command/CommandFileParser.java +++ b/src/com/android/tradefed/command/CommandFileParser.java @@ -229,7 +229,7 @@ public class CommandFileParser { * Checks if a line should be parsed or ignored. Basically, ignore if the line is commented * or is empty. * - * @param line A {@see String} containing the line of input to check + * @param line A {@link String} containing the line of input to check * @return {@code true} if we should parse the line, {@code false} if we should ignore it. */ private static boolean shouldParseLine(String line) { diff --git a/src/com/android/tradefed/command/FatalHostError.java b/src/com/android/tradefed/command/FatalHostError.java index 5600e4672..2d42c3607 100644 --- a/src/com/android/tradefed/command/FatalHostError.java +++ b/src/com/android/tradefed/command/FatalHostError.java @@ -28,7 +28,7 @@ public class FatalHostError extends RuntimeException { * @param msg the detailed message * @param cause the original cause of the fatal host error. * - * @see {@link RuntimeException#RuntimeException(String, Throwable)} + * @see RuntimeException#RuntimeException(String, Throwable) */ public FatalHostError(String msg, Throwable cause) { super(msg, cause); @@ -39,7 +39,7 @@ public class FatalHostError extends RuntimeException { * * @param msg the detailed message * - * @see {@link RuntimeException#RuntimeException(String)} + * @see RuntimeException#RuntimeException(String) */ public FatalHostError(String msg) { super(msg); diff --git a/src/com/android/tradefed/command/Verify.java b/src/com/android/tradefed/command/Verify.java index a87861c58..b72e8c0c0 100644 --- a/src/com/android/tradefed/command/Verify.java +++ b/src/com/android/tradefed/command/Verify.java @@ -19,7 +19,6 @@ package com.android.tradefed.command; import com.android.tradefed.config.ArgsOptionParser; import com.android.tradefed.config.ConfigurationException; import com.android.tradefed.config.Option; -import com.android.tradefed.log.LogUtil.CLog; import java.io.File; import java.io.IOException; @@ -57,8 +56,7 @@ public class Verify { /** * Program main entrypoint */ - public static void main(final String[] mainArgs) throws InterruptedException, - ConfigurationException { + public static void main(final String[] mainArgs) throws ConfigurationException { try { Verify verify = new Verify(); ArgsOptionParser optionSetter = new ArgsOptionParser(verify); diff --git a/src/com/android/tradefed/command/remote/DeviceTracker.java b/src/com/android/tradefed/command/remote/DeviceTracker.java index 23ae19fa4..32995a06a 100644 --- a/src/com/android/tradefed/command/remote/DeviceTracker.java +++ b/src/com/android/tradefed/command/remote/DeviceTracker.java @@ -30,7 +30,8 @@ class DeviceTracker { /** * Use on demand holder idiom - * @see http://en.wikipedia.org/wiki/Singleton_pattern#The_solution_of_Bill_Pugh + * @see <a href="http://en.wikipedia.org/wiki/Singleton_pattern#The_solution_of_Bill_Pugh"> + * http://en.wikipedia.org/wiki/Singleton_pattern#The_solution_of_Bill_Pugh</a> */ private static class SingletonHolder { public static final DeviceTracker cInstance = new DeviceTracker(); diff --git a/src/com/android/tradefed/command/remote/ExecCommandTracker.java b/src/com/android/tradefed/command/remote/ExecCommandTracker.java index 20c524af2..c7a2a2c3e 100644 --- a/src/com/android/tradefed/command/remote/ExecCommandTracker.java +++ b/src/com/android/tradefed/command/remote/ExecCommandTracker.java @@ -61,7 +61,6 @@ class ExecCommandTracker extends StubTestInvocationListener implements /** * Returns the current state as a {@link CommandResult}. - * @return */ CommandResult getCommandResult() { return new CommandResult(mStatus, mErrorDetails, mState, diff --git a/src/com/android/tradefed/command/remote/RemoteManager.java b/src/com/android/tradefed/command/remote/RemoteManager.java index 1f94d1bcb..d03a05f17 100644 --- a/src/com/android/tradefed/command/remote/RemoteManager.java +++ b/src/com/android/tradefed/command/remote/RemoteManager.java @@ -185,7 +185,7 @@ public class RemoteManager extends Thread { * necessary. * <p/> * {@link #start()} should be called before this method. - * @return + * @return the port the remote manager is listening on, or -1 if no port is setup. */ public synchronized int getPort() { if (mServerSocket == null) { diff --git a/src/com/android/tradefed/device/DeviceSelectionOptions.java b/src/com/android/tradefed/device/DeviceSelectionOptions.java index 49ddd8616..8da740bdb 100644 --- a/src/com/android/tradefed/device/DeviceSelectionOptions.java +++ b/src/com/android/tradefed/device/DeviceSelectionOptions.java @@ -479,7 +479,7 @@ public class DeviceSelectionOptions implements IDeviceSelection { /** * Get the device's supported API level or -1 if it cannot be retrieved * @param device - * @return + * @return the device's supported API level. */ private int getDeviceSdkLevel(IDevice device) { int apiLevel = -1; diff --git a/src/com/android/tradefed/device/IDeviceManager.java b/src/com/android/tradefed/device/IDeviceManager.java index 0665f97da..98d027196 100644 --- a/src/com/android/tradefed/device/IDeviceManager.java +++ b/src/com/android/tradefed/device/IDeviceManager.java @@ -83,7 +83,7 @@ public interface IDeviceManager { * Attempts to return a device that hasn't been previously allocated will be ignored. * * @param device the {@link ITestDevice} to free - * @param state the {@link IDeviceManager.FreeDeviceState}. Used to control if device is + * @param state the {@link FreeDeviceState}. Used to control if device is * returned to available device pool. */ public void freeDevice(ITestDevice device, FreeDeviceState state); diff --git a/src/com/android/tradefed/log/ConsoleReaderOutputStream.java b/src/com/android/tradefed/log/ConsoleReaderOutputStream.java index 5e5fd52ec..08e0953a7 100644 --- a/src/com/android/tradefed/log/ConsoleReaderOutputStream.java +++ b/src/com/android/tradefed/log/ConsoleReaderOutputStream.java @@ -41,8 +41,8 @@ public class ConsoleReaderOutputStream extends OutputStream { * Otherwise, we try to shuffle the prompt when none is displayed, and we end up clearing lines * that shouldn't be cleared. * - * @see setSyncMode() - * @see setAsyncMode() + * @see #setSyncMode() + * @see #setAsyncMode() */ private boolean mInAsyncMode = false; diff --git a/src/com/android/tradefed/log/ITerribleFailureHandler.java b/src/com/android/tradefed/log/ITerribleFailureHandler.java index 2510fd3cc..0a486795f 100644 --- a/src/com/android/tradefed/log/ITerribleFailureHandler.java +++ b/src/com/android/tradefed/log/ITerribleFailureHandler.java @@ -20,7 +20,7 @@ package com.android.tradefed.log; * An interface to handle terrible failures from * {@link com.android.tradefed.log.LogUtil.CLog#wtf(String, Throwable)} * <br> - * @see {@link TerribleFailureEmailHandler} for an example. + * @see TerribleFailureEmailHandler */ public interface ITerribleFailureHandler { diff --git a/src/com/android/tradefed/log/LogUtil.java b/src/com/android/tradefed/log/LogUtil.java index cf9429cc0..77b308b3b 100644 --- a/src/com/android/tradefed/log/LogUtil.java +++ b/src/com/android/tradefed/log/LogUtil.java @@ -53,7 +53,7 @@ public class LogUtil { * is specifically useful because it includes the day and month (to differentiate times for * long-running TF instances), and also uses 24-hour time to disambiguate morning from evening. * <p/> - * {@see Log#getLogFormatString()} + * @see Log#getLogFormatString(LogLevel, String, String) */ public static String getLogFormatString(LogLevel logLevel, String tag, String message) { SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm:ss"); diff --git a/src/com/android/tradefed/log/TerribleFailureEmailHandler.java b/src/com/android/tradefed/log/TerribleFailureEmailHandler.java index c89bc9493..b24a9ff95 100644 --- a/src/com/android/tradefed/log/TerribleFailureEmailHandler.java +++ b/src/com/android/tradefed/log/TerribleFailureEmailHandler.java @@ -149,8 +149,7 @@ public class TerribleFailureEmailHandler implements ITerribleFailureHandler { } /** - * A method to generate the body for WTF email reports. Will not be called - * if {@link #shouldSendMessage()} returns {@code false}. + * A method to generate the body for WTF email reports. * * @param message summary of the terrible failure * @param cause throwable containing stack trace information diff --git a/src/com/android/tradefed/targetprep/AltDirBehavior.java b/src/com/android/tradefed/targetprep/AltDirBehavior.java index f5e5cadcb..564f5784b 100644 --- a/src/com/android/tradefed/targetprep/AltDirBehavior.java +++ b/src/com/android/tradefed/targetprep/AltDirBehavior.java @@ -19,7 +19,8 @@ package com.android.tradefed.targetprep; /** * An enum to define alternative directory behaviors for various test artifact installers/pushers * <p> - * @see {@link TestAppInstallSetup}, {@link TestFilePushSetup} + * @see TestAppInstallSetup + * @see TestFilePushSetup */ public enum AltDirBehavior { /** diff --git a/src/com/android/tradefed/targetprep/DefaultTestsZipInstaller.java b/src/com/android/tradefed/targetprep/DefaultTestsZipInstaller.java index c79dc3df3..96b4f1516 100644 --- a/src/com/android/tradefed/targetprep/DefaultTestsZipInstaller.java +++ b/src/com/android/tradefed/targetprep/DefaultTestsZipInstaller.java @@ -152,7 +152,7 @@ public class DefaultTestsZipInstaller implements ITestsZipInstaller { /** * Deletes userdata from device without toggling {@link RecoveryMode}. * <p/> - * Expects callers to have set device to {@link RecoveryMode.ONLINE}. + * Expects callers to have set device to {@link RecoveryMode#ONLINE}. */ private void doDeleteData(ITestDevice device) throws DeviceNotAvailableException, TargetSetupError { diff --git a/src/com/android/tradefed/targetprep/FlashingResourcesParser.java b/src/com/android/tradefed/targetprep/FlashingResourcesParser.java index 2e07c3834..0655959f3 100644 --- a/src/com/android/tradefed/targetprep/FlashingResourcesParser.java +++ b/src/com/android/tradefed/targetprep/FlashingResourcesParser.java @@ -116,7 +116,7 @@ public class FlashingResourcesParser implements IFlashingResourcesParser { * disable filtering. */ public FlashingResourcesParser(BufferedReader infoReader, Map<String, Constraint> c) - throws TargetSetupError, IOException { + throws IOException { mReqs = parseAndroidInfo(infoReader, c); } @@ -128,8 +128,7 @@ public class FlashingResourcesParser implements IFlashingResourcesParser { * @param infoReader a {@link BufferedReader} containing the equivalent of android-info.txt to * parse */ - public FlashingResourcesParser(BufferedReader infoReader) throws TargetSetupError, - IOException { + public FlashingResourcesParser(BufferedReader infoReader) throws IOException { this(infoReader, null); } diff --git a/src/com/android/tradefed/targetprep/NativeLeakCollector.java b/src/com/android/tradefed/targetprep/NativeLeakCollector.java index 1298c6aab..9bc2e4e8d 100644 --- a/src/com/android/tradefed/targetprep/NativeLeakCollector.java +++ b/src/com/android/tradefed/targetprep/NativeLeakCollector.java @@ -26,12 +26,11 @@ import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.result.ByteArrayInputStreamSource; import com.android.tradefed.result.ITestLoggerReceiver; import com.android.tradefed.result.LogDataType; -import com.android.tradefed.util.RunUtil; import com.android.tradefed.util.StreamUtil; import java.util.ArrayList; -import java.util.concurrent.TimeUnit; import java.util.List; +import java.util.concurrent.TimeUnit; /** * A {@link ITargetCleaner} that runs 'dumpsys meminfo --unreachable -a' to identify the unreachable diff --git a/src/com/android/tradefed/targetprep/companion/CompanionAllocator.java b/src/com/android/tradefed/targetprep/companion/CompanionAllocator.java index 5d1a0cbde..e70e0cd29 100644 --- a/src/com/android/tradefed/targetprep/companion/CompanionAllocator.java +++ b/src/com/android/tradefed/targetprep/companion/CompanionAllocator.java @@ -52,8 +52,7 @@ public abstract class CompanionAllocator implements ITargetCleaner { } /** - * Describe the selection options for the companion device - * @return + * Describe the {@link DeviceSelectionOptions} for the companion device */ protected abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions(); diff --git a/src/com/android/tradefed/targetprep/companion/CompanionAwarePreparer.java b/src/com/android/tradefed/targetprep/companion/CompanionAwarePreparer.java index 2b434df77..451071086 100644 --- a/src/com/android/tradefed/targetprep/companion/CompanionAwarePreparer.java +++ b/src/com/android/tradefed/targetprep/companion/CompanionAwarePreparer.java @@ -33,7 +33,7 @@ public abstract class CompanionAwarePreparer implements ITargetPreparer { * Retrieves the {@link ITestDevice} instance of companion device allocated for the primary * {@link ITestDevice} * @param primary - * @return + * @return the {@link ITestDevice} instance of companion device allocated * @throws TargetSetupError if no companion device has been allocated for the primary device */ protected ITestDevice getCompanion(ITestDevice primary) throws TargetSetupError { diff --git a/src/com/android/tradefed/targetprep/companion/CompanionDeviceTracker.java b/src/com/android/tradefed/targetprep/companion/CompanionDeviceTracker.java index 0d9b69053..2edd1f55e 100644 --- a/src/com/android/tradefed/targetprep/companion/CompanionDeviceTracker.java +++ b/src/com/android/tradefed/targetprep/companion/CompanionDeviceTracker.java @@ -43,7 +43,6 @@ public class CompanionDeviceTracker { /** * Retrieves singleton instance of the tracker - * @return */ public static CompanionDeviceTracker getInstance() { if (sInst == null) { @@ -57,7 +56,6 @@ public class CompanionDeviceTracker { * * @param device the primary device. used to identify the companion device * @param opt selection criteria - * @param timeout time to wait before giving up on allocation * @return the device allocated or <code>null</code> if none available */ public ITestDevice allocateCompanionDevice(ITestDevice device, DeviceSelectionOptions opt) { diff --git a/src/com/android/tradefed/testtype/CodeCoverageTest.java b/src/com/android/tradefed/testtype/CodeCoverageTest.java index 6547b917a..48f723818 100644 --- a/src/com/android/tradefed/testtype/CodeCoverageTest.java +++ b/src/com/android/tradefed/testtype/CodeCoverageTest.java @@ -99,9 +99,7 @@ public class CodeCoverageTest extends InstrumentationTest { } /** - * Fetch the runtime coverage file path from instrumentation test metrics. - * - * @return + * Returns the runtime coverage file path from instrumentation test metrics. */ private String fetchCoverageFilePath(CollectingTestListener listener) { TestRunResult runResult = listener.getCurrentRunResults(); diff --git a/src/com/android/tradefed/testtype/InstalledInstrumentationsTest.java b/src/com/android/tradefed/testtype/InstalledInstrumentationsTest.java index cf4d07023..c1bfc96d1 100644 --- a/src/com/android/tradefed/testtype/InstalledInstrumentationsTest.java +++ b/src/com/android/tradefed/testtype/InstalledInstrumentationsTest.java @@ -15,8 +15,6 @@ */ package com.android.tradefed.testtype; -import com.android.ddmlib.IShellOutputReceiver; -import com.android.ddmlib.MultiLineReceiver; import com.android.tradefed.config.ConfigurationException; import com.android.tradefed.config.Option; import com.android.tradefed.config.Option.Importance; @@ -38,8 +36,6 @@ import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /** * Runs all instrumentation found on current device. @@ -50,8 +46,6 @@ public class InstalledInstrumentationsTest implements IDeviceTest, IResumableTes /** the metric key name for the test coverage target value */ // TODO: move this to a more generic location public static final String COVERAGE_TARGET_KEY = XmlDefsTest.COVERAGE_TARGET_KEY; - private static final Pattern LIST_INSTR_PATTERN = - Pattern.compile("instrumentation:(.+)/(.+) \\(target=(.+)\\)"); private ITestDevice mDevice; diff --git a/src/com/android/tradefed/testtype/NativeBenchmarkTest.java b/src/com/android/tradefed/testtype/NativeBenchmarkTest.java index 5e42ad2a6..ba5bbff2f 100644 --- a/src/com/android/tradefed/testtype/NativeBenchmarkTest.java +++ b/src/com/android/tradefed/testtype/NativeBenchmarkTest.java @@ -123,7 +123,7 @@ public class NativeBenchmarkTest implements IDeviceTest, IRemoteTest { * * @return the name of the native test module to run, or null if not set */ - public String getModuleName(String moduleName) { + public String getModuleName() { return mTestModule; } diff --git a/src/com/android/tradefed/testtype/NativeBenchmarkTestParser.java b/src/com/android/tradefed/testtype/NativeBenchmarkTestParser.java index 3109044e0..9593c6e3d 100644 --- a/src/com/android/tradefed/testtype/NativeBenchmarkTestParser.java +++ b/src/com/android/tradefed/testtype/NativeBenchmarkTestParser.java @@ -108,7 +108,7 @@ public class NativeBenchmarkTestParser extends MultiLineReceiver { } /** - * @return + * @return The name of the Test Run. */ public String getRunName() { return mTestRunName; diff --git a/src/com/android/tradefed/testtype/NativeStressTest.java b/src/com/android/tradefed/testtype/NativeStressTest.java index 9bf1832e2..6373c41d3 100644 --- a/src/com/android/tradefed/testtype/NativeStressTest.java +++ b/src/com/android/tradefed/testtype/NativeStressTest.java @@ -104,7 +104,7 @@ public class NativeStressTest implements IDeviceTest, IRemoteTest { * * @return the name of the native test module to run, or null if not set */ - public String getModuleName(String moduleName) { + public String getModuleName() { return mTestModule; } diff --git a/src/com/android/tradefed/testtype/NativeStressTestParser.java b/src/com/android/tradefed/testtype/NativeStressTestParser.java index 4f5337982..a056012af 100644 --- a/src/com/android/tradefed/testtype/NativeStressTestParser.java +++ b/src/com/android/tradefed/testtype/NativeStressTestParser.java @@ -94,7 +94,7 @@ public class NativeStressTestParser extends MultiLineReceiver { } /** - * @return + * @return the name of the test run. */ public String getRunName() { return mTestRunName; diff --git a/src/com/android/tradefed/util/AbiFormatter.java b/src/com/android/tradefed/util/AbiFormatter.java index 09e1bcfb8..da3f8e1db 100644 --- a/src/com/android/tradefed/util/AbiFormatter.java +++ b/src/com/android/tradefed/util/AbiFormatter.java @@ -34,7 +34,7 @@ public class AbiFormatter { /** * Special marker to be used as a placeholder in strings, that can be then - * replaced with the help of {@link formatCmdForAbi}. + * replaced with the help of {@link #formatCmdForAbi}. */ static final String ABI_REGEX = "\\|#ABI(\\d*)#\\|"; @@ -87,7 +87,7 @@ public class AbiFormatter { /** * Helper method to get the list of supported abis for the given bitness * @param device - * @param bitness, 32 or 64 + * @param bitness 32 or 64 * @return the supported abi list of that bitness * @throws DeviceNotAvailableException */ diff --git a/src/com/android/tradefed/util/CircularAtraceUtil.java b/src/com/android/tradefed/util/CircularAtraceUtil.java index e06ea49ac..ad4f288c3 100644 --- a/src/com/android/tradefed/util/CircularAtraceUtil.java +++ b/src/com/android/tradefed/util/CircularAtraceUtil.java @@ -19,10 +19,8 @@ import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.device.ITestDevice; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.result.FileInputStreamSource; -import com.android.tradefed.util.ArrayUtil; import java.io.File; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -38,7 +36,6 @@ import java.util.List; * with the --from-file option to generate an HTML viewer. */ public class CircularAtraceUtil { - private static final String LOG_TAG = "CircularAtraceUtil"; private static final String ATRACE_START_CMD = "atrace --async_start -b %d -c %s -z"; private static final String ATRACE_STOP_CMD = "atrace --async_stop -z -b %d > %s"; @@ -93,7 +90,7 @@ public class CircularAtraceUtil { // Execute shell command to stop atrace with results String command = String.format(ATRACE_STOP_CMD, bufferSizeKB, DEVICE_FILE); CLog.d("Ending atrace utility with command: %s", command); - String result = device.executeShellCommand(command); + device.executeShellCommand(command); File temp = device.pullFile(DEVICE_FILE); if (temp != null) { diff --git a/src/com/android/tradefed/util/ConditionPriorityBlockingQueue.java b/src/com/android/tradefed/util/ConditionPriorityBlockingQueue.java index f2b9b5a7f..ab5e51bdd 100644 --- a/src/com/android/tradefed/util/ConditionPriorityBlockingQueue.java +++ b/src/com/android/tradefed/util/ConditionPriorityBlockingQueue.java @@ -36,7 +36,7 @@ import java.util.concurrent.locks.ReentrantLock; * iteration, a {@link ConcurrentModificationException} will not be thrown, but the iterator * will also not reflect the modified contents. * <p/> - * @see {@link PriorityBlockingQueue} + * @see PriorityBlockingQueue */ public class ConditionPriorityBlockingQueue<T> implements Iterable<T> { @@ -56,7 +56,8 @@ public class ConditionPriorityBlockingQueue<T> implements Iterable<T> { } /** - * A {@link IMatcher} that matches any object. + * A {@link com.android.tradefed.util.ConditionPriorityBlockingQueue.IMatcher} + * that matches any object. * * @param <T> */ @@ -323,7 +324,6 @@ public class ConditionPriorityBlockingQueue<T> implements Iterable<T> { /** * Get a copy of the contents of the queue. - * @return */ public List<T> getCopy() { mLock.lock(); diff --git a/src/com/android/tradefed/util/FakeTestsZipFolder.java b/src/com/android/tradefed/util/FakeTestsZipFolder.java index 22027f2ff..800554f5c 100644 --- a/src/com/android/tradefed/util/FakeTestsZipFolder.java +++ b/src/com/android/tradefed/util/FakeTestsZipFolder.java @@ -107,8 +107,6 @@ public class FakeTestsZipFolder { /** * Returns the base of the fake unzipped folder This would be a replacement * of root folder where a real tests zip is expanded - * - * @return */ public File getBasePath() { return mBase; diff --git a/src/com/android/tradefed/util/IEmail.java b/src/com/android/tradefed/util/IEmail.java index 30d97f160..56dbb1552 100644 --- a/src/com/android/tradefed/util/IEmail.java +++ b/src/com/android/tradefed/util/IEmail.java @@ -95,7 +95,7 @@ public interface IEmail { } /** * Set the recipients. All previously added recipients will be replaced. - * {@see #addTo(String)} to append to the recipients list. + * {@link #addTo(String)} to append to the recipients list. * * @param recipients an array of recipient email addresses */ diff --git a/src/com/android/tradefed/util/JUnitXmlParser.java b/src/com/android/tradefed/util/JUnitXmlParser.java index edecc766d..847596492 100644 --- a/src/com/android/tradefed/util/JUnitXmlParser.java +++ b/src/com/android/tradefed/util/JUnitXmlParser.java @@ -17,6 +17,7 @@ package com.android.tradefed.util; import com.android.ddmlib.testrunner.TestIdentifier; +import com.android.ddmlib.testrunner.XmlTestRunListener; import com.android.tradefed.result.ITestInvocationListener; import com.android.tradefed.util.xml.AbstractXmlParser; @@ -30,7 +31,7 @@ import java.util.Collections; * Parser that extracts test result data from JUnit results stored in ant's XMLJUnitResultFormatter * and forwards it to a ITestInvocationListener. * <p/> - * @see ddmlib's XmlTestRunListener + * @see XmlTestRunListener */ public class JUnitXmlParser extends AbstractXmlParser { private final ITestInvocationListener mTestListener; diff --git a/src/com/android/tradefed/util/ListInstrumentationParser.java b/src/com/android/tradefed/util/ListInstrumentationParser.java index 8d7a8908f..b649272e8 100644 --- a/src/com/android/tradefed/util/ListInstrumentationParser.java +++ b/src/com/android/tradefed/util/ListInstrumentationParser.java @@ -16,12 +16,13 @@ package com.android.tradefed.util; +import com.android.ddmlib.IShellOutputReceiver; import com.android.ddmlib.MultiLineReceiver; import java.util.ArrayList; import java.util.List; -import java.util.regex.Pattern; import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * A {@link IShellOutputReceiver} that parses the output of a 'pm list instrumentation' query diff --git a/src/com/android/tradefed/util/MultiMap.java b/src/com/android/tradefed/util/MultiMap.java index 508cf5c2d..16517bb48 100644 --- a/src/com/android/tradefed/util/MultiMap.java +++ b/src/com/android/tradefed/util/MultiMap.java @@ -44,7 +44,7 @@ public class MultiMap<K, V> { /** * Checks whether the map contains the specified key. * - * @see {@link Map#containsKey()} + * @see Map#containsKey(Object) */ public boolean containsKey(K key) { return mInternalMap.containsKey(key); @@ -53,7 +53,7 @@ public class MultiMap<K, V> { /** * Checks whether the map contains the specified value. * - * @see {@link Map#containsValue()} + * @see Map#containsValue(Object) */ public boolean containsValue(V value) { for (List<V> valueList : mInternalMap.values()) { @@ -72,7 +72,7 @@ public class MultiMap<K, V> { } /** - * @see {@link Map#isEmpty()} + * @see Map#isEmpty() */ public boolean isEmpty() { return mInternalMap.isEmpty(); @@ -88,7 +88,7 @@ public class MultiMap<K, V> { /** * Adds the value to the list associated with a key. * - * @see {@link Map#put()} + * @see Map#put(Object, Object) */ public V put(K key, V value) { List<V> valueList = mInternalMap.get(key); diff --git a/src/com/android/tradefed/util/QuotationAwareTokenizer.java b/src/com/android/tradefed/util/QuotationAwareTokenizer.java index 7d5205df5..9a623b207 100644 --- a/src/com/android/tradefed/util/QuotationAwareTokenizer.java +++ b/src/com/android/tradefed/util/QuotationAwareTokenizer.java @@ -111,11 +111,11 @@ public class QuotationAwareTokenizer { } /** - * Perform the reverse of {@link tokenizeLine}. <br/> + * Perform the reverse of {@link #tokenizeLine(String)}. <br/> * Given array of tokens, combine them into a single line. * * @param tokens - * @return + * @return A {@link String} created from all the tokens. */ public static String combineTokens(String... tokens) { final Pattern wsPattern = Pattern.compile("\\s"); diff --git a/src/com/android/tradefed/util/RegexTrie.java b/src/com/android/tradefed/util/RegexTrie.java index ee8bcd1ab..addfed286 100644 --- a/src/com/android/tradefed/util/RegexTrie.java +++ b/src/com/android/tradefed/util/RegexTrie.java @@ -62,7 +62,7 @@ public class RegexTrie<V> { /** * Patterns aren't comparable by default, which prevents you from retrieving them from a * HashTable. This is a simple stub class that makes a Pattern with a working - * {@link CompPattern#equals()} method. + * {@link com.android.tradefed.util.RegexTrie.CompPattern#equals(Object)} method. */ static class CompPattern { protected final Pattern mPattern; @@ -141,7 +141,7 @@ public class RegexTrie<V> { * A helper method to consolidate validation before adding an entry to the trie. * * @param value The value to set - * @param patterns The sequence of {@link CompPattern}s that must be sequentially matched to + * @param pList The sequence of {@link CompPattern}s that must be sequentially matched to * retrieve the associated {@code value} */ private V validateAndPut(V value, List<CompPattern> pList) { @@ -177,7 +177,7 @@ public class RegexTrie<V> { * @param value The value to set * @param regexen The sequence of regular expressions (as {@link String}s) that must be * sequentially matched to retrieve the associated {@code value}. Each String will be - * compiled as a {@link Pattern} before invoking {@link #put(V, Pattern...)}. + * compiled as a {@link Pattern} before invoking {@link #put(Object, Pattern...)}. */ public V put(V value, String... regexen) { List<CompPattern> pList = new ArrayList<CompPattern>(regexen.length); diff --git a/src/com/android/tradefed/util/SizeLimitedOutputStream.java b/src/com/android/tradefed/util/SizeLimitedOutputStream.java index a4d8bf793..c24a7bd94 100644 --- a/src/com/android/tradefed/util/SizeLimitedOutputStream.java +++ b/src/com/android/tradefed/util/SizeLimitedOutputStream.java @@ -182,8 +182,6 @@ public class SizeLimitedOutputStream extends OutputStream { /** * Gets the next index to use for <var>mFiles</var>, treating it as a circular list. - * - * @return */ private int getNextIndex(int i) { return (i + 1) % mFiles.length; diff --git a/src/com/android/tradefed/util/TimeVal.java b/src/com/android/tradefed/util/TimeVal.java index c35628ae4..4ccb4e771 100644 --- a/src/com/android/tradefed/util/TimeVal.java +++ b/src/com/android/tradefed/util/TimeVal.java @@ -48,7 +48,7 @@ public class TimeVal extends Number implements Comparable<Long> { /** * Constructs a newly allocated TimeVal object that represents the <emph>timestamp</emph> * indicated by the String parameter. The string is converted to a TimeVal in exactly the - * manner used by the {@see fromString(String)} method. + * manner used by the {@link #fromString(String)} method. */ public TimeVal(String value) throws NumberFormatException { mValue = fromString(value); @@ -120,7 +120,6 @@ public class TimeVal extends Number implements Comparable<Long> { if (str == null) return 0; Long value = Long.parseLong(str); - if (value == null) return 0; return value; } diff --git a/src/com/android/tradefed/util/xml/AbstractXmlParser.java b/src/com/android/tradefed/util/xml/AbstractXmlParser.java index 4862fc465..ee94773d2 100644 --- a/src/com/android/tradefed/util/xml/AbstractXmlParser.java +++ b/src/com/android/tradefed/util/xml/AbstractXmlParser.java @@ -74,7 +74,6 @@ public abstract class AbstractXmlParser { /** * Creates a {@link DefaultHandler} to process the xml - * @return */ protected abstract DefaultHandler createXmlHandler(); |