Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/io/reactivesocket/exceptions/Exceptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static Throwable from(Frame frame) {
message = new String(byteBuffer.array(), UTF_8);
}

Throwable ex = null;
Throwable ex;
switch (errorCode) {
case APPLICATION_ERROR:
ex = new ApplicationException(message);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/reactivesocket/internal/Requester.java
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ public void onNext(Frame frame) {
}

public void onError(Throwable t) {
Collection<UnicastSubject<Frame>> subjects = null;
Collection<UnicastSubject<Frame>> subjects;
synchronized (Requester.this) {
subjects = streamInputMap.values();
}
Expand All @@ -958,7 +958,7 @@ public void onError(Throwable t) {
}

public void onComplete() {
Collection<UnicastSubject<Frame>> subjects = null;
Collection<UnicastSubject<Frame>> subjects;
synchronized (Requester.this) {
subjects = streamInputMap.values();
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/reactivesocket/internal/Responder.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void onNext(Frame requestFrame) {
responsePublisher = handleMetadataPush(
requestFrame, requestHandler);
} else if (requestFrame.getType() == FrameType.CANCEL) {
Subscription s = null;
Subscription s;
synchronized (Responder.this) {
s = cancellationSubscriptions.get(requestFrame.getStreamId());
}
Expand All @@ -262,7 +262,7 @@ public void onNext(Frame requestFrame) {
}
return;
} else if (requestFrame.getType() == FrameType.REQUEST_N) {
SubscriptionArbiter inFlightSubscription = null;
SubscriptionArbiter inFlightSubscription;
synchronized (Responder.this) {
inFlightSubscription = inFlight.get(requestFrame.getStreamId());
}
Expand Down Expand Up @@ -693,7 +693,7 @@ private Publisher<Frame> handleRequestChannel(Frame requestFrame,
Int2ObjectHashMap<Subscription> cancellationSubscriptions,
Int2ObjectHashMap<SubscriptionArbiter> inFlight) {

UnicastSubject<Payload> channelSubject = null;
UnicastSubject<Payload> channelSubject;
synchronized(Responder.this) {
channelSubject = channels.get(requestFrame.getStreamId());
}
Expand Down Expand Up @@ -869,7 +869,7 @@ public void addTransportRequest(long n) {
}

private void tryRequest() {
long toRequest = 0;
long toRequest;
synchronized(this) {
if(applicationProducer == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void clear() {

@Override
public void dispose() {
Disposable[] cs = null;
Disposable[] cs;
synchronized (this) {
disposed = true;
cs = resources.toArray(new Disposable[] {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public synchronized void unregister(Responder responder) {

@Override
public synchronized boolean accept(Responder responder, Frame frame) {
boolean valid = false;
boolean valid;
final Integer remainingTickets = responders.get(responder);
return remainingTickets == null || remainingTickets > 0;
}
Expand Down