Don't use final for method parameters

See https://wiki.eclipse.org/EGit/Contributor_Guide#Use_of_the_.22final.22_modifier

Change-Id: Idc6ed85483e381689e5085c4a1bacd75d26f5489
This commit is contained in:
Matthias Sohn 2022-03-06 18:52:59 +01:00
parent 8a2c769417
commit 72bba7bd53
3 changed files with 14 additions and 20 deletions

View File

@ -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<>();

View File

@ -349,8 +349,7 @@ public RefSpec setDestination(String destination) {
* 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);

View File

@ -165,9 +165,8 @@ public enum Status {
* @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 RemoteRefUpdate(final Repository localDb, final String srcRef,
* @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 RemoteRefUpdate(final Repository localDb, final Ref srcRef,
* @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 @@ private RemoteRefUpdate(Repository localDb, String srcRef, ObjectId srcId,
* 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