Browse Source

Add missing @since tags and missing javadoc

Change-Id: I8575797127fc96abea8af56f019ca39f5897486f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.3
Matthias Sohn 9 years ago
parent
commit
2cdc130dfc
  1. 11
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java
  2. 5
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
  3. 1
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
  4. 11
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
  5. 6
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
  6. 4
      org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java

11
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java

@ -241,6 +241,17 @@ public abstract class JGitTestUtil {
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),

5
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<Repository> toClose = new ArrayList<Repository>();

1
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java

@ -151,6 +151,7 @@ public class MockSystemReader extends SystemReader {
*
* @param secDelta
* number of seconds to add to the current time.
* @since 4.2
*/
public void tick(final int secDelta) {
now += secDelta * 1000L;

11
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java

@ -108,6 +108,17 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
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);

6
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java

@ -175,6 +175,7 @@ public class TestRepository<R extends Repository> {
* 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 class TestRepository<R extends Repository> {
return git;
}
/** @return current date. */
/**
* @return current date.
* @since 4.2
*/
public Date getDate() {
return new Date(mockSystemReader.getCurrentTime());
}

4
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java

@ -398,8 +398,10 @@ public class FileUtils {
* 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
*/

Loading…
Cancel
Save