reiern70 commented on a change in pull request #352: WICKET-6649 Store the
applicationName, sessionId and key in WebSocket…
URL: https://github.com/apache/wicket/pull/352#discussion_r272477274
##########
File path:
wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/message/TextMessage.java
##########
@@ -16,19 +16,46 @@
*/
package org.apache.wicket.protocol.ws.api.message;
+import org.apache.wicket.Application;
+import org.apache.wicket.mock.MockApplication;
+import org.apache.wicket.protocol.ws.api.registry.IKey;
import org.apache.wicket.util.lang.Args;
/**
* A {@link IWebSocketMessage message} with text data
*
* @since 6.0
*/
-public class TextMessage implements IWebSocketMessage
+public class TextMessage extends AbstractClientMessage
{
private final CharSequence text;
- public TextMessage(final CharSequence text)
+ /**
+ * Not used by Wicket since 8.5.0!
+ *
+ * @param text
+ * the message sent from the client
+ */
+ @Deprecated
+ public TextMessage(CharSequence text)
{
+ this(new MockApplication(), "", new IKey() {}, text);
Review comment:
I guess you can't use Application.get() because can't be sure there is
thread local Application attached to thread? Would it make sense to do this
with some "static"
```
ty {
return Application.get()
} catch() {
return new MockApplication():
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services