diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java index 444ab1cb8..5ede3ea6d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java @@ -55,13 +55,13 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectLoader; import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.ObjectStream; -import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.WorkingTreeIterator; import org.eclipse.jgit.treewalk.filter.PathFilter; /** - * Supplies the content of a file for {@link DiffFormatter}. + * Supplies the content of a file for + * {@link org.eclipse.jgit.diff.DiffFormatter}. *
* A content source is not thread-safe. Sources may contain state, including * information about the last ObjectLoader they returned. Callers must be @@ -83,8 +83,9 @@ public abstract class ContentSource { /** * Construct a content source for a working directory. * - * If the iterator is a {@link FileTreeIterator} an optimized version is - * used that doesn't require seeking through a TreeWalk. + * If the iterator is a {@link org.eclipse.jgit.treewalk.FileTreeIterator} + * an optimized version is used that doesn't require seeking through a + * TreeWalk. * * @param iterator * the iterator to obtain source files through. @@ -102,7 +103,7 @@ public abstract class ContentSource { * @param id * blob id of the file, if known. * @return the size in bytes. - * @throws IOException + * @throws java.io.IOException * the file cannot be accessed. */ public abstract long size(String path, ObjectId id) throws IOException; @@ -117,7 +118,7 @@ public abstract class ContentSource { * @return a loader that can supply the content of the file. The loader must * be used before another loader can be obtained from this same * source. - * @throws IOException + * @throws java.io.IOException * the file cannot be accessed. */ public abstract ObjectLoader open(String path, ObjectId id) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java index 5f01366c4..19eb39d93 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java @@ -44,7 +44,8 @@ package org.eclipse.jgit.diff; /** - * Compares two {@link Sequence}s to create an {@link EditList} of changes. + * Compares two {@link org.eclipse.jgit.diff.Sequence}s to create an + * {@link org.eclipse.jgit.diff.EditList} of changes. *
* An algorithm's {@code diff} method must be callable from concurrent threads
* without data collisions. This permits some algorithms to use a singleton
@@ -69,6 +70,8 @@ public abstract class DiffAlgorithm {
}
/**
+ * Get diff algorithm
+ *
* @param alg
* the diff algorithm for which an implementation should be
* returned
@@ -88,18 +91,18 @@ public abstract class DiffAlgorithm {
/**
* Compare two sequences and identify a list of edits between them.
*
- * @param
* Release the internal ObjectReader state.
*
* @since 4.0
@@ -409,8 +426,8 @@ public class DiffFormatter implements AutoCloseable {
*
* No output is created, instead only the file paths that are different are
* returned. Callers may choose to format these paths themselves, or convert
- * them into {@link FileHeader} instances with a complete edit list by
- * calling {@link #toFileHeader(DiffEntry)}.
+ * them into {@link org.eclipse.jgit.patch.FileHeader} instances with a
+ * complete edit list by calling {@link #toFileHeader(DiffEntry)}.
*
* Either side may be null to indicate that the tree has beed added or
* removed. The diff will be computed against nothing.
@@ -420,7 +437,7 @@ public class DiffFormatter implements AutoCloseable {
* @param b
* the new (or updated) side or null
* @return the paths that are different.
- * @throws IOException
+ * @throws java.io.IOException
* trees cannot be read or file contents cannot be read.
*/
public List
* Either side may be null to indicate that the tree has beed added or
* removed. The diff will be computed against nothing.
@@ -450,7 +467,7 @@ public class DiffFormatter implements AutoCloseable {
* @param b
* the new (or updated) side or null
* @return the paths that are different.
- * @throws IOException
+ * @throws java.io.IOException
* trees cannot be read or file contents cannot be read.
*/
public List
* This method does not use the OutputStream associated with this
* DiffFormatter instance. It is therefore safe to instantiate this
- * DiffFormatter instance with a {@link DisabledOutputStream} if this method
- * is the only one that will be used.
+ * DiffFormatter instance with a
+ * {@link org.eclipse.jgit.util.io.DisabledOutputStream} if this method is
+ * the only one that will be used.
*
* @param ent
* the DiffEntry to create the FileHeader for
* @return a FileHeader representing the DiffEntry. The FileHeader's buffer
* will contain only the header of the diff output. It will also
- * contain one {@link HunkHeader}.
- * @throws IOException
+ * contain one {@link org.eclipse.jgit.patch.HunkHeader}.
+ * @throws java.io.IOException
* the stream threw an exception while writing to it, or one of
* the blobs referenced by the DiffEntry could not be read.
- * @throws CorruptObjectException
+ * @throws org.eclipse.jgit.errors.CorruptObjectException
* one of the blobs referenced by the DiffEntry is corrupt.
- * @throws MissingObjectException
+ * @throws org.eclipse.jgit.errors.MissingObjectException
* one of the blobs referenced by the DiffEntry is missing.
*/
public FileHeader toFileHeader(DiffEntry ent) throws IOException,
@@ -1046,12 +1067,12 @@ public class DiffFormatter implements AutoCloseable {
* @param o
* The stream the formatter will write the first header line to
* @param type
- * The {@link ChangeType}
+ * The {@link org.eclipse.jgit.diff.DiffEntry.ChangeType}
* @param oldPath
* old path to the file
* @param newPath
* new path to the file
- * @throws IOException
+ * @throws java.io.IOException
* the stream threw an exception while writing to it.
*/
protected void formatGitDiffFirstHeaderLine(ByteArrayOutputStream o,
@@ -1136,11 +1157,13 @@ public class DiffFormatter implements AutoCloseable {
}
/**
+ * Format index line
+ *
* @param o
* the stream the formatter will write line data to
* @param ent
* the DiffEntry to create the FileHeader for
- * @throws IOException
+ * @throws java.io.IOException
* writing to the supplied stream failed.
*/
protected void formatIndexLine(OutputStream o, DiffEntry ent)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
index a2e167fd2..775d11a46 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
@@ -118,7 +118,11 @@ public class Edit {
endB = be;
}
- /** @return the type of this region */
+ /**
+ * Get type
+ *
+ * @return the type of this region
+ */
public final Type getType() {
if (beginA < endA) {
if (beginB < endB)
@@ -134,37 +138,66 @@ public class Edit {
}
}
- /** @return true if the edit is empty (lengths of both a and b is zero). */
+ /**
+ * Whether edit is empty
+ *
+ * @return {@code true} if the edit is empty (lengths of both a and b is
+ * zero)
+ */
public final boolean isEmpty() {
return beginA == endA && beginB == endB;
}
- /** @return start point in sequence A. */
+ /**
+ * Get start point in sequence A
+ *
+ * @return start point in sequence A
+ */
public final int getBeginA() {
return beginA;
}
- /** @return end point in sequence A. */
+ /**
+ * Get end point in sequence A
+ *
+ * @return end point in sequence A
+ */
public final int getEndA() {
return endA;
}
- /** @return start point in sequence B. */
+ /**
+ * Get start point in sequence B
+ *
+ * @return start point in sequence B
+ */
public final int getBeginB() {
return beginB;
}
- /** @return end point in sequence B. */
+ /**
+ * Get end point in sequence B
+ *
+ * @return end point in sequence B
+ */
public final int getEndB() {
return endB;
}
- /** @return length of the region in A. */
+ /**
+ * Get length of the region in A
+ *
+ * @return length of the region in A
+ */
public final int getLengthA() {
return endA - beginA;
}
- /** @return length of the region in B. */
+ /**
+ * Get length of the region in B
+ *
+ * @return return length of the region in B
+ */
public final int getLengthB() {
return endB - beginB;
}
@@ -210,17 +243,23 @@ public class Edit {
return new Edit(cut.endA, endA, cut.endB, endB);
}
- /** Increase {@link #getEndA()} by 1. */
+ /**
+ * Increase {@link #getEndA()} by 1.
+ */
public void extendA() {
endA++;
}
- /** Increase {@link #getEndB()} by 1. */
+ /**
+ * Increase {@link #getEndB()} by 1.
+ */
public void extendB() {
endB++;
}
- /** Swap A and B, so the edit goes the other direction. */
+ /**
+ * Swap A and B, so the edit goes the other direction.
+ */
public void swap() {
final int sBegin = beginA;
final int sEnd = endA;
@@ -232,11 +271,13 @@ public class Edit {
endB = sEnd;
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return beginA ^ endA;
}
+ /** {@inheritDoc} */
@Override
public boolean equals(final Object o) {
if (o instanceof Edit) {
@@ -247,6 +288,7 @@ public class Edit {
return false;
}
+ /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
index 14f7b4293..617e0d860 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
@@ -45,7 +45,9 @@ package org.eclipse.jgit.diff;
import java.util.ArrayList;
-/** Specialized list of {@link Edit}s in a document. */
+/**
+ * Specialized list of {@link org.eclipse.jgit.diff.Edit}s in a document.
+ */
public class EditList extends ArrayList
* This sequence acts as a proxy for the real sequence, caching element hash
* codes so they don't need to be recomputed each time. Sequences of this type
- * must be used with a {@link HashedSequenceComparator}.
+ * must be used with a {@link org.eclipse.jgit.diff.HashedSequenceComparator}.
*
- * To construct an instance of this type use {@link HashedSequencePair}.
+ * To construct an instance of this type use
+ * {@link org.eclipse.jgit.diff.HashedSequencePair}.
*
* @param
* This comparator acts as a proxy for the real comparator, evaluating the
* cached hash code before testing the underlying comparator's equality.
- * Comparators of this type must be used with a {@link HashedSequence}.
+ * Comparators of this type must be used with a
+ * {@link org.eclipse.jgit.diff.HashedSequence}.
*
- * To construct an instance of this type use {@link HashedSequencePair}.
+ * To construct an instance of this type use
+ * {@link org.eclipse.jgit.diff.HashedSequencePair}.
*
* @param
* This pair wraps two sequences that contain cached hash codes for the input
* sequences.
@@ -79,19 +80,31 @@ public class HashedSequencePair
* This implementation has an internal limitation that prevents it from handling
@@ -130,6 +131,7 @@ public class HistogramDiff extends LowLevelDiffAlgorithm {
maxChainLength = maxLen;
}
+ /** {@inheritDoc} */
@Override
public
* This convenience function runs without a progress monitor.
*
- * @return an unmodifiable list of {@link DiffEntry}s representing all files
- * that have been changed.
- * @throws IOException
+ * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s
+ * representing all files that have been changed.
+ * @throws java.io.IOException
* file contents cannot be read from the repository.
*/
public List
* Implementations of Sequence are primarily intended for use in content
- * difference detection algorithms, to produce an {@link EditList} of
- * {@link Edit} instances describing how two Sequence instances differ.
+ * difference detection algorithms, to produce an
+ * {@link org.eclipse.jgit.diff.EditList} of {@link org.eclipse.jgit.diff.Edit}
+ * instances describing how two Sequence instances differ.
*
* To be compared against another Sequence of the same type, a supporting
- * {@link SequenceComparator} must also be supplied.
+ * {@link org.eclipse.jgit.diff.SequenceComparator} must also be supplied.
*/
public abstract class Sequence {
/** @return total number of items in the sequence. */
+ /**
+ * Get size
+ *
+ * @return size
+ */
public abstract int size();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java
index cc38d4b5c..ccd005558 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java
@@ -44,7 +44,8 @@
package org.eclipse.jgit.diff;
/**
- * Equivalence function for a {@link Sequence} compared by difference algorithm.
+ * Equivalence function for a {@link org.eclipse.jgit.diff.Sequence} compared by
+ * difference algorithm.
*
* Difference algorithms can use a comparator to compare portions of two
* sequences and discover the minimal edits required to transform from one
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
index 1c40d7fcb..8b4d2ec8f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
@@ -56,8 +56,9 @@ import org.eclipse.jgit.lib.ObjectStream;
* Index structure of lines/blocks in one file.
*
* This structure can be used to compute an approximation of the similarity
- * between two files. The index is used by {@link SimilarityRenameDetector} to
- * compute scores between files.
+ * between two files. The index is used by
+ * {@link org.eclipse.jgit.diff.SimilarityRenameDetector} to compute scores
+ * between files.
*
* To save space in memory, this index uses a space efficient encoding which
* will not exceed 1 MiB per instance. The index starts out at a smaller size
@@ -114,9 +115,9 @@ public class SimilarityIndex {
* @param obj
* the object to hash
* @return similarity index for this object
- * @throws IOException
+ * @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws TableFullException
+ * @throws org.eclipse.jgit.diff.SimilarityIndex.TableFullException
* object hashing overflowed the storage capacity of the
* SimilarityIndex.
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
index 50ca613cc..aa10f6c9b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
@@ -44,11 +44,12 @@
package org.eclipse.jgit.diff;
/**
- * Wraps a {@link Sequence} to have a narrower range of elements.
+ * Wraps a {@link org.eclipse.jgit.diff.Sequence} to have a narrower range of
+ * elements.
*
* This sequence acts as a proxy for the real sequence, translating element
* indexes on the fly by adding {@code begin} to them. Sequences of this type
- * must be used with a {@link SubsequenceComparator}.
+ * must be used with a {@link org.eclipse.jgit.diff.SubsequenceComparator}.
*
* @param
* This comparator acts as a proxy for the real comparator, translating element
* indexes on the fly by adding the subsequence's begin offset to them.
- * Comparators of this type must be used with a {@link Subsequence}.
+ * Comparators of this type must be used with a
+ * {@link org.eclipse.jgit.diff.Subsequence}.
*
* @param
- * type of sequence being compared.
* @param cmp
* the comparator supplying the element equivalence function.
* @param a
* the first (also known as old or pre-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}.
+ * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndA()}.
* @param b
* the second (also known as new or post-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}.
+ * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndB()}.
* @return a modifiable edit list comparing the two sequences. If empty, the
* sequences are identical according to {@code cmp}'s rules. The
* result list is never null.
@@ -244,20 +247,21 @@ public abstract class DiffAlgorithm {
* proven to have no common starting or ending elements. The expected
* elimination of common starting and ending elements is automatically
* performed by the {@link #diff(SequenceComparator, Sequence, Sequence)}
- * method, which invokes this method using {@link Subsequence}s.
+ * method, which invokes this method using
+ * {@link org.eclipse.jgit.diff.Subsequence}s.
*
- * @param
- * type of sequence being compared.
* @param cmp
* the comparator supplying the element equivalence function.
* @param a
* the first (also known as old or pre-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}.
+ * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndA()}.
* @param b
* the second (also known as new or post-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}.
+ * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndB()}.
* @return a modifiable edit list comparing the two sequences.
*/
public abstract EditList diffNonCommon(
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
index ee709495e..063cefffa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
@@ -51,7 +51,9 @@ import org.eclipse.jgit.lib.Config.SectionParser;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.util.StringUtils;
-/** Keeps track of diff related configuration options. */
+/**
+ * Keeps track of diff related configuration options.
+ */
public class DiffConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser
* the base sequence type.
@@ -65,6 +67,7 @@ public final class HashedSequence extends Sequence {
this.hashes = hashes;
}
+ /** {@inheritDoc} */
@Override
public int size() {
return base.size();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
index 1ca7fdd9d..bd9618e0b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
@@ -44,13 +44,16 @@
package org.eclipse.jgit.diff;
/**
- * Wrap another comparator for use with {@link HashedSequence}.
+ * Wrap another comparator for use with
+ * {@link org.eclipse.jgit.diff.HashedSequence}.
*
* the base sequence type.
@@ -63,6 +66,7 @@ public final class HashedSequenceComparator extends
this.cmp = cmp;
}
+ /** {@inheritDoc} */
@Override
public boolean equals(HashedSequence a, int ai, //
HashedSequence b, int bi) {
@@ -70,6 +74,7 @@ public final class HashedSequenceComparator extends
&& cmp.equals(a.base, ai, b.base, bi);
}
+ /** {@inheritDoc} */
@Override
public int hash(HashedSequence seq, int ptr) {
return seq.hashes[ptr];
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java
index bf6d967c5..8d120155a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java
@@ -44,7 +44,8 @@
package org.eclipse.jgit.diff;
/**
- * Wraps two {@link Sequence} instances to cache their element hash codes.
+ * Wraps two {@link org.eclipse.jgit.diff.Sequence} instances to cache their
+ * element hash codes.
* {
this.baseB = b;
}
- /** @return obtain a comparator that uses the cached hash codes. */
+ /**
+ * Get comparator
+ *
+ * @return obtain a comparator that uses the cached hash codes
+ */
public HashedSequenceComparator getComparator() {
return new HashedSequenceComparator<>(cmp);
}
- /** @return wrapper around A that includes cached hash codes. */
+ /**
+ * Get A
+ *
+ * @return wrapper around A that includes cached hash codes
+ */
public HashedSequence getA() {
if (cachedA == null)
cachedA = wrap(baseA);
return cachedA;
}
- /** @return wrapper around B that includes cached hash codes. */
+ /**
+ * Get B
+ *
+ * @return wrapper around B that includes cached hash codes
+ */
public HashedSequence getB() {
if (cachedB == null)
cachedB = wrap(baseB);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
index 4ef58455a..c1c6e9a6e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
@@ -85,8 +85,9 @@ import java.util.List;
* So long as {@link #setMaxChainLength(int)} is a small constant (such as 64),
* the algorithm runs in O(N * D) time, where N is the sum of the input lengths
* and D is the number of edits in the resulting EditList. If the supplied
- * {@link SequenceComparator} has a good hash function, this implementation
- * typically out-performs {@link MyersDiff}, even though its theoretical running
+ * {@link org.eclipse.jgit.diff.SequenceComparator} has a good hash function,
+ * this implementation typically out-performs
+ * {@link org.eclipse.jgit.diff.MyersDiff}, even though its theoretical running
* time is the same.
* void diffNonCommon(EditList edits,
HashedSequenceComparator cmp, HashedSequence a,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
index 55ceec801..9e5ff2555 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
@@ -43,8 +43,11 @@
package org.eclipse.jgit.diff;
-/** Compares two sequences primarily based upon hash codes. */
+/**
+ * Compares two sequences primarily based upon hash codes.
+ */
public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm {
+ /** {@inheritDoc} */
@Override
public EditList diffNonCommon(
SequenceComparator super S> cmp, S a, S b) {
@@ -67,10 +70,9 @@ public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm {
* proven to have no common starting or ending elements. The expected
* elimination of common starting and ending elements is automatically
* performed by the {@link #diff(SequenceComparator, Sequence, Sequence)}
- * method, which invokes this method using {@link Subsequence}s.
+ * method, which invokes this method using
+ * {@link org.eclipse.jgit.diff.Subsequence}s.
*
- * @param
- * type of sequence being compared.
* @param edits
* result list to append the region's edits onto.
* @param cmp
@@ -78,11 +80,13 @@ public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm {
* @param a
* the first (also known as old or pre-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}.
+ * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndA()}.
* @param b
* the second (also known as new or post-image) sequence. Edits
* returned by this algorithm will reference indexes using the
- * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}.
+ * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()},
+ * {@link org.eclipse.jgit.diff.Edit#getEndB()}.
* @param region
* the region being compared within the two sequences.
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
index a3860de04..646f264e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
@@ -557,7 +557,10 @@ if (k < beginK || k > endK)
}
/**
- * @param args two filenames specifying the contents to be diffed
+ * Main method
+ *
+ * @param args
+ * two filenames specifying the contents to be diffed
*/
public static void main(String[] args) {
if (args.length != 2) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
index 146b91040..7f6aa9ab0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
@@ -58,7 +58,9 @@ public class PatchIdDiffFormatter extends DiffFormatter {
private final MessageDigest digest;
- /** Initialize a formatter to compute a patch id. */
+ /**
+ * Initialize a formatter to compute a patch id.
+ */
public PatchIdDiffFormatter() {
super(new DigestOutputStream(NullOutputStream.INSTANCE,
Constants.newMessageDigest()));
@@ -74,12 +76,14 @@ public class PatchIdDiffFormatter extends DiffFormatter {
return ObjectId.fromRaw(digest.digest());
}
+ /** {@inheritDoc} */
@Override
protected void writeHunkHeader(int aStartLine, int aEndLine,
int bStartLine, int bEndLine) throws IOException {
// The hunk header is not taken into account for patch id calculation
}
+ /** {@inheritDoc} */
@Override
protected void formatIndexLine(OutputStream o, DiffEntry ent)
throws IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
index 656319dd7..7be165910 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -103,7 +103,7 @@ public class RawText extends Sequence {
*
* @param file
* the text file.
- * @throws IOException
+ * @throws java.io.IOException
* if Exceptions occur while reading the file
*/
public RawText(File file) throws IOException {
@@ -111,6 +111,7 @@ public class RawText extends Sequence {
}
/** @return total number of items in the sequence. */
+ /** {@inheritDoc} */
@Override
public int size() {
// The line map is always 2 entries larger than the number of lines in
@@ -135,7 +136,7 @@ public class RawText extends Sequence {
* @param i
* index of the line to extract. Note this is 0-based, so line
* number 1 is actually index 0.
- * @throws IOException
+ * @throws java.io.IOException
* the stream write operation failed.
*/
public void writeLine(final OutputStream out, final int i)
@@ -244,7 +245,7 @@ public class RawText extends Sequence {
* @param raw
* input stream containing the raw file content.
* @return true if raw is likely to be a binary file, false otherwise
- * @throws IOException
+ * @throws java.io.IOException
* if input stream could not be read
*/
public static boolean isBinary(InputStream raw) throws IOException {
@@ -301,17 +302,20 @@ public class RawText extends Sequence {
}
/**
- * Read a blob object into RawText, or throw BinaryBlobException if
- * the blob is binary.
+ * Read a blob object into RawText, or throw BinaryBlobException if the blob
+ * is binary.
*
* @param ldr
- * the ObjectLoader for the blob
+ * the ObjectLoader for the blob
* @param threshold
- * if the blob is larger than this size, it is always assumed to be binary.
+ * if the blob is larger than this size, it is always assumed to
+ * be binary.
* @since 4.10
* @return the RawText representing the blob.
- * @throws BinaryBlobException if the blob contains binary data.
- * @throws IOException if the input could not be read.
+ * @throws org.eclipse.jgit.errors.BinaryBlobException
+ * if the blob contains binary data.
+ * @throws java.io.IOException
+ * if the input could not be read.
*/
public static RawText load(ObjectLoader ldr, int threshold) throws IOException, BinaryBlobException {
long sz = ldr.getSize();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
index 2793fa2e8..ed2eebb85 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
@@ -50,7 +50,9 @@ import static org.eclipse.jgit.util.RawCharUtil.trimTrailingWhitespace;
import org.eclipse.jgit.util.IntList;
-/** Equivalence function for {@link RawText}. */
+/**
+ * Equivalence function for {@link org.eclipse.jgit.diff.RawText}.
+ */
public abstract class RawTextComparator extends SequenceComparator
* the base sequence type.
@@ -57,8 +58,6 @@ public final class Subsequence extends Sequence {
/**
* Construct a subsequence around the A region/base sequence.
*
- * @param
- * the base sequence type.
* @param a
* the A sequence.
* @param region
@@ -72,8 +71,6 @@ public final class Subsequence extends Sequence {
/**
* Construct a subsequence around the B region/base sequence.
*
- * @param
- * the base sequence type.
* @param b
* the B sequence.
* @param region
@@ -87,8 +84,6 @@ public final class Subsequence extends Sequence {
/**
* Adjust the Edit to reflect positions in the base sequence.
*
- * @param
- * the base sequence type.
* @param e
* edit to adjust in-place. Prior to invocation the indexes are
* in terms of the two subsequences; after invocation the indexes
@@ -110,8 +105,6 @@ public final class Subsequence extends Sequence {
/**
* Adjust the Edits to reflect positions in the base sequence.
*
- * @param
- * the base sequence type.
* @param edits
* edits to adjust in-place. Prior to invocation the indexes are
* in terms of the two subsequences; after invocation the indexes
@@ -156,6 +149,7 @@ public final class Subsequence extends Sequence {
this.size = end - begin;
}
+ /** {@inheritDoc} */
@Override
public int size() {
return size;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
index dff2a429e..9b3889b30 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
@@ -44,11 +44,13 @@
package org.eclipse.jgit.diff;
/**
- * Wrap another comparator for use with {@link Subsequence}.
+ * Wrap another comparator for use with
+ * {@link org.eclipse.jgit.diff.Subsequence}.
*
* the base sequence type.
@@ -67,11 +69,13 @@ public final class SubsequenceComparator extends
this.cmp = cmp;
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Subsequence a, int ai, Subsequence b, int bi) {
return cmp.equals(a.base, ai + a.begin, b.base, bi + b.begin);
}
+ /** {@inheritDoc} */
@Override
public int hash(Subsequence seq, int ptr) {
return cmp.hash(seq.base, ptr + seq.begin);