This commit is contained in:
Redkale
2022-07-02 22:45:11 +08:00
parent 00dc3ee945
commit be713c9ccf

View File

@@ -618,7 +618,9 @@ public final class SncpDynServlet extends SncpServlet {
if (originalReturnType != void.class && originalReturnType != Void.class) {
if (boolReturnTypeFuture && method.getReturnType() != method.getGenericReturnType()) {
java.lang.reflect.Type t = ((ParameterizedType) method.getGenericReturnType()).getActualTypeArguments()[0];
if (t != Void.class && t != java.lang.reflect.Type.class) BsonFactory.root().loadEncoder(t);
if (t != Void.class && t != java.lang.reflect.Type.class) {
BsonFactory.root().loadEncoder(t);
}
} else {
try {
BsonFactory.root().loadEncoder(originalReturnType);