Skip to content

Commit 192c8d1

Browse files
author
Quintin Willison
committed
Remove redundant modifiers from classes.
1 parent cfb53e8 commit 192c8d1

14 files changed

Lines changed: 27 additions & 27 deletions

lib/src/main/java/io/ably/lib/http/BasePaginatedQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public boolean isLast() {
282282
* @param <T>
283283
*/
284284
private static class SyncResultPage<T> extends ResultPageWrapper<T> implements PaginatedResult<T> {
285-
public SyncResultPage(BasePaginatedResult<T> resultBase) {
285+
SyncResultPage(BasePaginatedResult<T> resultBase) {
286286
super(resultBase);
287287
}
288288

@@ -301,7 +301,7 @@ public SyncResultPage(BasePaginatedResult<T> resultBase) {
301301
* @param <T>
302302
*/
303303
private static class AsyncResultPage<T> extends ResultPageWrapper<T> implements AsyncPaginatedResult<T> {
304-
public AsyncResultPage(BasePaginatedResult<T> resultBase) {
304+
AsyncResultPage(BasePaginatedResult<T> resultBase) {
305305
super(resultBase);
306306
}
307307

@@ -329,7 +329,7 @@ public void next(Callback<AsyncPaginatedResult<T>> callback) {
329329
private static class CallbackBridge<T> implements Callback<BasePaginatedResult<T>> {
330330
private final Callback<AsyncPaginatedResult<T>> callback;
331331

332-
public CallbackBridge(Callback<AsyncPaginatedResult<T>> callback) {
332+
CallbackBridge(Callback<AsyncPaginatedResult<T>> callback) {
333333
this.callback = callback;
334334
}
335335

lib/src/main/java/io/ably/lib/http/HttpCore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ private Proxy getProxy(String host) {
517517
/**
518518
* Interface for an entity that supplies an httpCore request body
519519
*/
520-
public static interface RequestBody {
520+
public interface RequestBody {
521521
byte[] getEncoded();
522522
String getContentType();
523523
}
@@ -526,15 +526,15 @@ public static interface RequestBody {
526526
* Interface for an entity that performs type-specific processing on an httpCore response body
527527
* @param <T>
528528
*/
529-
public static interface BodyHandler<T> {
529+
public interface BodyHandler<T> {
530530
T[] handleResponseBody(String contentType, byte[] body) throws AblyException;
531531
}
532532

533533
/**
534534
* Interface for an entity that performs type-specific processing on an httpCore response
535535
* @param <T>
536536
*/
537-
public static interface ResponseHandler<T> {
537+
public interface ResponseHandler<T> {
538538
T handleResponse(Response response, ErrorInfo error) throws AblyException;
539539
}
540540

lib/src/main/java/io/ably/lib/realtime/ChannelBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ private class ChannelStateCompletionListener implements ChannelStateListener {
10701070
private final ChannelState successState;
10711071
private final ChannelState failureState;
10721072

1073-
public ChannelStateCompletionListener(CompletionListener completionListener, ChannelState successState, ChannelState failureState) {
1073+
ChannelStateCompletionListener(CompletionListener completionListener, ChannelState successState, ChannelState failureState) {
10741074
this.completionListener = completionListener;
10751075
this.successState = successState;
10761076
this.failureState = failureState;

lib/src/main/java/io/ably/lib/realtime/ChannelState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public enum ChannelState {
1313
suspended(ChannelEvent.suspended);
1414

1515
final private ChannelEvent event;
16-
private ChannelState(ChannelEvent event) {
16+
ChannelState(ChannelEvent event) {
1717
this.event = event;
1818
}
1919
public ChannelEvent getChannelEvent() {

lib/src/main/java/io/ably/lib/realtime/ChannelStateListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static ChannelStateChange createUpdateEvent(ErrorInfo reason, boolean resumed) {
5353
}
5454
}
5555

56-
static class Multicaster extends io.ably.lib.util.Multicaster<ChannelStateListener> implements ChannelStateListener {
56+
class Multicaster extends io.ably.lib.util.Multicaster<ChannelStateListener> implements ChannelStateListener {
5757
@Override
5858
public void onChannelStateChanged(ChannelStateChange stateChange) {
5959
for(ChannelStateListener member : members)
@@ -63,7 +63,7 @@ public void onChannelStateChanged(ChannelStateChange stateChange) {
6363
}
6464
}
6565

66-
static class Filter implements ChannelStateListener {
66+
class Filter implements ChannelStateListener {
6767
@Override
6868
public void onChannelStateChanged(ChannelStateChange stateChange) {
6969
if(stateChange.current == this.state)

lib/src/main/java/io/ably/lib/realtime/ConnectionState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public enum ConnectionState {
1414
failed(ConnectionEvent.failed);
1515

1616
final private ConnectionEvent event;
17-
private ConnectionState(ConnectionEvent event) {
17+
ConnectionState(ConnectionEvent event) {
1818
this.event = event;
1919
}
2020
public ConnectionEvent getConnectionEvent() {
2121
return event;
2222
}
23-
}
23+
}

lib/src/main/java/io/ably/lib/realtime/Presence.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ private BasePaginatedQuery.ResultRequest<PresenceMessage> historyImpl(Param[] pa
662662
private static class QueuedPresence {
663663
public PresenceMessage msg;
664664
public CompletionListener listener;
665-
public QueuedPresence(PresenceMessage msg, CompletionListener listener) { this.msg = msg; this.listener = listener; }
665+
QueuedPresence(PresenceMessage msg, CompletionListener listener) { this.msg = msg; this.listener = listener; }
666666
}
667667

668668
private final Map<String, QueuedPresence> pendingPresence = new HashMap<String, QueuedPresence>();
@@ -992,7 +992,7 @@ synchronized List<PresenceMessage> endSync() {
992992
members.remove(itemKey);
993993
}
994994
residualMembers = null;
995-
995+
996996
/* finish, notifying any waiters */
997997
syncInProgress = false;
998998
}

lib/src/main/java/io/ably/lib/rest/AblyBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public AblyBase(ClientOptions options) throws AblyException {
7272
auth = new Auth(this, options);
7373
httpCore = new HttpCore(options, auth);
7474
http = new Http(new AsyncHttpScheduler(httpCore, options), new SyncHttpScheduler(httpCore));
75-
75+
7676
channels = new InternalChannels();
7777

7878
platform = new Platform();
@@ -91,10 +91,10 @@ public interface Channels extends ReadOnlyMap<String, Channel> {
9191
}
9292

9393
private class InternalChannels extends InternalMap<String, Channel> implements Channels {
94-
public InternalChannels() {
94+
InternalChannels() {
9595
super(new HashMap<String, Channel>());
9696
}
97-
97+
9898
@Override
9999
public Channel get(String channelName) {
100100
try {

lib/src/main/java/io/ably/lib/rest/Auth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ private static boolean equalNullableStrings(String one, String two) {
10011001
return (one == null) ? (two == null) : one.equals(two);
10021002
}
10031003

1004-
private static final String hmac(String text, String key) {
1004+
private static String hmac(String text, String key) {
10051005
try {
10061006
Mac mac = Mac.getInstance("HmacSHA256");
10071007
mac.init(new SecretKeySpec(key.getBytes(Charset.forName("UTF-8")), "HmacSHA256"));

lib/src/main/java/io/ably/lib/types/ChannelMode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ public enum ChannelMode {
1010
publish(Flag.publish),
1111
subscribe(Flag.subscribe),
1212
presence_subscribe(Flag.presence_subscribe);
13-
13+
1414
private final int mask;
15-
16-
private ChannelMode(final Flag flag) {
15+
16+
ChannelMode(final Flag flag) {
1717
mask = flag.getMask();
1818
}
19-
19+
2020
public int getMask() {
2121
return mask;
2222
}
23-
23+
2424
public static Set<ChannelMode> toSet(final int flags) {
2525
final Set<ChannelMode> set = new HashSet<>();
2626
for (final ChannelMode mode : ChannelMode.values()) {

0 commit comments

Comments
 (0)