文章

Restlet2.1.6发布,修正ObjectRepresentation的构造函数问题

OneCoder在Restlet 2.1.4中 匪夷所思的ObjectRepresentation的构造函数中,提到过在使用2.1.4的时候遇到的异常

Exception in thread "main" java.lang.IllegalArgumentException : The serialized representation must have this media type: application/x-java-serialized-object or this one: application/x-java-serialized-object+xml
          at org.restlet.representation.ObjectRepresentation.<init>(ObjectRepresentation.java:203)
     at org.restlet.representation.ObjectRepresentation.<init>(ObjectRepresentation.java:114)

当时结果阅读代码,认为是Restlet的一个bug,并提交给Restlet。得到回复确认,称将在2.1.6版本中修复:

Hello,

thansk a lot for reporting this issue which is clearly a regression. I've added a ticket for that point: https://github.com/restlet/restlet-framework-java/issues/809
The fix will be part of the 2.1.6 release, available in a few minutes.

Best regards,
Thierry Boileau
 

今天想起,登录了一下Restlet的官方,发现最新版已经是2.1.6了。查看了一些change log,发现该问题确实已经解决。

===========
Changes log  
===========

- 2.1.6 (12/05/2013)
    - Bug fixed
       - Fixed issue #809 regression introduced when handling issues #774 and #778.

不过OneCoder还没有升级测试。大家可以测试一下。

 

所有代码已上传至Github:https://github.com/lihongzheshuai/yummy-code

GESP 学习专题站:GESP WIKI

"luogu-"系列题目可在洛谷题库进行在线评测。

"bcqm-"系列题目可在编程启蒙题库进行在线评测。

欢迎加入Java、C++、Python技术交流QQ群(982860385),大佬免费带队,有问必答

欢迎加入C++ GESP/CSP认证学习QQ频道,考试资源总结汇总

欢迎加入C++ GESP/CSP学习交流QQ群(688906745),考试认证学员交流,互帮互助

GESP/CSP 认证学习微信公众号
GESP/CSP 认证学习微信公众号
本文由作者按照 CC BY-NC-SA 4.0 进行授权