You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewIllegalArgumentException(className + ", custom messageContent class must have a default constructor,自定义消息必须要有一个默认的无参构造函数,请参考TextMessageContent.java");
1328
1328
}
1329
1329
1330
-
try {
1331
-
msgContentClazz.getDeclaredMethod("encode");
1332
-
} catch (NoSuchMethodExceptione) {
1333
-
e.printStackTrace();
1334
-
thrownewIllegalArgumentException(className + ", custom messageContent class must override encode,自定义消息必须覆盖encode方法,并调用super.encode(),请参考TextMessageContent.java");
1335
-
}
1330
+
// 建议打开,以便对自定义消息的合法性进行检查
1331
+
// try {
1332
+
// msgContentClazz.getDeclaredMethod("encode");
1333
+
// } catch (NoSuchMethodException e) {
1334
+
// e.printStackTrace();
1335
+
// throw new IllegalArgumentException(className + ", custom messageContent class must override encode,自定义消息必须覆盖encode方法,并调用super.encode(),请参考TextMessageContent.java");
0 commit comments