Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed return type of Builder to return correct type #534

Merged
merged 1 commit into from
Jul 29, 2014
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public Builder() {
*
* @return a {@link Builder} object.
*/
public Builder clientActionHandlerRegistry(
public <T extends Builder> T clientActionHandlerRegistry(
final Class<? extends ClientActionHandlerRegistry> clientActionHandlerRegistryType) {
this.clientActionHandlerRegistryType = clientActionHandlerRegistryType;
return this;
return (T) this;
}

/**
Expand All @@ -101,9 +101,9 @@ public Builder clientActionHandlerRegistry(
* @param dispatchHooks The {@link com.gwtplatform.dispatch.client.DispatchHooks} implementation.
* @return this {@link Builder} object.
*/
public Builder dispatchHooks(final Class<? extends DispatchHooks> dispatchHooks) {
public <T extends Builder> T dispatchHooks(final Class<? extends DispatchHooks> dispatchHooks) {
this.dispatchHooks = dispatchHooks;
return this;
return (T) this;
}

/**
Expand All @@ -112,9 +112,9 @@ public Builder dispatchHooks(final Class<? extends DispatchHooks> dispatchHooks)
* @param exceptionHandlerType The {@link ExceptionHandler} class.
* @return a {@link Builder} object.
*/
public Builder exceptionHandler(final Class<? extends ExceptionHandler> exceptionHandlerType) {
public <T extends Builder> T exceptionHandler(final Class<? extends ExceptionHandler> exceptionHandlerType) {
this.exceptionHandlerType = exceptionHandlerType;
return this;
return (T) this;
}

/**
Expand All @@ -123,9 +123,10 @@ public Builder exceptionHandler(final Class<? extends ExceptionHandler> exceptio
* @param sessionAccessorType The {@link SecurityCookieAccessor} class.
* @return a {@link Builder} object.
*/
public Builder sessionAccessor(final Class<? extends SecurityCookieAccessor> sessionAccessorType) {
public <T extends Builder> T sessionAccessor(
final Class<? extends SecurityCookieAccessor> sessionAccessorType) {
this.sessionAccessorType = sessionAccessorType;
return this;
return (T) this;
}
}

Expand Down