forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that resteasy rest-client uses QuarkusInjectorFactory as well
This is done in order to have providers as beans - same as is the case for resteasy server. Fixes quarkusio#2773
- Loading branch information
Showing
7 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...mmon/runtime/src/main/java/io/quarkus/resteasy/common/runtime/ProxyUnwrapperFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.quarkus.resteasy.common.runtime; | ||
|
||
import java.util.List; | ||
import java.util.function.Function; | ||
|
||
public class ProxyUnwrapperFunction implements Function<Object, Object> { | ||
|
||
private final List<Function<Object, Object>> propertyUnwrappers; | ||
|
||
public ProxyUnwrapperFunction(List<Function<Object, Object>> propertyUnwrappers) { | ||
this.propertyUnwrappers = propertyUnwrappers; | ||
} | ||
|
||
@Override | ||
public Object apply(Object o) { | ||
Object res = o; | ||
for (Function<Object, Object> i : propertyUnwrappers) { | ||
res = i.apply(res); | ||
} | ||
return res; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/runtime/QuarkusConstructorInjector.java → ...n/runtime/QuarkusConstructorInjector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters