summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2020-12-15 02:00:17 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2020-12-15 02:00:17 +0100
commit3fc8da3a3ca875fba96de71f38b257444322415e (patch)
tree0bd5998658a425868739ad3a1ceb1705d2205b4d /org.eclipse.jgit
parentecad2dc0a62db9ea521aa67a09b48e23bb7cb2ba (diff)
downloadjgit-3fc8da3a3ca875fba96de71f38b257444322415e.tar.gz
jgit-3fc8da3a3ca875fba96de71f38b257444322415e.zip
LooseObjects: fix formatting
Change-Id: I992e5066d1dc4603e5bae991b26605d319f5cdc2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
index fefac36fa9..e7cb285c34 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java
@@ -32,8 +32,8 @@ import org.slf4j.LoggerFactory;
/**
* Traditional file system based loose objects handler.
* <p>
- * This is the loose object representation for a Git object database,
- * where objects are stored loose by hashing them into directories by their
+ * This is the loose object representation for a Git object database, where
+ * objects are stored loose by hashing them into directories by their
* {@link org.eclipse.jgit.lib.ObjectId}.
*/
class LooseObjects {
@@ -56,7 +56,7 @@ class LooseObjects {
}
/**
- * <p>Getter for the field <code>directory</code>.</p>
+ * Getter for the field <code>directory</code>.
*
* @return the location of the <code>objects</code> directory.
*/
@@ -105,7 +105,7 @@ class LooseObjects {
* maximum number of results to return. At most this many
* ObjectIds should be added to matches before returning.
* @return {@code true} if the matches were exhausted before reaching
- * {@code maxLimit}.
+ * {@code maxLimit}.
*/
boolean resolve(Set<ObjectId> matches, AbbreviatedObjectId id,
int matchLimit) {
@@ -113,24 +113,26 @@ class LooseObjects {
String[] entries = new File(directory, fanOut).list();
if (entries != null) {
for (String e : entries) {
- if (e.length() != Constants.OBJECT_ID_STRING_LENGTH - 2)
+ if (e.length() != Constants.OBJECT_ID_STRING_LENGTH - 2) {
continue;
+ }
try {
ObjectId entId = ObjectId.fromString(fanOut + e);
- if (id.prefixCompare(entId) == 0)
+ if (id.prefixCompare(entId) == 0) {
matches.add(entId);
+ }
} catch (IllegalArgumentException notId) {
continue;
}
- if (matches.size() > matchLimit)
+ if (matches.size() > matchLimit) {
return false;
+ }
}
}
return true;
}
- ObjectLoader open(WindowCursor curs, AnyObjectId id)
- throws IOException {
+ ObjectLoader open(WindowCursor curs, AnyObjectId id) throws IOException {
File path = fileFor(id);
try (FileInputStream in = new FileInputStream(path)) {
unpackedObjectCache.add(id);
@@ -144,8 +146,7 @@ class LooseObjects {
}
}
- long getSize(WindowCursor curs, AnyObjectId id)
- throws IOException {
+ long getSize(WindowCursor curs, AnyObjectId id) throws IOException {
File f = fileFor(id);
try (FileInputStream in = new FileInputStream(f)) {
unpackedObjectCache.add(id);
@@ -201,8 +202,7 @@ class LooseObjects {
}
}
- private InsertLooseObjectResult tryMove(File tmp, File dst,
- ObjectId id)
+ private InsertLooseObjectResult tryMove(File tmp, File dst, ObjectId id)
throws IOException {
Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst),
StandardCopyOption.ATOMIC_MOVE);