diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java index 521593ea8..2962e7192 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java @@ -241,6 +241,17 @@ public static void deleteTrashFile(final Repository db, FileUtils.delete(path); } + /** + * @param db + * the repository + * @param link + * the path of the symbolic link to create + * @param target + * the target of the symbolic link + * @return the path to the symbolic link + * @throws Exception + * @since 4.2 + */ public static Path writeLink(Repository db, String link, String target) throws Exception { return FileUtils.createSymLink(new File(db.getWorkTree(), link), diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index bb5f9efb8..4d713b5e7 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -91,7 +91,10 @@ public abstract class LocalDiskRepositoryTestCase { /** A fake (but stable) identity for committer fields in the test. */ protected PersonIdent committer; - /** A {@link SystemReader} used to coordinate time, envars, etc. */ + /** + * A {@link SystemReader} used to coordinate time, envars, etc. + * @since 4.2 + */ protected MockSystemReader mockSystemReader; private final List toClose = new ArrayList(); diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java index 03a2b1a58..28a95569e 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java @@ -151,6 +151,7 @@ public long getCurrentTime() { * * @param secDelta * number of seconds to add to the current time. + * @since 4.2 */ public void tick(final int secDelta) { now += secDelta * 1000L; diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 28c61778c..56962e869 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -108,6 +108,17 @@ protected File writeTrashFile(final String name, final String data) return JGitTestUtil.writeTrashFile(db, name, data); } + /** + * Create a symbolic link + * + * @param link + * the path of the symbolic link to create + * @param target + * the target of the symbolic link + * @return the path to the symbolic link + * @throws Exception + * @since 4.2 + */ protected Path writeLink(final String link, final String target) throws Exception { return JGitTestUtil.writeLink(db, link, target); diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java index 251e65f55..ac9685d37 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java @@ -175,6 +175,7 @@ public TestRepository(R db, RevWalk rw) throws IOException { * the MockSystemReader to use for clock and other system * operations. * @throws IOException + * @since 4.2 */ public TestRepository(R db, RevWalk rw, MockSystemReader reader) throws IOException { @@ -203,7 +204,10 @@ public Git git() { return git; } - /** @return current date. */ + /** + * @return current date. + * @since 4.2 + */ public Date getDate() { return new Date(mockSystemReader.getCurrentTime()); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java index 6d0318c02..727ea79cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java @@ -398,8 +398,10 @@ public static void createNewFile(File f) throws IOException { * Create a symbolic link * * @param path + * the path of the symbolic link to create * @param target - * @return path to the created link + * the target of the symbolic link + * @return the path to the symbolic link * @throws IOException * @since 4.2 */