diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2022-03-06 18:52:59 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-03-06 18:52:59 +0100 |
commit | 72bba7bd53389407037ef63a14bab6aa5e6bc3ef (patch) | |
tree | 71e8b0242c2fed93be7ad0f30c8cdc7eb2cac0e3 /org.eclipse.jgit | |
parent | 8a2c76941729629dce06e2238464e114f2ccc79a (diff) | |
download | jgit-72bba7bd53389407037ef63a14bab6aa5e6bc3ef.tar.gz jgit-72bba7bd53389407037ef63a14bab6aa5e6bc3ef.zip |
Don't use final for method parameters
See https://wiki.eclipse.org/EGit/Contributor_Guide#Use_of_the_.22final.22_modifier
Change-Id: Idc6ed85483e381689e5085c4a1bacd75d26f5489
Diffstat (limited to 'org.eclipse.jgit')
3 files changed, 14 insertions, 20 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java index c76cee6984..942dad46e0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java @@ -77,9 +77,8 @@ class PushProcess { * been gotten * @throws TransportException */ - PushProcess(final Transport transport, - final Collection<RemoteRefUpdate> toPush, PrePushHook prePush) - throws TransportException { + PushProcess(Transport transport, Collection<RemoteRefUpdate> toPush, + PrePushHook prePush) throws TransportException { this(transport, toPush, prePush, null); } @@ -98,9 +97,8 @@ class PushProcess { * OutputStream to write messages to * @throws TransportException */ - PushProcess(final Transport transport, - final Collection<RemoteRefUpdate> toPush, PrePushHook prePush, - OutputStream out) throws TransportException { + PushProcess(Transport transport, Collection<RemoteRefUpdate> toPush, + PrePushHook prePush, OutputStream out) throws TransportException { this.walker = new RevWalk(transport.local); this.transport = transport; this.toPush = new LinkedHashMap<>(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java index 51fda84f33..56d0036a20 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java @@ -349,8 +349,7 @@ public class RefSpec implements Serializable { * The wildcard status of the new source disagrees with the * wildcard status of the new destination. */ - public RefSpec setSourceDestination(final String source, - final String destination) { + public RefSpec setSourceDestination(String source, String destination) { if (isWildcard(source) != isWildcard(destination)) throw new IllegalStateException(JGitText.get().sourceDestinationMustMatch); final RefSpec r = new RefSpec(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java index b90ae813e4..218e62c10a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java @@ -165,9 +165,8 @@ public class RemoteRefUpdate { * @throws java.lang.IllegalArgumentException * if some required parameter was null */ - public RemoteRefUpdate(final Repository localDb, final String srcRef, - final String remoteName, final boolean forceUpdate, - final String localName, final ObjectId expectedOldObjectId) + public RemoteRefUpdate(Repository localDb, String srcRef, String remoteName, + boolean forceUpdate, String localName, ObjectId expectedOldObjectId) throws IOException { this(localDb, srcRef, srcRef != null ? localDb.resolve(srcRef) : ObjectId.zeroId(), remoteName, forceUpdate, localName, @@ -211,9 +210,8 @@ public class RemoteRefUpdate { * @throws java.lang.IllegalArgumentException * if some required parameter was null */ - public RemoteRefUpdate(final Repository localDb, final Ref srcRef, - final String remoteName, final boolean forceUpdate, - final String localName, final ObjectId expectedOldObjectId) + public RemoteRefUpdate(Repository localDb, Ref srcRef, String remoteName, + boolean forceUpdate, String localName, ObjectId expectedOldObjectId) throws IOException { this(localDb, srcRef != null ? srcRef.getName() : null, srcRef != null ? srcRef.getObjectId() : null, remoteName, @@ -263,10 +261,9 @@ public class RemoteRefUpdate { * @throws java.lang.IllegalArgumentException * if some required parameter was null */ - public RemoteRefUpdate(final Repository localDb, final String srcRef, - final ObjectId srcId, final String remoteName, - final boolean forceUpdate, final String localName, - final ObjectId expectedOldObjectId) throws IOException { + public RemoteRefUpdate(Repository localDb, String srcRef, ObjectId srcId, + String remoteName, boolean forceUpdate, String localName, + ObjectId expectedOldObjectId) throws IOException { this(localDb, srcRef, srcId, remoteName, forceUpdate, localName, null, expectedOldObjectId); } @@ -339,8 +336,8 @@ public class RemoteRefUpdate { * local tracking branch or srcRef of base object no longer can * be resolved to any object. */ - public RemoteRefUpdate(final RemoteRefUpdate base, - final ObjectId newExpectedOldObjectId) throws IOException { + public RemoteRefUpdate(RemoteRefUpdate base, + ObjectId newExpectedOldObjectId) throws IOException { this(base.localDb, base.srcRef, base.newObjectId, base.remoteName, base.forceUpdate, (base.trackingRefUpdate == null ? null : base.trackingRefUpdate |