1. 程式人生 > >Restlet2.1.6釋出,修正ObjectRepresentation的建構函式問題

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還沒有升級測試。大家可以測試一下。