]> source.dussan.org Git - jgit.git/commitdiff
Fix javadoc in org.eclipse.jgit.junit 68/113568/2
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 17 Dec 2017 18:50:13 +0000 (19:50 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 17 Dec 2017 19:21:54 +0000 (20:21 +0100)
Change-Id: I1107e6a82849ac329361baabb5c481d86ea6dc9e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Assert.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRng.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/time/MonotonicFakeClock.java

index 40a05b4b7c6bcb90cbf1938dd18993917a1171eb..57b33e1c4f2c0b525416117358f53a37b3fa06f1 100644 (file)
@@ -44,12 +44,33 @@ package org.eclipse.jgit.junit;
 
 import static java.lang.Boolean.valueOf;
 
+/**
+ * Assertion class
+ */
 public class Assert {
 
+       /**
+        * Assert booleans are equal
+        *
+        * @param expect
+        *            expected value
+        * @param actual
+        *            actual value
+        */
        public static void assertEquals(boolean expect, boolean actual) {
                org.junit.Assert.assertEquals(valueOf(expect), valueOf(actual));
        }
 
+       /**
+        * Assert booleans are equal
+        *
+        * @param message
+        *            message
+        * @param expect
+        *            expected value
+        * @param actual
+        *            actual value
+        */
        public static void assertEquals(String message, boolean expect,
                        boolean actual) {
                org.junit.Assert
index 5bf61f0e83214b48ff8fc82d67f2065eb2b6abde..4ba2606fb3bc6b025f2a34bd39faf445fb28d0b1 100644 (file)
@@ -64,13 +64,22 @@ import org.eclipse.jgit.util.RawParseUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
+/**
+ * Abstract test util class
+ */
 public abstract class JGitTestUtil {
+       /** Constant <code>CLASSPATH_TO_RESOURCES="org/eclipse/jgit/test/resources/"</code> */
        public static final String CLASSPATH_TO_RESOURCES = "org/eclipse/jgit/test/resources/";
 
        private JGitTestUtil() {
                throw new UnsupportedOperationException();
        }
 
+       /**
+        * Get name of current test by inspecting stack trace
+        *
+        * @return the name
+        */
        public static String getName() {
                GatherStackTrace stack;
                try {
@@ -109,6 +118,14 @@ public abstract class JGitTestUtil {
                // Thrown above to collect the stack frame.
        }
 
+       /**
+        * Assert byte arrays are equal
+        *
+        * @param exp
+        *            expected value
+        * @param act
+        *            actual value
+        */
        public static void assertEquals(byte[] exp, byte[] act) {
                Assert.assertEquals(s(exp), s(act));
        }
@@ -117,6 +134,12 @@ public abstract class JGitTestUtil {
                return RawParseUtils.decode(raw);
        }
 
+       /**
+        * Get test resource file.
+        *
+        * @param fileName
+        * @return the test resource file
+        */
        public static File getTestResourceFile(final String fileName) {
                if (fileName == null || fileName.length() <= 0) {
                        return null;
@@ -145,6 +168,13 @@ public abstract class JGitTestUtil {
                }
        }
 
+       /**
+        * Copy test resource.
+        *
+        * @param name
+        * @param dest
+        * @throws IOException
+        */
        public static void copyTestResource(String name, File dest)
                        throws IOException {
                URL url = cl().getResource(CLASSPATH_TO_RESOURCES + name);
@@ -169,6 +199,15 @@ public abstract class JGitTestUtil {
                return JGitTestUtil.class.getClassLoader();
        }
 
+       /**
+        * Write a trash file.
+        *
+        * @param db
+        * @param name
+        * @param data
+        * @return the trash file
+        * @throws IOException
+        */
        public static File writeTrashFile(final Repository db,
                        final String name, final String data) throws IOException {
                File path = new File(db.getWorkTree(), name);
@@ -176,6 +215,16 @@ public abstract class JGitTestUtil {
                return path;
        }
 
+       /**
+        * Write a trash file.
+        *
+        * @param db
+        * @param subdir
+        * @param name
+        * @param data
+        * @return the trash file
+        * @throws IOException
+        */
        public static File writeTrashFile(final Repository db,
                        final String subdir,
                        final String name, final String data) throws IOException {
@@ -224,17 +273,40 @@ public abstract class JGitTestUtil {
                return new String(body, 0, body.length, "UTF-8");
        }
 
+       /**
+        * Read a file's content
+        *
+        * @param db
+        * @param name
+        * @return the content of the file
+        * @throws IOException
+        */
        public static String read(final Repository db, final String name)
                        throws IOException {
                File file = new File(db.getWorkTree(), name);
                return read(file);
        }
 
+       /**
+        * Check if file exists
+        *
+        * @param db
+        * @param name
+        *            name of the file
+        * @return {@code true} if the file exists
+        */
        public static boolean check(final Repository db, final String name) {
                File file = new File(db.getWorkTree(), name);
                return file.exists();
        }
 
+       /**
+        * Delete a trash file.
+        *
+        * @param db
+        * @param name
+        * @throws IOException
+        */
        public static void deleteTrashFile(final Repository db,
                        final String name) throws IOException {
                File path = new File(db.getWorkTree(), name);
@@ -242,6 +314,8 @@ public abstract class JGitTestUtil {
        }
 
        /**
+        * Write a symbolic link
+        *
         * @param db
         *            the repository
         * @param link
index 6ace9fc1221690814fc89480108dba1da272407a..9dac11e5bccce0eb4fc5859df14d3c561839168d 100644 (file)
@@ -82,8 +82,9 @@ import org.junit.Before;
  * A temporary directory is created for each test, allowing each test to use a
  * fresh environment. The temporary directory is cleaned up after the test ends.
  * <p>
- * Callers should not use {@link RepositoryCache} from within these tests as it
- * may wedge file descriptors open past the end of the test.
+ * Callers should not use {@link org.eclipse.jgit.lib.RepositoryCache} from
+ * within these tests as it may wedge file descriptors open past the end of the
+ * test.
  * <p>
  * A system property {@code jgit.junit.usemmap} defines whether memory mapping
  * is used. Memory mapping has an effect on the file system, in that memory
@@ -112,6 +113,11 @@ public abstract class LocalDiskRepositoryTestCase {
        private final Set<Repository> toClose = new HashSet<>();
        private File tmp;
 
+       /**
+        * Setup test
+        *
+        * @throws Exception
+        */
        @Before
        public void setUp() throws Exception {
                tmp = File.createTempFile("jgit_test_", "_tmp");
@@ -142,10 +148,20 @@ public abstract class LocalDiskRepositoryTestCase {
                c.install();
        }
 
+       /**
+        * Get temporary directory.
+        *
+        * @return the temporary directory
+        */
        protected File getTemporaryDirectory() {
                return tmp.getAbsoluteFile();
        }
 
+       /**
+        * Get list of ceiling directories
+        *
+        * @return list of ceiling directories
+        */
        protected List<File> getCeilings() {
                return Collections.singletonList(getTemporaryDirectory());
        }
@@ -164,6 +180,11 @@ public abstract class LocalDiskRepositoryTestCase {
                return stringBuilder.toString();
        }
 
+       /**
+        * Tear down the test
+        *
+        * @throws Exception
+        */
        @After
        public void tearDown() throws Exception {
                RepositoryCache.clear();
@@ -185,7 +206,9 @@ public abstract class LocalDiskRepositoryTestCase {
                SystemReader.setInstance(null);
        }
 
-       /** Increment the {@link #author} and {@link #committer} times. */
+       /**
+        * Increment the {@link #author} and {@link #committer} times.
+        */
        protected void tick() {
                mockSystemReader.tick(5 * 60);
                final long now = mockSystemReader.getCurrentTime();
@@ -239,16 +262,22 @@ public abstract class LocalDiskRepositoryTestCase {
                        System.err.println(msg);
        }
 
+       /** Constant <code>MOD_TIME=1</code> */
        public static final int MOD_TIME = 1;
 
+       /** Constant <code>SMUDGE=2</code> */
        public static final int SMUDGE = 2;
 
+       /** Constant <code>LENGTH=4</code> */
        public static final int LENGTH = 4;
 
+       /** Constant <code>CONTENT_ID=8</code> */
        public static final int CONTENT_ID = 8;
 
+       /** Constant <code>CONTENT=16</code> */
        public static final int CONTENT = 16;
 
+       /** Constant <code>ASSUME_UNCHANGED=32</code> */
        public static final int ASSUME_UNCHANGED = 32;
 
        /**
@@ -279,7 +308,6 @@ public abstract class LocalDiskRepositoryTestCase {
         *
         * @param repo
         *            the repository the index state should be determined for
-        *
         * @param includedOptions
         *            a bitmask constructed out of the constants {@link #MOD_TIME},
         *            {@link #SMUDGE}, {@link #LENGTH}, {@link #CONTENT_ID} and
@@ -546,6 +574,14 @@ public abstract class LocalDiskRepositoryTestCase {
                JGitTestUtil.write(f, body);
        }
 
+       /**
+        * Read a file's content
+        *
+        * @param f
+        *            the file
+        * @return the content of the file
+        * @throws IOException
+        */
        protected String read(final File f) throws IOException {
                return JGitTestUtil.read(f);
        }
index 68482c6c271f39b6b308257894a9707aa102c933..05d15229bc54cec44047a49e9a2126b24d5afa98 100644 (file)
@@ -67,7 +67,7 @@ import org.eclipse.jgit.util.time.MonotonicClock;
 import org.eclipse.jgit.util.time.ProposedTimestamp;
 
 /**
- * Mock {@link SystemReader} for tests.
+ * Mock {@link org.eclipse.jgit.util.SystemReader} for tests.
  */
 public class MockSystemReader extends SystemReader {
        private final class MockConfig extends FileBasedConfig {
@@ -94,6 +94,9 @@ public class MockSystemReader extends SystemReader {
 
        FileBasedConfig systemGitConfig;
 
+       /**
+        * Constructor for <code>MockSystemReader</code>
+        */
        public MockSystemReader() {
                init(Constants.OS_USER_NAME_KEY);
                init(Constants.GIT_AUTHOR_NAME_KEY);
@@ -110,46 +113,62 @@ public class MockSystemReader extends SystemReader {
                setProperty(n, n);
        }
 
+       /**
+        * Clear properties
+        */
        public void clearProperties() {
                values.clear();
        }
 
+       /**
+        * Set a property
+        *
+        * @param key
+        * @param value
+        */
        public void setProperty(String key, String value) {
                values.put(key, value);
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getenv(String variable) {
                return values.get(variable);
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getProperty(String key) {
                return values.get(key);
        }
 
+       /** {@inheritDoc} */
        @Override
        public FileBasedConfig openUserConfig(Config parent, FS fs) {
                assert parent == null || parent == systemGitConfig;
                return userGitConfig;
        }
 
+       /** {@inheritDoc} */
        @Override
        public FileBasedConfig openSystemConfig(Config parent, FS fs) {
                assert parent == null;
                return systemGitConfig;
        }
 
+       /** {@inheritDoc} */
        @Override
        public String getHostname() {
                return "fake.host.example.com";
        }
 
+       /** {@inheritDoc} */
        @Override
        public long getCurrentTime() {
                return now;
        }
 
+       /** {@inheritDoc} */
        @Override
        public MonotonicClock getClock() {
                return new MonotonicClock() {
@@ -182,26 +201,31 @@ public class MockSystemReader extends SystemReader {
                now += secDelta * 1000L;
        }
 
+       /** {@inheritDoc} */
        @Override
        public int getTimezone(long when) {
                return getTimeZone().getOffset(when) / (60 * 1000);
        }
 
+       /** {@inheritDoc} */
        @Override
        public TimeZone getTimeZone() {
                return TimeZone.getTimeZone("GMT-03:30");
        }
 
+       /** {@inheritDoc} */
        @Override
        public Locale getLocale() {
                return Locale.US;
        }
 
+       /** {@inheritDoc} */
        @Override
        public SimpleDateFormat getSimpleDateFormat(String pattern) {
                return new SimpleDateFormat(pattern, getLocale());
        }
 
+       /** {@inheritDoc} */
        @Override
        public DateFormat getDateTimeInstance(int dateStyle, int timeStyle) {
                return DateFormat
index a3c869f7224c079a0d488e044586ea7272b348ab..b2521a1375c7bcc2e1e38428461b3d0b60b60f17 100644 (file)
@@ -46,8 +46,14 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+/**
+ * Interface enabling to run tests repeatedly
+ */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ java.lang.annotation.ElementType.METHOD })
 public @interface Repeat {
+       /**
+        * Number of repetitions
+        */
        public abstract int n();
 }
index 4230073c1b2e2f8fbacb024b3a998db0bbd17e53..8165738ed8e88efc397271de62c4b5820b9c3d9c 100644 (file)
@@ -51,8 +51,8 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
 /**
- * {@link TestRule} which enables to run the same JUnit test repeatedly. Add
- * this rule to the test class
+ * {@link org.junit.rules.TestRule} which enables to run the same JUnit test
+ * repeatedly. Add this rule to the test class
  *
  * <pre>
  * public class MyTest {
@@ -118,6 +118,7 @@ public class RepeatRule implements TestRule {
                }
        }
 
+       /** {@inheritDoc} */
        @Override
        public Statement apply(Statement statement, Description description) {
                Statement result = statement;
index c282df03bd205bcb78301941638bc9320b8b026f..044f08072af366b63ff5b1d3092470094d88da5f 100644 (file)
@@ -84,6 +84,13 @@ import org.junit.Before;
  * repositories and destroying them when the tests are finished.
  */
 public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
+       /**
+        * Copy a file
+        *
+        * @param src
+        * @param dst
+        * @throws IOException
+        */
        protected static void copyFile(final File src, final File dst)
                        throws IOException {
                final FileInputStream fis = new FileInputStream(src);
@@ -103,6 +110,14 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                }
        }
 
+       /**
+        * Write a trash file
+        *
+        * @param name
+        * @param data
+        * @return the trash file
+        * @throws IOException
+        */
        protected File writeTrashFile(final String name, final String data)
                        throws IOException {
                return JGitTestUtil.writeTrashFile(db, name, data);
@@ -124,24 +139,62 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                return JGitTestUtil.writeLink(db, link, target);
        }
 
+       /**
+        * Write a trash file
+        *
+        * @param subdir
+        * @param name
+        * @param data
+        * @return the trash file
+        * @throws IOException
+        */
        protected File writeTrashFile(final String subdir, final String name,
                        final String data)
                        throws IOException {
                return JGitTestUtil.writeTrashFile(db, subdir, name, data);
        }
 
+       /**
+        * Read content of a file
+        *
+        * @param name
+        * @return the file's content
+        * @throws IOException
+        */
        protected String read(final String name) throws IOException {
                return JGitTestUtil.read(db, name);
        }
 
+       /**
+        * Check if file exists
+        *
+        * @param name
+        *            file name
+        * @return if the file exists
+        */
        protected boolean check(final String name) {
                return JGitTestUtil.check(db, name);
        }
 
+       /**
+        * Delete a trash file
+        *
+        * @param name
+        *            file name
+        * @throws IOException
+        */
        protected void deleteTrashFile(final String name) throws IOException {
                JGitTestUtil.deleteTrashFile(db, name);
        }
 
+       /**
+        * Check content of a file.
+        *
+        * @param f
+        * @param checkData
+        *            expected content
+        * @throws IOException
+        */
        protected static void checkFile(File f, final String checkData)
                        throws IOException {
                Reader r = new InputStreamReader(new FileInputStream(f), "UTF-8");
@@ -161,6 +214,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
        /** Working directory of {@link #db}. */
        protected File trash;
 
+       /** {@inheritDoc} */
        @Override
        @Before
        public void setUp() throws Exception {
@@ -220,8 +274,8 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
         * have an index which matches their prepared content.
         *
         * @param treeItr
-        *            a {@link FileTreeIterator} which determines which files should
-        *            go into the new index
+        *            a {@link org.eclipse.jgit.treewalk.FileTreeIterator} which
+        *            determines which files should go into the new index
         * @throws FileNotFoundException
         * @throws IOException
         */
@@ -261,13 +315,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
         *
         * @param l
         *            the object to lookup
+        * @param lookupTable
+        *            a table storing object-name mappings.
         * @param nameTemplate
         *            the name for that object. Can contain "%n" which will be
         *            replaced by a running number before used as a name. If the
         *            lookup table already contains the object this parameter will
         *            be ignored
-        * @param lookupTable
-        *            a table storing object-name mappings.
         * @return a name of that object. Is not guaranteed to be unique. Use
         *         nameTemplates containing "%n" to always have unique names
         */
@@ -288,7 +342,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
         * @param str
         *            the string in which backslashes should be replaced
         * @return the resulting string with slashes
-         * @since 4.2
+        * @since 4.2
         */
        public static String slashify(String str) {
                str = str.replace('\\', '/');
@@ -335,6 +389,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                }
        }
 
+       /**
+        * Create a branch
+        *
+        * @param objectId
+        * @param branchName
+        * @throws IOException
+        */
        protected void createBranch(ObjectId objectId, String branchName)
                        throws IOException {
                RefUpdate updateRef = db.updateRef(branchName);
@@ -342,6 +403,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                updateRef.update();
        }
 
+       /**
+        * Checkout a branch
+        *
+        * @param branchName
+        * @throws IllegalStateException
+        * @throws IOException
+        */
        protected void checkoutBranch(String branchName)
                        throws IllegalStateException, IOException {
                try (RevWalk walk = new RevWalk(db)) {
@@ -429,15 +497,39 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                }
        }
 
+       /**
+        * Create <code>DirCacheEntry</code>
+        *
+        * @param path
+        * @param mode
+        * @return the DirCacheEntry
+        */
        protected DirCacheEntry createEntry(final String path, final FileMode mode) {
                return createEntry(path, mode, DirCacheEntry.STAGE_0, path);
        }
 
+       /**
+        * Create <code>DirCacheEntry</code>
+        *
+        * @param path
+        * @param mode
+        * @param content
+        * @return the DirCacheEntry
+        */
        protected DirCacheEntry createEntry(final String path, final FileMode mode,
                        final String content) {
                return createEntry(path, mode, DirCacheEntry.STAGE_0, content);
        }
 
+       /**
+        * Create <code>DirCacheEntry</code>
+        *
+        * @param path
+        * @param mode
+        * @param stage
+        * @param content
+        * @return the DirCacheEntry
+        */
        protected DirCacheEntry createEntry(final String path, final FileMode mode,
                        final int stage, final String content) {
                final DirCacheEntry entry = new DirCacheEntry(path, stage);
@@ -449,6 +541,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
                return entry;
        }
 
+       /**
+        * Assert files are equal
+        *
+        * @param expected
+        * @param actual
+        * @throws IOException
+        */
        public static void assertEqualsFile(File expected, File actual)
                        throws IOException {
                assertEquals(expected.getCanonicalFile(), actual.getCanonicalFile());
index 22b69a3ee5e218cb67a303cfbecb5bd50c63fe06..fcedfb0186bc14737403b602578e46410ecfd9d4 100644 (file)
@@ -47,30 +47,38 @@ import static org.junit.Assert.assertEquals;
 
 import org.eclipse.jgit.lib.ProgressMonitor;
 
+/**
+ * Strict work monitor
+ */
 public final class StrictWorkMonitor implements ProgressMonitor {
        private int lastWork, totalWork;
 
+       /** {@inheritDoc} */
        @Override
        public void start(int totalTasks) {
                // empty
        }
 
+       /** {@inheritDoc} */
        @Override
        public void beginTask(String title, int total) {
                this.totalWork = total;
                lastWork = 0;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void update(int completed) {
                lastWork += completed;
        }
 
+       /** {@inheritDoc} */
        @Override
        public void endTask() {
                assertEquals("Units of work recorded", totalWork, lastWork);
        }
 
+       /** {@inheritDoc} */
        @Override
        public boolean isCancelled() {
                return false;
index db6f60960cfe91a082fc97a0f0d95e6d43c513fb..41634e7cda13328eacb44b0fa7dab942612a9672 100644 (file)
@@ -114,12 +114,16 @@ import org.eclipse.jgit.util.FileUtils;
  */
 public class TestRepository<R extends Repository> {
 
+       /** Constant <code>AUTHOR="J. Author"</code> */
        public static final String AUTHOR = "J. Author";
 
+       /** Constant <code>AUTHOR_EMAIL="jauthor@example.com"</code> */
        public static final String AUTHOR_EMAIL = "jauthor@example.com";
 
+       /** Constant <code>COMMITTER="J. Committer"</code> */
        public static final String COMMITTER = "J. Committer";
 
+       /** Constant <code>COMMITTER_EMAIL="jcommitter@example.com"</code> */
        public static final String COMMITTER_EMAIL = "jcommitter@example.com";
 
        private final PersonIdent defaultAuthor;
@@ -186,25 +190,38 @@ public class TestRepository<R extends Repository> {
                defaultCommitter = new PersonIdent(COMMITTER, COMMITTER_EMAIL, now, tz);
        }
 
-       /** @return the repository this helper class operates against. */
+       /**
+        * Get repository
+        *
+        * @return the repository this helper class operates against.
+        */
        public R getRepository() {
                return db;
        }
 
-       /** @return get the RevWalk pool all objects are allocated through. */
+       /**
+        * Get RevWalk
+        *
+        * @return get the RevWalk pool all objects are allocated through.
+        */
        public RevWalk getRevWalk() {
                return pool;
        }
 
        /**
+        * Return Git API wrapper
+        *
         * @return an API wrapper for the underlying repository. This wrapper does
-        *         not allocate any new resources and need not be closed (but closing
-        *         it is harmless). */
+        *         not allocate any new resources and need not be closed (but
+        *         closing it is harmless).
+        */
        public Git git() {
                return git;
        }
 
        /**
+        * Get date
+        *
         * @return current date.
         * @since 4.2
         */
@@ -212,7 +229,11 @@ public class TestRepository<R extends Repository> {
                return new Date(mockSystemReader.getCurrentTime());
        }
 
-       /** @return timezone used for default identities. */
+       /**
+        * Get timezone
+        *
+        * @return timezone used for default identities.
+        */
        public TimeZone getTimeZone() {
                return mockSystemReader.getTimeZone();
        }
@@ -424,7 +445,11 @@ public class TestRepository<R extends Repository> {
                return pool.lookupCommit(id);
        }
 
-       /** @return a new commit builder. */
+       /**
+        * Create commit builder
+        *
+        * @return a new commit builder.
+        */
        public CommitBuilder commit() {
                return new CommitBuilder();
        }
@@ -618,7 +643,7 @@ public class TestRepository<R extends Repository> {
 
        /**
         * Soft-reset HEAD to a detached state.
-        * <p>
+        *
         * @param id
         *            ID of detached head.
         * @throws Exception
@@ -758,7 +783,8 @@ public class TestRepository<R extends Repository> {
         * Ensure the body of the given object has been parsed.
         *
         * @param <T>
-        *            type of object, e.g. {@link RevTag} or {@link RevCommit}.
+        *            type of object, e.g. {@link org.eclipse.jgit.revwalk.RevTag}
+        *            or {@link org.eclipse.jgit.revwalk.RevCommit}.
         * @param object
         *            reference to the (possibly unparsed) object to force body
         *            parsing of.
index 93facc3777d09138e3919d7f38ef53d544cdb1f1..54c81f2d86e51a96c03b0e766070b43c189bc68d 100644 (file)
@@ -43,7 +43,9 @@
 
 package org.eclipse.jgit.junit;
 
-/** Toy RNG to ensure we get predictable numbers during unit tests. */
+/**
+ * Toy RNG to ensure we get predictable numbers during unit tests.
+ */
 public class TestRng {
        private int next;
 
@@ -74,6 +76,8 @@ public class TestRng {
        }
 
        /**
+        * Next int
+        *
         * @return the next random integer.
         */
        public int nextInt() {
index f09d303d558d73b1b9529b0a082fc8b79c324d32..1f5cac65c7e071be9ce5daaf72341f975176fdab 100644 (file)
@@ -50,7 +50,8 @@ import org.eclipse.jgit.util.time.MonotonicClock;
 import org.eclipse.jgit.util.time.ProposedTimestamp;
 
 /**
- * Fake {@link MonotonicClock} for testing code that uses Clock.
+ * Fake {@link org.eclipse.jgit.util.time.MonotonicClock} for testing code that
+ * uses Clock.
  *
  * @since 4.6
  */
@@ -72,6 +73,7 @@ public class MonotonicFakeClock implements MonotonicClock {
                now += unit.toMillis(add);
        }
 
+       /** {@inheritDoc} */
        @Override
        public ProposedTimestamp propose() {
                long t = now++;