Browse Source

Remove unnecessary modifiers from interfaces

From Oracle's "Defining an interface":

"All abstract, default, and static methods in an interface are
implicitly public, so you can omit the public modifier."

(Without any modifier, the interface methods are also abstract, so we
omit also the "abstract")

"In addition, an interface can contain constant declarations. All
constant values defined in an interface are implicitly public, static,
and final. Once again, you can omit these modifiers."

This makes the code more consistent. Now all interfaces under
org.eclipse.jgit follow the guidelines.

Change-Id: I4fe6deb111899ec1b4318ab5a6050f3851fa1fd3
Signed-off-by: Ivan Frade <ifrade@google.com>
stable-5.2
Ivan Frade 6 years ago
parent
commit
d9ac7ddf10
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNodeProvider.java
  3. 2
      org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesProvider.java
  4. 4
      org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandFactory.java
  5. 2
      org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java
  6. 8
      org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectLoaderQueue.java
  7. 8
      org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectSizeQueue.java
  8. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncOperation.java
  9. 2
      org.eclipse.jgit/src/org/eclipse/jgit/lib/BlobObjectChecker.java
  10. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/CheckoutEntry.java
  11. 2
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ProgressMonitor.java
  12. 18
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java
  13. 16
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogEntry.java
  14. 10
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java
  15. 2
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AsyncRevObjectQueue.java
  16. 12
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java
  17. 6
      org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java
  18. 12
      org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java
  19. 12
      org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java
  20. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java
  21. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java
  22. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java
  23. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java
  24. 8
      org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java
  25. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java
  26. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java
  27. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundle.java
  28. 62
      org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java
  29. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java
  30. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java
  31. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java
  32. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java

2
org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java

@ -68,5 +68,5 @@ public interface TransportConfigCallback {
* @param transport
* a {@link org.eclipse.jgit.transport.Transport} object.
*/
public void configure(Transport transport);
void configure(Transport transport);
}

4
org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNodeProvider.java

@ -63,7 +63,7 @@ public interface AttributesNodeProvider {
* @throws java.io.IOException
* if an error is raised while parsing the attributes file
*/
public AttributesNode getInfoAttributesNode() throws IOException;
AttributesNode getInfoAttributesNode() throws IOException;
/**
* Retrieve the {@link org.eclipse.jgit.attributes.AttributesNode} that
@ -76,6 +76,6 @@ public interface AttributesNodeProvider {
* attributes file
* @see CoreConfig#getAttributesFile()
*/
public AttributesNode getGlobalAttributesNode() throws IOException;
AttributesNode getGlobalAttributesNode() throws IOException;
}

2
org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesProvider.java

@ -53,5 +53,5 @@ public interface AttributesProvider {
*
* @return the currently active attributes
*/
public Attributes getAttributes();
Attributes getAttributes();
}

4
org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandFactory.java

@ -69,7 +69,7 @@ public interface FilterCommandFactory {
* thrown when the command constructor throws an
* java.io.IOException
*/
public FilterCommand create(Repository db, InputStream in,
OutputStream out) throws IOException;
FilterCommand create(Repository db, InputStream in, OutputStream out)
throws IOException;
}

2
org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java

@ -54,5 +54,5 @@ interface Head {
* the character which decides which heads are returned.
* @return a list of heads based on the input.
*/
public abstract List<Head> getNextHeads(char c);
List<Head> getNextHeads(char c);
}

8
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectLoaderQueue.java

@ -78,7 +78,7 @@ public interface AsyncObjectLoaderQueue<T extends ObjectId> extends
* @throws java.io.IOException
* the object store cannot be accessed.
*/
public boolean next() throws MissingObjectException, IOException;
boolean next() throws MissingObjectException, IOException;
/**
* Get the current object, null if the implementation lost track.
@ -87,14 +87,14 @@ public interface AsyncObjectLoaderQueue<T extends ObjectId> extends
* Implementations may for performance reasons discard the caller's
* ObjectId and provider their own through {@link #getObjectId()}.
*/
public T getCurrent();
T getCurrent();
/**
* Get the ObjectId of the current object. Never null.
*
* @return the ObjectId of the current object. Never null.
*/
public ObjectId getObjectId();
ObjectId getObjectId();
/**
* Obtain a loader to read the object.
@ -115,5 +115,5 @@ public interface AsyncObjectLoaderQueue<T extends ObjectId> extends
* @throws java.io.IOException
* the object store cannot be accessed.
*/
public ObjectLoader open() throws IOException;
ObjectLoader open() throws IOException;
}

8
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncObjectSizeQueue.java

@ -73,7 +73,7 @@ public interface AsyncObjectSizeQueue<T extends ObjectId> extends
* @throws java.io.IOException
* the object store cannot be accessed.
*/
public boolean next() throws MissingObjectException, IOException;
boolean next() throws MissingObjectException, IOException;
/**
* <p>getCurrent.</p>
@ -82,19 +82,19 @@ public interface AsyncObjectSizeQueue<T extends ObjectId> extends
* Implementations may for performance reasons discard the caller's
* ObjectId and provider their own through {@link #getObjectId()}.
*/
public T getCurrent();
T getCurrent();
/**
* Get the ObjectId of the current object. Never null.
*
* @return the ObjectId of the current object. Never null.
*/
public ObjectId getObjectId();
ObjectId getObjectId();
/**
* Get the size of the current object.
*
* @return the size of the current object.
*/
public long getSize();
long getSize();
}

4
org.eclipse.jgit/src/org/eclipse/jgit/lib/AsyncOperation.java

@ -68,10 +68,10 @@ public interface AsyncOperation {
* @return false if the task could not be cancelled, typically because it
* has already completed normally; true otherwise
*/
public boolean cancel(boolean mayInterruptIfRunning);
boolean cancel(boolean mayInterruptIfRunning);
/**
* Release resources used by the operation, including cancellation.
*/
public void release();
void release();
}

2
org.eclipse.jgit/src/org/eclipse/jgit/lib/BlobObjectChecker.java

@ -55,7 +55,7 @@ import org.eclipse.jgit.errors.CorruptObjectException;
*/
public interface BlobObjectChecker {
/** No-op implementation of {@link BlobObjectChecker}. */
public static final BlobObjectChecker NULL_CHECKER =
BlobObjectChecker NULL_CHECKER =
new BlobObjectChecker() {
@Override
public void update(byte[] in, int p, int len) {

4
org.eclipse.jgit/src/org/eclipse/jgit/lib/CheckoutEntry.java

@ -12,13 +12,13 @@ public interface CheckoutEntry {
*
* @return the name of the branch before checkout
*/
public abstract String getFromBranch();
String getFromBranch();
/**
* Get the name of the branch after checkout
*
* @return the name of the branch after checkout
*/
public abstract String getToBranch();
String getToBranch();
}

2
org.eclipse.jgit/src/org/eclipse/jgit/lib/ProgressMonitor.java

@ -49,7 +49,7 @@ package org.eclipse.jgit.lib;
*/
public interface ProgressMonitor {
/** Constant indicating the total work units cannot be predicted. */
public static final int UNKNOWN = 0;
int UNKNOWN = 0;
/**
* Advise the monitor of the total number of subtasks.

18
org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java

@ -61,7 +61,7 @@ import org.eclipse.jgit.annotations.Nullable;
*/
public interface Ref {
/** Location where a {@link Ref} is stored. */
public static enum Storage {
enum Storage {
/**
* The ref does not exist yet, updating it may create it.
* <p>
@ -131,7 +131,7 @@ public interface Ref {
* @return name of this ref.
*/
@NonNull
public String getName();
String getName();
/**
* Test if this reference is a symbolic reference.
@ -144,7 +144,7 @@ public interface Ref {
* @return true if this is a symbolic reference; false if this reference
* contains its own ObjectId.
*/
public abstract boolean isSymbolic();
boolean isSymbolic();
/**
* Traverse target references until {@link #isSymbolic()} is false.
@ -163,7 +163,7 @@ public interface Ref {
* @return the reference that actually stores the ObjectId value.
*/
@NonNull
public abstract Ref getLeaf();
Ref getLeaf();
/**
* Get the reference this reference points to, or {@code this}.
@ -178,7 +178,7 @@ public interface Ref {
* @return the target reference, or {@code this}.
*/
@NonNull
public abstract Ref getTarget();
Ref getTarget();
/**
* Cached value of this ref.
@ -188,7 +188,7 @@ public interface Ref {
* symbolic ref pointing to an unborn branch.
*/
@Nullable
public abstract ObjectId getObjectId();
ObjectId getObjectId();
/**
* Cached value of <code>ref^{}</code> (the ref peeled to commit).
@ -198,14 +198,14 @@ public interface Ref {
* does not refer to an annotated tag.
*/
@Nullable
public abstract ObjectId getPeeledObjectId();
ObjectId getPeeledObjectId();
/**
* Whether the Ref represents a peeled tag.
*
* @return whether the Ref represents a peeled tag.
*/
public abstract boolean isPeeled();
boolean isPeeled();
/**
* How was this ref obtained?
@ -216,5 +216,5 @@ public interface Ref {
* @return type of ref.
*/
@NonNull
public abstract Storage getStorage();
Storage getStorage();
}

16
org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogEntry.java

@ -57,7 +57,7 @@ public interface ReflogEntry {
*
* @since 4.9
*/
public static final String PREFIX_CREATED = "created"; //$NON-NLS-1$
String PREFIX_CREATED = "created"; //$NON-NLS-1$
/**
* Prefix used in reflog messages when the ref was updated with a fast
@ -69,7 +69,7 @@ public interface ReflogEntry {
*
* @since 4.9
*/
public static final String PREFIX_FAST_FORWARD = "fast-forward"; //$NON-NLS-1$
String PREFIX_FAST_FORWARD = "fast-forward"; //$NON-NLS-1$
/**
* Prefix used in reflog messages when the ref was force updated.
@ -80,35 +80,35 @@ public interface ReflogEntry {
*
* @since 4.9
*/
public static final String PREFIX_FORCED_UPDATE = "forced-update"; //$NON-NLS-1$
String PREFIX_FORCED_UPDATE = "forced-update"; //$NON-NLS-1$
/**
* Get the commit id before the change
*
* @return the commit id before the change
*/
public abstract ObjectId getOldId();
ObjectId getOldId();
/**
* Get the commit id after the change
*
* @return the commit id after the change
*/
public abstract ObjectId getNewId();
ObjectId getNewId();
/**
* Get user performing the change
*
* @return user performing the change
*/
public abstract PersonIdent getWho();
PersonIdent getWho();
/**
* Get textual description of the change
*
* @return textual description of the change
*/
public abstract String getComment();
String getComment();
/**
* Parse checkout
@ -117,6 +117,6 @@ public interface ReflogEntry {
* information about a branch switch, or null if the entry is not a
* checkout
*/
public abstract CheckoutEntry parseCheckout();
CheckoutEntry parseCheckout();
}

10
org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java

@ -59,7 +59,7 @@ public interface ReflogReader {
* @return the latest reflog entry, or null if no log
* @throws java.io.IOException
*/
public abstract ReflogEntry getLastEntry() throws IOException;
ReflogEntry getLastEntry() throws IOException;
/**
* Get all reflog entries in reverse order
@ -67,7 +67,7 @@ public interface ReflogReader {
* @return all reflog entries in reverse order
* @throws java.io.IOException
*/
public abstract List<ReflogEntry> getReverseEntries() throws IOException;
List<ReflogEntry> getReverseEntries() throws IOException;
/**
* Get specific entry in the reflog relative to the last entry which is
@ -77,7 +77,7 @@ public interface ReflogReader {
* @return reflog entry or null if not found
* @throws java.io.IOException
*/
public abstract ReflogEntry getReverseEntry(int number) throws IOException;
ReflogEntry getReverseEntry(int number) throws IOException;
/**
* Get all reflog entries in reverse order
@ -87,7 +87,5 @@ public interface ReflogReader {
* @return all reflog entries in reverse order
* @throws java.io.IOException
*/
public abstract List<ReflogEntry> getReverseEntries(int max)
throws IOException;
List<ReflogEntry> getReverseEntries(int max) throws IOException;
}

2
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AsyncRevObjectQueue.java

@ -66,5 +66,5 @@ public interface AsyncRevObjectQueue extends AsyncOperation {
* @throws java.io.IOException
* the object store cannot be accessed.
*/
public RevObject next() throws MissingObjectException, IOException;
RevObject next() throws MissingObjectException, IOException;
}

12
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java

@ -65,14 +65,14 @@ public interface DepthWalk {
*
* @return Depth to filter to.
*/
public int getDepth();
int getDepth();
/**
* @return the deepen-since value; if not 0, this walk only returns commits
* whose commit time is at or after this limit
* @since 5.2
*/
public default int getDeepenSince() {
default int getDeepenSince() {
return 0;
}
@ -80,7 +80,7 @@ public interface DepthWalk {
* @return the objects specified by the client using --shallow-exclude
* @since 5.2
*/
public default List<ObjectId> getDeepenNots() {
default List<ObjectId> getDeepenNots() {
return Collections.emptyList();
}
@ -90,20 +90,20 @@ public interface DepthWalk {
*
* @return flag marking commits that should become unshallow.
*/
public RevFlag getUnshallowFlag();
RevFlag getUnshallowFlag();
/**
* Get flag marking commits that are interesting again.
*
* @return flag marking commits that are interesting again.
*/
public RevFlag getReinterestingFlag();
RevFlag getReinterestingFlag();
/**
* @return flag marking commits that are to be excluded because of --shallow-exclude
* @since 5.2
*/
public RevFlag getDeepenNotFlag();
RevFlag getDeepenNotFlag();
/** RevCommit with a depth (in commits) from a root. */
public static class Commit extends RevCommit {

6
org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java

@ -55,7 +55,7 @@ public interface AdvertiseRefsHook {
* {@link UploadPack#setAdvertisedRefs(java.util.Map)} and
* {@link BaseReceivePack#setAdvertisedRefs(java.util.Map,java.util.Set)}.
*/
public static final AdvertiseRefsHook DEFAULT = new AdvertiseRefsHook() {
AdvertiseRefsHook DEFAULT = new AdvertiseRefsHook() {
@Override
public void advertiseRefs(UploadPack uploadPack) {
// Do nothing.
@ -77,7 +77,7 @@ public interface AdvertiseRefsHook {
* @throws org.eclipse.jgit.transport.ServiceMayNotContinueException
* abort; the message will be sent to the user.
*/
public void advertiseRefs(UploadPack uploadPack)
void advertiseRefs(UploadPack uploadPack)
throws ServiceMayNotContinueException;
/**
@ -90,6 +90,6 @@ public interface AdvertiseRefsHook {
* @throws org.eclipse.jgit.transport.ServiceMayNotContinueException
* abort; the message will be sent to the user.
*/
public void advertiseRefs(BaseReceivePack receivePack)
void advertiseRefs(BaseReceivePack receivePack)
throws ServiceMayNotContinueException;
}

12
org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java

@ -68,7 +68,7 @@ public interface Connection extends AutoCloseable {
* modifiable. The collection can be empty if the remote side has no
* refs (it is an empty/newly created repository).
*/
public Map<String, Ref> getRefsMap();
Map<String, Ref> getRefsMap();
/**
* Get the complete list of refs advertised as available for fetching or
@ -82,7 +82,7 @@ public interface Connection extends AutoCloseable {
* collection can be empty if the remote side has no refs (it is an
* empty/newly created repository).
*/
public Collection<Ref> getRefs();
Collection<Ref> getRefs();
/**
* Get a single advertised ref by name.
@ -95,7 +95,7 @@ public interface Connection extends AutoCloseable {
* name of the ref to obtain.
* @return the requested ref; null if the remote did not advertise this ref.
*/
public Ref getRef(String name);
Ref getRef(String name);
/**
* {@inheritDoc}
@ -115,7 +115,7 @@ public interface Connection extends AutoCloseable {
* the signature to prevent them from doing so.
*/
@Override
public void close();
void close();
/**
* Get the additional messages, if any, returned by the remote process.
@ -132,7 +132,7 @@ public interface Connection extends AutoCloseable {
* newline (LF) character. The empty string is returned if the
* remote produced no additional messages.
*/
public String getMessages();
String getMessages();
/**
* User agent advertised by the remote server.
@ -141,5 +141,5 @@ public interface Connection extends AutoCloseable {
* server does not advertise this version.
* @since 4.0
*/
public String getPeerUserAgent();
String getPeerUserAgent();
}

12
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java

@ -109,7 +109,7 @@ public interface FetchConnection extends Connection {
* protocol error, or error on remote side, or connection was
* already used for fetch.
*/
public void fetch(final ProgressMonitor monitor,
void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have)
throws TransportException;
@ -151,7 +151,7 @@ public interface FetchConnection extends Connection {
* already used for fetch.
* @since 3.0
*/
public void fetch(final ProgressMonitor monitor,
void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have,
OutputStream out) throws TransportException;
@ -173,7 +173,7 @@ public interface FetchConnection extends Connection {
* @return true if the last fetch call implicitly included tag objects;
* false if tags were not implicitly obtained.
*/
public boolean didFetchIncludeTags();
boolean didFetchIncludeTags();
/**
* Did the last {@link #fetch(ProgressMonitor, Collection, Set)} validate
@ -196,7 +196,7 @@ public interface FetchConnection extends Connection {
* client side in order to succeed; false if the last fetch assumed
* the remote peer supplied a complete graph.
*/
public boolean didFetchTestConnectivity();
boolean didFetchTestConnectivity();
/**
* Set the lock message used when holding a pack out of garbage collection.
@ -208,7 +208,7 @@ public interface FetchConnection extends Connection {
*
* @param message message to use when holding a pack in place.
*/
public void setPackLockMessage(String message);
void setPackLockMessage(String message);
/**
* All locks created by the last
@ -218,5 +218,5 @@ public interface FetchConnection extends Connection {
* fetch. The caller must release these after refs are updated in
* order to safely permit garbage collection.
*/
public Collection<PackLock> getPackLocks();
Collection<PackLock> getPackLocks();
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java

@ -66,7 +66,7 @@ public interface NonceGenerator {
* @return The nonce to be signed by the pusher
* @throws java.lang.IllegalStateException
*/
public String createNonce(Repository db, long timestamp)
String createNonce(Repository db, long timestamp)
throws IllegalStateException;
/**
@ -91,6 +91,6 @@ public interface NonceGenerator {
* @return a NonceStatus indicating the trustworthiness of the received
* nonce.
*/
public NonceStatus verify(String received, String sent,
NonceStatus verify(String received, String sent,
Repository db, boolean allowSlop, int slop);
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java

@ -63,7 +63,7 @@ import java.util.Collection;
*/
public interface PostReceiveHook {
/** A simple no-op hook. */
public static final PostReceiveHook NULL = new PostReceiveHook() {
PostReceiveHook NULL = new PostReceiveHook() {
@Override
public void onPostReceive(final ReceivePack rp,
final Collection<ReceiveCommand> commands) {
@ -81,6 +81,6 @@ public interface PostReceiveHook {
* unmodifiable set of successfully completed commands. May be
* the empty set.
*/
public void onPostReceive(ReceivePack rp,
void onPostReceive(ReceivePack rp,
Collection<ReceiveCommand> commands);
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java

@ -57,7 +57,7 @@ import org.eclipse.jgit.storage.pack.PackStatistics;
*/
public interface PostUploadHook {
/** A simple no-op hook. */
public static final PostUploadHook NULL = new PostUploadHook() {
PostUploadHook NULL = new PostUploadHook() {
@Override
public void onPostUpload(PackStatistics stats) {
// Do nothing.
@ -72,5 +72,5 @@ public interface PostUploadHook {
* {@link org.eclipse.jgit.internal.storage.pack.PackWriter} for
* the uploaded pack
*/
public void onPostUpload(PackStatistics stats);
void onPostUpload(PackStatistics stats);
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java

@ -79,7 +79,7 @@ import java.util.Collection;
*/
public interface PreReceiveHook {
/** A simple no-op hook. */
public static final PreReceiveHook NULL = new PreReceiveHook() {
PreReceiveHook NULL = new PreReceiveHook() {
@Override
public void onPreReceive(final ReceivePack rp,
final Collection<ReceiveCommand> commands) {
@ -99,5 +99,5 @@ public interface PreReceiveHook {
* unmodifiable set of valid commands still pending execution.
* May be the empty set.
*/
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands);
void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands);
}

8
org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java

@ -59,7 +59,7 @@ import org.eclipse.jgit.lib.ObjectId;
*/
public interface PreUploadHook {
/** A simple no-op hook. */
public static final PreUploadHook NULL = new PreUploadHook() {
PreUploadHook NULL = new PreUploadHook() {
@Override
public void onBeginNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntOffered)
@ -96,7 +96,7 @@ public interface PreUploadHook {
* @throws org.eclipse.jgit.transport.ServiceMayNotContinueException
* abort; the message will be sent to the user.
*/
public void onBeginNegotiateRound(UploadPack up,
void onBeginNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntOffered)
throws ServiceMayNotContinueException;
@ -120,7 +120,7 @@ public interface PreUploadHook {
* @throws org.eclipse.jgit.transport.ServiceMayNotContinueException
* abort; the message will be sent to the user.
*/
public void onEndNegotiateRound(UploadPack up,
void onEndNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntCommon,
int cntNotFound, boolean ready)
throws ServiceMayNotContinueException;
@ -141,7 +141,7 @@ public interface PreUploadHook {
* @throws org.eclipse.jgit.transport.ServiceMayNotContinueException
* abort; the message will be sent to the user.
*/
public void onSendPack(UploadPack up, Collection<? extends ObjectId> wants,
void onSendPack(UploadPack up, Collection<? extends ObjectId> wants,
Collection<? extends ObjectId> haves)
throws ServiceMayNotContinueException;
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java

@ -113,7 +113,7 @@ public interface PushConnection extends Connection {
* created. Non-critical errors concerning only isolated refs
* should be placed in refUpdates.
*/
public void push(final ProgressMonitor monitor,
void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates)
throws TransportException;
@ -163,7 +163,7 @@ public interface PushConnection extends Connection {
* should be placed in refUpdates.
* @since 3.0
*/
public void push(final ProgressMonitor monitor,
void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates, OutputStream out)
throws TransportException;

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java

@ -61,7 +61,7 @@ public interface RefFilter {
/**
* The default filter, allows all refs to be shown.
*/
public static final RefFilter DEFAULT = new RefFilter() {
RefFilter DEFAULT = new RefFilter() {
@Override
public Map<String, Ref> filter (Map<String, Ref> refs) {
return refs;
@ -76,5 +76,5 @@ public interface RefFilter {
* @return
* the filtered map of refs.
*/
public Map<String, Ref> filter(Map<String, Ref> refs);
Map<String, Ref> filter(Map<String, Ref> refs);
}

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundle.java

@ -58,5 +58,5 @@ public interface TransportBundle extends PackTransport {
/**
* Bundle signature
*/
public static final String V2_BUNDLE_SIGNATURE = "# v2 git bundle"; //$NON-NLS-1$
String V2_BUNDLE_SIGNATURE = "# v2 git bundle"; //$NON-NLS-1$
}

62
org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java

@ -69,25 +69,25 @@ public interface HttpConnection {
/**
* @see HttpURLConnection#HTTP_OK
*/
public static final int HTTP_OK = java.net.HttpURLConnection.HTTP_OK;
int HTTP_OK = java.net.HttpURLConnection.HTTP_OK;
/**
* @see HttpURLConnection#HTTP_MOVED_PERM
* @since 4.7
*/
public static final int HTTP_MOVED_PERM = java.net.HttpURLConnection.HTTP_MOVED_PERM;
int HTTP_MOVED_PERM = java.net.HttpURLConnection.HTTP_MOVED_PERM;
/**
* @see HttpURLConnection#HTTP_MOVED_TEMP
* @since 4.9
*/
public static final int HTTP_MOVED_TEMP = java.net.HttpURLConnection.HTTP_MOVED_TEMP;
int HTTP_MOVED_TEMP = java.net.HttpURLConnection.HTTP_MOVED_TEMP;
/**
* @see HttpURLConnection#HTTP_SEE_OTHER
* @since 4.9
*/
public static final int HTTP_SEE_OTHER = java.net.HttpURLConnection.HTTP_SEE_OTHER;
int HTTP_SEE_OTHER = java.net.HttpURLConnection.HTTP_SEE_OTHER;
/**
* HTTP 1.1 additional MOVED_TEMP status code; value = 307.
@ -95,22 +95,22 @@ public interface HttpConnection {
* @see #HTTP_MOVED_TEMP
* @since 4.9
*/
public static final int HTTP_11_MOVED_TEMP = 307;
int HTTP_11_MOVED_TEMP = 307;
/**
* @see HttpURLConnection#HTTP_NOT_FOUND
*/
public static final int HTTP_NOT_FOUND = java.net.HttpURLConnection.HTTP_NOT_FOUND;
int HTTP_NOT_FOUND = java.net.HttpURLConnection.HTTP_NOT_FOUND;
/**
* @see HttpURLConnection#HTTP_UNAUTHORIZED
*/
public static final int HTTP_UNAUTHORIZED = java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
int HTTP_UNAUTHORIZED = java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
/**
* @see HttpURLConnection#HTTP_FORBIDDEN
*/
public static final int HTTP_FORBIDDEN = java.net.HttpURLConnection.HTTP_FORBIDDEN;
int HTTP_FORBIDDEN = java.net.HttpURLConnection.HTTP_FORBIDDEN;
/**
* Get response code
@ -119,7 +119,7 @@ public interface HttpConnection {
* @return the HTTP Status-Code, or -1
* @throws java.io.IOException
*/
public int getResponseCode() throws IOException;
int getResponseCode() throws IOException;
/**
* Get URL
@ -127,7 +127,7 @@ public interface HttpConnection {
* @see HttpURLConnection#getURL()
* @return the URL.
*/
public URL getURL();
URL getURL();
/**
* Get response message
@ -136,7 +136,7 @@ public interface HttpConnection {
* @return the HTTP response message, or <code>null</code>
* @throws java.io.IOException
*/
public String getResponseMessage() throws IOException;
String getResponseMessage() throws IOException;
/**
* Get list of header fields
@ -144,7 +144,7 @@ public interface HttpConnection {
* @see HttpURLConnection#getHeaderFields()
* @return a Map of header fields
*/
public Map<String, List<String>> getHeaderFields();
Map<String, List<String>> getHeaderFields();
/**
* Set request property
@ -156,7 +156,7 @@ public interface HttpConnection {
* @param value
* the value associated with it.
*/
public void setRequestProperty(String key, String value);
void setRequestProperty(String key, String value);
/**
* Set request method
@ -170,7 +170,7 @@ public interface HttpConnection {
* @throws java.net.ProtocolException
* if any.
*/
public void setRequestMethod(String method)
void setRequestMethod(String method)
throws ProtocolException;
/**
@ -181,7 +181,7 @@ public interface HttpConnection {
* a <code>boolean</code> indicating whether or not to allow
* caching
*/
public void setUseCaches(boolean usecaches);
void setUseCaches(boolean usecaches);
/**
* Set connect timeout
@ -191,7 +191,7 @@ public interface HttpConnection {
* an <code>int</code> that specifies the connect timeout value
* in milliseconds
*/
public void setConnectTimeout(int timeout);
void setConnectTimeout(int timeout);
/**
* Set read timeout
@ -201,7 +201,7 @@ public interface HttpConnection {
* an <code>int</code> that specifies the timeout value to be
* used in milliseconds
*/
public void setReadTimeout(int timeout);
void setReadTimeout(int timeout);
/**
* Get content type
@ -210,7 +210,7 @@ public interface HttpConnection {
* @return the content type of the resource that the URL references, or
* <code>null</code> if not known.
*/
public String getContentType();
String getContentType();
/**
* Get input stream
@ -222,7 +222,7 @@ public interface HttpConnection {
* @throws java.io.IOException
* if any.
*/
public InputStream getInputStream() throws IOException;
InputStream getInputStream() throws IOException;
/**
* Get header field
@ -233,7 +233,7 @@ public interface HttpConnection {
* @return the value of the named header field, or <code>null</code> if
* there is no such field in the header.
*/
public String getHeaderField(String name);
String getHeaderField(String name);
/**
* Get content length
@ -243,7 +243,7 @@ public interface HttpConnection {
* references, {@code -1} if the content length is not known, or if
* the content length is greater than Integer.MAX_VALUE.
*/
public int getContentLength();
int getContentLength();
/**
* Set whether or not to follow HTTP redirects.
@ -253,7 +253,7 @@ public interface HttpConnection {
* a <code>boolean</code> indicating whether or not to follow
* HTTP redirects.
*/
public void setInstanceFollowRedirects(boolean followRedirects);
void setInstanceFollowRedirects(boolean followRedirects);
/**
* Set if to do output
@ -262,7 +262,7 @@ public interface HttpConnection {
* @param dooutput
* the new value.
*/
public void setDoOutput(boolean dooutput);
void setDoOutput(boolean dooutput);
/**
* Set fixed length streaming mode
@ -271,7 +271,7 @@ public interface HttpConnection {
* @param contentLength
* The number of bytes which will be written to the OutputStream.
*/
public void setFixedLengthStreamingMode(int contentLength);
void setFixedLengthStreamingMode(int contentLength);
/**
* Get output stream
@ -280,7 +280,7 @@ public interface HttpConnection {
* @return an output stream that writes to this connection.
* @throws java.io.IOException
*/
public OutputStream getOutputStream() throws IOException;
OutputStream getOutputStream() throws IOException;
/**
* Set chunked streaming mode
@ -290,7 +290,7 @@ public interface HttpConnection {
* The number of bytes to write in each chunk. If chunklen is
* less than or equal to zero, a default value will be used.
*/
public void setChunkedStreamingMode(int chunklen);
void setChunkedStreamingMode(int chunklen);
/**
* Get request method
@ -298,7 +298,7 @@ public interface HttpConnection {
* @see HttpURLConnection#getRequestMethod()
* @return the HTTP request method
*/
public String getRequestMethod();
String getRequestMethod();
/**
* Whether we use a proxy
@ -306,7 +306,7 @@ public interface HttpConnection {
* @see HttpURLConnection#usingProxy()
* @return a boolean indicating if the connection is using a proxy.
*/
public boolean usingProxy();
boolean usingProxy();
/**
* Connect
@ -314,7 +314,7 @@ public interface HttpConnection {
* @see HttpURLConnection#connect()
* @throws java.io.IOException
*/
public void connect() throws IOException;
void connect() throws IOException;
/**
* Configure the connection so that it can be used for https communication.
@ -332,7 +332,7 @@ public interface HttpConnection {
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.KeyManagementException
*/
public void configure(KeyManager[] km, TrustManager[] tm,
void configure(KeyManager[] km, TrustManager[] tm,
SecureRandom random) throws NoSuchAlgorithmException,
KeyManagementException;
@ -345,6 +345,6 @@ public interface HttpConnection {
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.KeyManagementException
*/
public void setHostnameVerifier(HostnameVerifier hostnameverifier)
void setHostnameVerifier(HostnameVerifier hostnameverifier)
throws NoSuchAlgorithmException, KeyManagementException;
}

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java

@ -62,7 +62,7 @@ public interface HttpConnectionFactory {
* @return a {@link org.eclipse.jgit.transport.http.HttpConnection}
* @throws java.io.IOException
*/
public HttpConnection create(URL url) throws IOException;
HttpConnection create(URL url) throws IOException;
/**
* Creates a new connection to a destination defined by a
@ -75,6 +75,6 @@ public interface HttpConnectionFactory {
* @return a {@link org.eclipse.jgit.transport.http.HttpConnection}
* @throws java.io.IOException
*/
public HttpConnection create(URL url, Proxy proxy)
HttpConnection create(URL url, Proxy proxy)
throws IOException;
}

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java

@ -57,7 +57,7 @@ public interface ReceivePackFactory<C> {
/**
* A factory disabling the ReceivePack service for all repositories
*/
public static final ReceivePackFactory<?> DISABLED = new ReceivePackFactory<Object>() {
ReceivePackFactory<?> DISABLED = new ReceivePackFactory<Object>() {
@Override
public ReceivePack create(Object req, Repository db)
throws ServiceNotEnabledException {

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java

@ -57,7 +57,7 @@ public interface RepositoryResolver<C> {
/**
* Resolver configured to open nothing.
*/
public static final RepositoryResolver<?> NONE = new RepositoryResolver<Object>() {
RepositoryResolver<?> NONE = new RepositoryResolver<Object>() {
@Override
public Repository open(Object req, String name)
throws RepositoryNotFoundException {

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java

@ -57,7 +57,7 @@ public interface UploadPackFactory<C> {
/**
* A factory disabling the UploadPack service for all repositories.
*/
public static final UploadPackFactory<?> DISABLED = new UploadPackFactory<Object>() {
UploadPackFactory<?> DISABLED = new UploadPackFactory<Object>() {
@Override
public UploadPack create(Object req, Repository db)
throws ServiceNotEnabledException {

Loading…
Cancel
Save