aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2018-05-14 18:42:02 +0200
committerJonathan Nieder <jrn@google.com>2018-05-15 17:05:02 -0400
commit6d370d837c5faa7caff2e6e3e4723b887f2fbdca (patch)
tree55e9259b4b3a85b567cc698ce3b3d4633df323cb /org.eclipse.jgit.lfs/src/org/eclipse/jgit
parentf6873ffe522bbc3536969a3a3546bf9a819b92bf (diff)
downloadjgit-6d370d837c5faa7caff2e6e3e4723b887f2fbdca.tar.gz
jgit-6d370d837c5faa7caff2e6e3e4723b887f2fbdca.zip
Remove 'final' in parameter lists
Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'org.eclipse.jgit.lfs/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java14
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java36
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java20
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java14
4 files changed, 42 insertions, 42 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
index 4529a25fc0..d268857914 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
@@ -78,7 +78,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
* the string to test.
* @return true if the string can converted into an AbbreviatedObjectId.
*/
- public static final boolean isId(final String id) {
+ public static final boolean isId(String id) {
if (id.length() < 2
|| Constants.LONG_OBJECT_ID_STRING_LENGTH < id.length())
return false;
@@ -138,7 +138,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
* the string to read from. Must be &lt;= 64 characters.
* @return the converted object id.
*/
- public static final AbbreviatedLongObjectId fromString(final String str) {
+ public static final AbbreviatedLongObjectId fromString(String str) {
if (str.length() > Constants.LONG_OBJECT_ID_STRING_LENGTH)
throw new IllegalArgumentException(
MessageFormat.format(LfsText.get().invalidLongId, str));
@@ -249,7 +249,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
* &gt;0 if this abbreviation names an object that is after
* <code>other</code>.
*/
- public final int prefixCompare(final AnyLongObjectId other) {
+ public final int prefixCompare(AnyLongObjectId other) {
int cmp;
cmp = NB.compareUInt64(w1, mask(1, other.w1));
@@ -281,7 +281,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
* &gt;0 if this abbreviation names an object that is after
* <code>other</code>.
*/
- public final int prefixCompare(final byte[] bs, final int p) {
+ public final int prefixCompare(byte[] bs, int p) {
int cmp;
cmp = NB.compareUInt64(w1, mask(1, NB.decodeInt64(bs, p)));
@@ -313,7 +313,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
* &gt;0 if this abbreviation names an object that is after
* <code>other</code>.
*/
- public final int prefixCompare(final long[] bs, final int p) {
+ public final int prefixCompare(long[] bs, int p) {
int cmp;
cmp = NB.compareUInt64(w1, mask(1, bs[p]));
@@ -340,7 +340,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
return (int) (w1 >>> 56);
}
- private long mask(final long word, final long v) {
+ private long mask(long word, long v) {
return mask(nibbles, word, v);
}
@@ -352,7 +352,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
/** {@inheritDoc} */
@Override
- public boolean equals(final Object o) {
+ public boolean equals(Object o) {
if (o instanceof AbbreviatedLongObjectId) {
final AbbreviatedLongObjectId b = (AbbreviatedLongObjectId) o;
return nibbles == b.nibbles && w1 == b.w1 && w2 == b.w2
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
index 96d6938529..cdb297eb1c 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
@@ -170,7 +170,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* Compare this LongObjectId to another and obtain a sort ordering.
*/
@Override
- public final int compareTo(final AnyLongObjectId other) {
+ public final int compareTo(AnyLongObjectId other) {
if (this == other)
return 0;
@@ -202,7 +202,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @return a negative integer, zero, or a positive integer as this object is
* less than, equal to, or greater than the specified object.
*/
- public final int compareTo(final byte[] bs, final int p) {
+ public final int compareTo(byte[] bs, int p) {
int cmp;
cmp = NB.compareUInt64(w1, NB.decodeInt64(bs, p));
@@ -231,7 +231,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @return a negative integer, zero, or a positive integer as this object is
* less than, equal to, or greater than the specified object.
*/
- public final int compareTo(final long[] bs, final int p) {
+ public final int compareTo(long[] bs, int p) {
int cmp;
cmp = NB.compareUInt64(w1, bs[p]);
@@ -257,7 +257,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @return true if this LongObjectId begins with the abbreviation; else
* false.
*/
- public boolean startsWith(final AbbreviatedLongObjectId abbr) {
+ public boolean startsWith(AbbreviatedLongObjectId abbr) {
return abbr.prefixCompare(this) == 0;
}
@@ -274,13 +274,13 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* the other id to compare to. May be null.
* @return true only if both LongObjectIds have identical bits.
*/
- public final boolean equals(final AnyLongObjectId other) {
+ public final boolean equals(AnyLongObjectId other) {
return other != null ? equals(this, other) : false;
}
/** {@inheritDoc} */
@Override
- public final boolean equals(final Object o) {
+ public final boolean equals(Object o) {
if (o instanceof AnyLongObjectId)
return equals((AnyLongObjectId) o);
else
@@ -293,7 +293,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param w
* the buffer to copy to. Must be in big endian order.
*/
- public void copyRawTo(final ByteBuffer w) {
+ public void copyRawTo(ByteBuffer w) {
w.putLong(w1);
w.putLong(w2);
w.putLong(w3);
@@ -308,7 +308,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param o
* the offset within b to write at.
*/
- public void copyRawTo(final byte[] b, final int o) {
+ public void copyRawTo(byte[] b, int o) {
NB.encodeInt64(b, o, w1);
NB.encodeInt64(b, o + 8, w2);
NB.encodeInt64(b, o + 16, w3);
@@ -323,7 +323,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param o
* the offset within b to write at.
*/
- public void copyRawTo(final long[] b, final int o) {
+ public void copyRawTo(long[] b, int o) {
b[o] = w1;
b[o + 1] = w2;
b[o + 2] = w3;
@@ -338,14 +338,14 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @throws java.io.IOException
* the stream writing failed.
*/
- public void copyRawTo(final OutputStream w) throws IOException {
+ public void copyRawTo(OutputStream w) throws IOException {
writeRawLong(w, w1);
writeRawLong(w, w2);
writeRawLong(w, w3);
writeRawLong(w, w4);
}
- private static void writeRawLong(final OutputStream w, long v)
+ private static void writeRawLong(OutputStream w, long v)
throws IOException {
w.write((int) (v >>> 56));
w.write((int) (v >>> 48));
@@ -365,7 +365,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @throws java.io.IOException
* the stream writing failed.
*/
- public void copyTo(final OutputStream w) throws IOException {
+ public void copyTo(OutputStream w) throws IOException {
w.write(toHexByteArray());
}
@@ -406,7 +406,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
private static final byte[] hexbyte = { '0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
- private static void formatHexByte(final byte[] dst, final int p, long w) {
+ private static void formatHexByte(byte[] dst, int p, long w) {
int o = p + 15;
while (o >= p && w != 0) {
dst[o--] = hexbyte[(int) (w & 0xf)];
@@ -424,7 +424,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @throws java.io.IOException
* the stream writing failed.
*/
- public void copyTo(final Writer w) throws IOException {
+ public void copyTo(Writer w) throws IOException {
w.write(toHexCharArray());
}
@@ -440,7 +440,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @throws java.io.IOException
* the stream writing failed.
*/
- public void copyTo(final char[] tmp, final Writer w) throws IOException {
+ public void copyTo(char[] tmp, Writer w) throws IOException {
toHexCharArray(tmp);
w.write(tmp, 0, Constants.LONG_OBJECT_ID_STRING_LENGTH);
}
@@ -455,7 +455,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param w
* the string to append onto.
*/
- public void copyTo(final char[] tmp, final StringBuilder w) {
+ public void copyTo(char[] tmp, StringBuilder w) {
toHexCharArray(tmp);
w.append(tmp, 0, Constants.LONG_OBJECT_ID_STRING_LENGTH);
}
@@ -466,7 +466,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
return dst;
}
- private void toHexCharArray(final char[] dst) {
+ private void toHexCharArray(char[] dst) {
formatHexChar(dst, 0, w1);
formatHexChar(dst, 16, w2);
formatHexChar(dst, 32, w3);
@@ -524,7 +524,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* length of the abbreviated string.
* @return SHA-256 abbreviation.
*/
- public AbbreviatedLongObjectId abbreviate(final int len) {
+ public AbbreviatedLongObjectId abbreviate(int len) {
final long a = AbbreviatedLongObjectId.mask(len, 1, w1);
final long b = AbbreviatedLongObjectId.mask(len, 2, w2);
final long c = AbbreviatedLongObjectId.mask(len, 3, w3);
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
index ec1e1791db..8159576c03 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
@@ -90,7 +90,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* the string to test.
* @return true if the string can converted into an LongObjectId.
*/
- public static final boolean isId(final String id) {
+ public static final boolean isId(String id) {
if (id.length() != Constants.LONG_OBJECT_ID_STRING_LENGTH)
return false;
try {
@@ -110,7 +110,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* the id to convert. May be null.
* @return the hex string conversion of this id's content.
*/
- public static final String toString(final LongObjectId i) {
+ public static final String toString(LongObjectId i) {
return i != null ? i.name() : ZEROID_STR;
}
@@ -173,7 +173,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* available within this byte array.
* @return the converted object id.
*/
- public static final LongObjectId fromRaw(final byte[] bs) {
+ public static final LongObjectId fromRaw(byte[] bs) {
return fromRaw(bs, 0);
}
@@ -187,7 +187,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* position to read the first byte of data from.
* @return the converted object id.
*/
- public static final LongObjectId fromRaw(final byte[] bs, final int p) {
+ public static final LongObjectId fromRaw(byte[] bs, int p) {
final long a = NB.decodeInt64(bs, p);
final long b = NB.decodeInt64(bs, p + 8);
final long c = NB.decodeInt64(bs, p + 16);
@@ -203,7 +203,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* available within this long array.
* @return the converted object id.
*/
- public static final LongObjectId fromRaw(final long[] is) {
+ public static final LongObjectId fromRaw(long[] is) {
return fromRaw(is, 0);
}
@@ -217,7 +217,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* position to read the first long of data from.
* @return the converted object id.
*/
- public static final LongObjectId fromRaw(final long[] is, final int p) {
+ public static final LongObjectId fromRaw(long[] is, int p) {
return new LongObjectId(is[p], is[p + 1], is[p + 2], is[p + 3]);
}
@@ -231,7 +231,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* position to read the first character from.
* @return the converted object id.
*/
- public static final LongObjectId fromString(final byte[] buf, final int offset) {
+ public static final LongObjectId fromString(byte[] buf, int offset) {
return fromHexString(buf, offset);
}
@@ -242,14 +242,14 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* the string to read from. Must be 64 characters long.
* @return the converted object id.
*/
- public static LongObjectId fromString(final String str) {
+ public static LongObjectId fromString(String str) {
if (str.length() != Constants.LONG_OBJECT_ID_STRING_LENGTH)
throw new InvalidLongObjectIdException(str);
return fromHexString(org.eclipse.jgit.lib.Constants.encodeASCII(str),
0);
}
- private static final LongObjectId fromHexString(final byte[] bs, int p) {
+ private static final LongObjectId fromHexString(byte[] bs, int p) {
try {
final long a = RawParseUtils.parseHexInt64(bs, p);
final long b = RawParseUtils.parseHexInt64(bs, p + 16);
@@ -280,7 +280,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
* @param src
* another already parsed LongObjectId to copy the value out of.
*/
- protected LongObjectId(final AnyLongObjectId src) {
+ protected LongObjectId(AnyLongObjectId src) {
w1 = src.w1;
w2 = src.w2;
w3 = src.w3;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
index 7b0c49444a..3d62490bfe 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
@@ -167,7 +167,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
* the raw byte buffer to read from. At least 32 bytes must be
* available within this byte array.
*/
- public void fromRaw(final byte[] bs) {
+ public void fromRaw(byte[] bs) {
fromRaw(bs, 0);
}
@@ -180,7 +180,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
* @param p
* position to read the first byte of data from.
*/
- public void fromRaw(final byte[] bs, final int p) {
+ public void fromRaw(byte[] bs, int p) {
w1 = NB.decodeInt64(bs, p);
w2 = NB.decodeInt64(bs, p + 8);
w3 = NB.decodeInt64(bs, p + 16);
@@ -194,7 +194,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
* the raw long buffer to read from. At least 4 longs must be
* available within this longs array.
*/
- public void fromRaw(final long[] longs) {
+ public void fromRaw(long[] longs) {
fromRaw(longs, 0);
}
@@ -207,7 +207,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
* @param p
* position to read the first integer of data from.
*/
- public void fromRaw(final long[] longs, final int p) {
+ public void fromRaw(long[] longs, int p) {
w1 = longs[p];
w2 = longs[p + 1];
w3 = longs[p + 2];
@@ -223,7 +223,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
* @param offset
* position to read the first character from.
*/
- public void fromString(final byte[] buf, final int offset) {
+ public void fromString(byte[] buf, int offset) {
fromHexString(buf, offset);
}
@@ -233,14 +233,14 @@ public class MutableLongObjectId extends AnyLongObjectId {
* @param str
* the string to read from. Must be 64 characters long.
*/
- public void fromString(final String str) {
+ public void fromString(String str) {
if (str.length() != Constants.LONG_OBJECT_ID_STRING_LENGTH)
throw new IllegalArgumentException(
MessageFormat.format(LfsText.get().invalidLongId, str));
fromHexString(org.eclipse.jgit.lib.Constants.encodeASCII(str), 0);
}
- private void fromHexString(final byte[] bs, int p) {
+ private void fromHexString(byte[] bs, int p) {
try {
w1 = RawParseUtils.parseHexInt64(bs, p);
w2 = RawParseUtils.parseHexInt64(bs, p + 16);