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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ${generatedClassName} implements io.jooby.MvcExtension {
}

public ${generatedClassName}(java.util.function.Supplier<${className}> provider) {
this(ctx -> provider.get());
this(ctx -> (${className}) provider.get());
}

public ${generatedClassName}(java.util.function.Function<io.jooby.Context, ${className}> factory) {
Expand Down
25 changes: 25 additions & 0 deletions tests/src/test/java/io/jooby/i3756/C3756.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby.i3756;

import io.jooby.annotation.GET;
import io.jooby.annotation.Path;

@Path("/C3756")
public class C3756 {
private final S3756 s3756;

public C3756(S3756 s3756) {
super();
this.s3756 = s3756;
}

@GET
public String handle() {
s3756.accept("hello");
return "hello";
}
}
11 changes: 11 additions & 0 deletions tests/src/test/java/io/jooby/i3756/S3756.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby.i3756;

public interface S3756 {

void accept(String s);
}