aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-12-18 13:25:04 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2017-12-18 13:25:04 +0100
commit6dca3cc024ee92b57777448d83134a466e658daa (patch)
tree2f6556143572d193f306cbe57e29e3e2fc403fb7
parent107c71a6e6937c0a2d2fe604960eb9d7f1de33c3 (diff)
downloadjgit-6dca3cc024ee92b57777448d83134a466e658daa.tar.gz
jgit-6dca3cc024ee92b57777448d83134a466e658daa.zip
Fix javadoc in org.eclipse.jgit internal and fsck packages
Change-Id: Ib12da10aacda9389d594bf4f521e9a58d1935701 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java33
3 files changed, 54 insertions, 9 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index 6b48bdea0c..35c8076b3d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -53,6 +53,8 @@ import org.eclipse.jgit.nls.TranslationBundle;
public class JGitText extends TranslationBundle {
/**
+ * Get an instance of this translation bundle
+ *
* @return an instance of this translation bundle
*/
public static JGitText get() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java
index 588ed9bf8a..131b0048ae 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java
@@ -51,7 +51,9 @@ import org.eclipse.jgit.errors.CorruptPackIndexException.ErrorType;
import org.eclipse.jgit.lib.ObjectChecker;
import org.eclipse.jgit.lib.ObjectId;
-/** Holds all fsck errors of a git repository. */
+/**
+ * Holds all fsck errors of a git repository.
+ */
public class FsckError {
/** Represents a corrupt object. */
public static class CorruptObject {
@@ -130,22 +132,38 @@ public class FsckError {
private final Set<String> nonCommitHeads = new HashSet<>();
- /** @return corrupt objects from all pack files. */
+ /**
+ * Get corrupt objects from all pack files
+ *
+ * @return corrupt objects from all pack files
+ */
public Set<CorruptObject> getCorruptObjects() {
return corruptObjects;
}
- /** @return missing objects that should present in pack files. */
+ /**
+ * Get missing objects that should present in pack files
+ *
+ * @return missing objects that should present in pack files
+ */
public Set<ObjectId> getMissingObjects() {
return missingObjects;
}
- /** @return corrupt index files associated with the packs. */
+ /**
+ * Get corrupt index files associated with the packs
+ *
+ * @return corrupt index files associated with the packs
+ */
public Set<CorruptIndex> getCorruptIndices() {
return corruptIndices;
}
- /** @return refs/heads/* point to non-commit object. */
+ /**
+ * Get refs/heads/* which point to non-commit object
+ *
+ * @return refs/heads/* which point to non-commit object
+ */
public Set<String> getNonCommitHeads() {
return nonCommitHeads;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java
index 3a678a72df..5397ba4798 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java
@@ -62,13 +62,14 @@ import org.eclipse.jgit.internal.storage.dfs.ReadableChannel;
import org.eclipse.jgit.internal.storage.file.PackIndex;
import org.eclipse.jgit.internal.storage.file.PackIndex.MutableEntry;
import org.eclipse.jgit.lib.AnyObjectId;
-import org.eclipse.jgit.lib.ObjectChecker;
import org.eclipse.jgit.lib.ObjectDatabase;
import org.eclipse.jgit.lib.ObjectIdOwnerMap;
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
-/** A read-only pack parser for object validity checking. */
+/**
+ * A read-only pack parser for object validity checking.
+ */
public class FsckPackParser extends PackParser {
private final CRC32 crc;
@@ -83,6 +84,8 @@ public class FsckPackParser extends PackParser {
private int blockSize;
/**
+ * Constructor for FsckPackParser
+ *
* @param db
* the object database which stores repository's data.
* @param channel
@@ -96,6 +99,7 @@ public class FsckPackParser extends PackParser {
this.blockSize = channel.blockSize() > 0 ? channel.blockSize() : 65536;
}
+ /** {@inheritDoc} */
@Override
protected void onPackHeader(long objCnt) throws IOException {
if (expectedObjectCount >= 0) {
@@ -107,41 +111,48 @@ public class FsckPackParser extends PackParser {
}
}
+ /** {@inheritDoc} */
@Override
protected void onBeginWholeObject(long streamPosition, int type,
long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected void onObjectHeader(Source src, byte[] raw, int pos, int len)
throws IOException {
crc.update(raw, pos, len);
}
+ /** {@inheritDoc} */
@Override
protected void onObjectData(Source src, byte[] raw, int pos, int len)
throws IOException {
crc.update(raw, pos, len);
}
+ /** {@inheritDoc} */
@Override
protected void onEndWholeObject(PackedObjectInfo info) throws IOException {
info.setCRC((int) crc.getValue());
}
+ /** {@inheritDoc} */
@Override
protected void onBeginOfsDelta(long deltaStreamPosition,
long baseStreamPosition, long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected void onBeginRefDelta(long deltaStreamPosition, AnyObjectId baseId,
long inflatedSize) throws IOException {
crc.reset();
}
+ /** {@inheritDoc} */
@Override
protected UnresolvedDelta onEndDelta() throws IOException {
UnresolvedDelta delta = new UnresolvedDelta();
@@ -149,12 +160,14 @@ public class FsckPackParser extends PackParser {
return delta;
}
+ /** {@inheritDoc} */
@Override
protected void onInflatedObjectData(PackedObjectInfo obj, int typeCode,
byte[] data) throws IOException {
// FsckPackParser ignores this event.
}
+ /** {@inheritDoc} */
@Override
protected void verifySafeObject(final AnyObjectId id, final int type,
final byte[] data) {
@@ -170,11 +183,13 @@ public class FsckPackParser extends PackParser {
}
}
+ /** {@inheritDoc} */
@Override
protected void onPackFooter(byte[] hash) throws IOException {
// Do nothing.
}
+ /** {@inheritDoc} */
@Override
protected boolean onAppendBase(int typeCode, byte[] data,
PackedObjectInfo info) throws IOException {
@@ -182,11 +197,13 @@ public class FsckPackParser extends PackParser {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void onEndThinPack() throws IOException {
// Do nothing.
}
+ /** {@inheritDoc} */
@Override
protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj,
ObjectTypeAndSize info) throws IOException {
@@ -195,6 +212,7 @@ public class FsckPackParser extends PackParser {
return readObjectHeader(info);
}
+ /** {@inheritDoc} */
@Override
protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta,
ObjectTypeAndSize info) throws IOException {
@@ -203,6 +221,7 @@ public class FsckPackParser extends PackParser {
return readObjectHeader(info);
}
+ /** {@inheritDoc} */
@Override
protected int readDatabase(byte[] dst, int pos, int cnt)
throws IOException {
@@ -247,11 +266,13 @@ public class FsckPackParser extends PackParser {
return buf.array();
}
+ /** {@inheritDoc} */
@Override
protected boolean checkCRC(int oldCRC) {
return oldCRC == (int) crc.getValue();
}
+ /** {@inheritDoc} */
@Override
protected void onStoreStream(byte[] raw, int pos, int len)
throws IOException {
@@ -259,7 +280,11 @@ public class FsckPackParser extends PackParser {
}
/**
- * @return corrupt objects that reported by {@link ObjectChecker}.
+ * Get corrupt objects reported by
+ * {@link org.eclipse.jgit.lib.ObjectChecker}
+ *
+ * @return corrupt objects that are reported by
+ * {@link org.eclipse.jgit.lib.ObjectChecker}.
*/
public Set<CorruptObject> getCorruptObjects() {
return corruptObjects;
@@ -270,7 +295,7 @@ public class FsckPackParser extends PackParser {
*
* @param idx
* index file associate with the pack
- * @throws CorruptPackIndexException
+ * @throws org.eclipse.jgit.errors.CorruptPackIndexException
* when the index file is corrupt.
*/
public void verifyIndex(PackIndex idx)