Skip to content

Commit 67bdc64

Browse files
committed
Minor code fix
1 parent 233d573 commit 67bdc64

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/io/vertx/reactivex/ext/auth/oauth2/providers/OpenIDConnectAuthFactory.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ public class OpenIDConnectAuthFactory {
1717

1818
private Vertx mVertx;
1919
private OAuth2Auth mAuthProvider;
20-
private Class mOpenIDConnectAuthClass;
20+
private Class<? extends OpenIDConnectAuth> mOpenIDConnectAuthClass;
2121
private OAuth2ClientOptions mOAuth2ClientOptions;
2222
private Logger mLog;
2323

2424
public OAuth2Auth create() throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
2525
if (mAuthProvider == null) {
2626
Method m = getOpenIDConnectAuthClass().getMethod("rxDiscover", Vertx.class, OAuth2ClientOptions.class);
27-
Single<OAuth2Auth> auth = (Single<OAuth2Auth>) m.invoke(null, getVertx(), getOAuth2ClientOptions());
27+
@SuppressWarnings("unchecked")
28+
Single<OAuth2Auth> auth = (Single<OAuth2Auth>) m.invoke(null, getVertx(), getOAuth2ClientOptions());
2829
mAuthProvider = auth
2930
.subscribeOn(Schedulers.io())
3031
.doOnSuccess(a -> getLog().debug(() -> "AuthProvider Created Successfully"))
@@ -49,11 +50,11 @@ public void setLog(Logger pLog) {
4950
this.mLog = pLog;
5051
}
5152

52-
public Class getOpenIDConnectAuthClass() {
53+
public Class<? extends OpenIDConnectAuth> getOpenIDConnectAuthClass() {
5354
return mOpenIDConnectAuthClass;
5455
}
5556

56-
public void setOpenIDConnectAuthClass(Class pOpenIDConnectAuthClass) {
57+
public void setOpenIDConnectAuthClass(Class<? extends OpenIDConnectAuth> pOpenIDConnectAuthClass) {
5758
this.mOpenIDConnectAuthClass = pOpenIDConnectAuthClass;
5859
}
5960

0 commit comments

Comments
 (0)