Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
corrected generic types
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Kaufmann <[email protected]>
  • Loading branch information
Simon Kaufmann committed Feb 9, 2018
1 parent a22fb82 commit 3d2a698
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public void testLambdas() throws Exception {
thingHandler.method();
}, Runnable.class).build().run();

String res = safeCaller.create((Function<String, String>) name -> {
Object res = safeCaller.create((Function<String, String>) name -> {
return "Hello " + name + "!";
}, Function.class).build().apply("World");
assertThat(res, is("Hello World!"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public interface SafeCaller {
* @param interfaceType the interface which defines the relevant methods
* @return a safe call builder instance.
*/
<T extends I, I> SafeCallerBuilder<T> create(T target, Class<I> interfaceType);
<T> SafeCallerBuilder<T> create(T target, Class<T> interfaceType);

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void deactivate() {
}

@Override
public <T extends I, I> SafeCallerBuilder<T> create(T target, Class<I> interfaceType) {
public <T> SafeCallerBuilder<T> create(T target, Class<T> interfaceType) {
return new SafeCallerBuilderImpl<T>(target, new Class<?>[] { interfaceType }, manager);
}

Expand Down

0 comments on commit 3d2a698

Please sign in to comment.