Skip to content

Commit

Permalink
[RESTEASY-1974] Checkstyle - Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Terem authored and asoldano committed Nov 16, 2018
1 parent c30cb45 commit 4825903
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public JAXBUnmarshalException(final Throwable throwable, final Response response
{
super(throwable, response);
}
}final
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ public ClientConfiguration(final ResteasyProviderFactory factory)
{
if (factory instanceof ThreadLocalResteasyProviderFactory)
{
factory = ((ThreadLocalResteasyProviderFactory)factory).getDelegate();
this.providerFactory = new LocalResteasyProviderFactory(((ThreadLocalResteasyProviderFactory)factory).getDelegate());
} else {
this.providerFactory = new LocalResteasyProviderFactory(factory);
}
this.providerFactory = new LocalResteasyProviderFactory(factory);
}

public ClientConfiguration(final ClientConfiguration parent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public SubResourceInvoker(final ResteasyWebTarget parent, final Method method, f
}
if (method.isAnnotationPresent(Path.class))
{
parent = parent.path(method.getAnnotation(Path.class).value());
this.parent = parent.path(method.getAnnotation(Path.class).value());
} else {
this.parent = parent;
}
this.parent = parent;

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,26 @@ private SseEventSourceImpl(final WebTarget target, final String name, final long
//tck requries this
this.alwaysReconnect = true;

if (name == null)
{
name = String.format("sse-event-source(%s)", target.getUri());
}
if (executor == null)
{
ScheduledExecutorService scheduledExecutor = null;
if (target instanceof ResteasyWebTarget)
{
scheduledExecutor = ((ResteasyWebTarget) target).getResteasyClient().getScheduledExecutor();
}
this.sseEventSourceScheduler = new SseEventSourceScheduler(scheduledExecutor, name);
if (name != null) {
this.sseEventSourceScheduler = new SseEventSourceScheduler(scheduledExecutor, name);
} else {
this.sseEventSourceScheduler = new SseEventSourceScheduler(scheduledExecutor, String.format("sse-event-source(%s)", target.getUri()));
}
}
else
{
this.sseEventSourceScheduler = new SseEventSourceScheduler(executor, name);
if (name != null) {
this.sseEventSourceScheduler = new SseEventSourceScheduler(executor, name);
} else {
this.sseEventSourceScheduler = new SseEventSourceScheduler(executor, String.format("sse-event-source(%s)", target.getUri()));
}
}
if (open)
{
Expand Down

0 comments on commit 4825903

Please sign in to comment.