GlassFish 4或Tyrus中的错误:每个ByteBuffer都会调用两次解码器#desDecode吗? [英] Bug in GlassFish 4 or Tyrus: Decoder#willDecode is called twice for each ByteBuffer?

查看:238
本文介绍了GlassFish 4或Tyrus中的错误:每个ByteBuffer都会调用两次解码器#desDecode吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了使用WebSockets的最简单的应用程序。我的后端是GlassFish 4 build 89,我的前端是一个使用 Tyrus 1.0 RC3 的JavaFX 2.2应用程序客户端, Web API的Java API参考实现。 GlassFish也使用了Tyrus,虽然我一直懒得查找GlassFish build 89中包含的版本。

I wrote the most simple application that uses WebSockets. My back end is GlassFish 4 build 89, my front end is a JavaFX 2.2 application client that uses Tyrus 1.0 RC3, the reference implementation of Java API for WebSockets. GlassFish uses Tyrus too although I've been to lazy to lookup exactly what version is included in GlassFish build 89.

我对WebSocket API的测试发送了 java.util.Date 来回,仅此而已。好吧,因为应该添加二进制对象。所以我编写了自己的 Decoder ,它实现了 Decoder.Binary< Date> 。像往常一样,当我进入新的知识领域时,我喜欢记录每个方法的调用。当我查看控制台时,我发现我的 Deocer.Binary< Date> #willDecode(ByteBuffer)方法被连续两次调用 由同一个线程!如果真的是故意的,那么这种模式的用例是什么,增加了什么价值?但我认为这肯定是一个错误!我试图在一些GlassFish JIRA网站上提交错误/问题,但我没有在任何地方找到该按钮。

My test of the WebSocket API sent a java.util.Date back and forth, nothing more. Well, as a binary object should be added. So I wrote my own Decoder that implements Decoder.Binary<Date>. As usual when I enter new fields of knowledge, I like to log each method invocation. And when I looked in the console, it hit me that my Deocer.Binary<Date>#willDecode(ByteBuffer) method was called twice in a row by the same thread! If that really is intentional, what would be the use case for such a pattern, what value was added? But I think it must be a bug! I tried to file a bug/issue over at some GlassFish JIRA site but I didn't find the button anywhere.

推荐答案

不规范违规方面的错误(对willDecode调用计数没有限制),但我同意我们应该调查它。

not a bug in terms of specification violation (there is no restriction on "willDecode" invocation count), but I agree we should look into it.

可以跟踪进度< a href =https://tyrus.java.net =nofollow> Tyrus jira,请参阅 TYRUS-210

progress can be tracked on Tyrus jira, see TYRUS-210.

谢谢!

这篇关于GlassFish 4或Tyrus中的错误:每个ByteBuffer都会调用两次解码器#desDecode吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆