ServerResource returns null getVariants() when not-annotated

5 messages Options
Embed this post
Permalink
Tal Liron

ServerResource returns null getVariants() when not-annotated

Reply Threaded More More options
Print post
Permalink
Seems simple to fix -- ServerResource.getVariants() should call
super.getVariants() in such cases.

-Tal

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2401827
jlouvel

RE: ServerResource returns null getVariants() when not-annotated

Reply Threaded More More options
Print post
Permalink
Hi Tal,

Good point, this list should be empty in this case. I've just fixed it in
SVN trunk.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : Tal Liron [mailto:[hidden email]]
Envoyé : mercredi 30 septembre 2009 02:27
À : [hidden email]
Objet : ServerResource returns null getVariants() when not-annotated

Seems simple to fix -- ServerResource.getVariants() should call
super.getVariants() in such cases.

-Tal

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=24018
27

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2401916
eshepelyuk

Re: ServerResource returns null getVariants() when not-annotated

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tal Liron
Hello, Jerome

Any chance that 2.0m5 will be updated with this fix ?

> Hi Tal,
>
> Good point, this list should be empty in this case. I've just fixed it in
> SVN trunk.
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
> -----Message d'origine-----
> De : Tal Liron  
> [mailto:[hidden email]]
> Envoyé : mercredi 30 septembre 2009 02:27
> À : [hidden email]
> Objet : ServerResource returns null getVariants() when not-annotated
>
> Seems simple to fix -- ServerResource.getVariants() should call
> super.getVariants() in such cases.
>
> -Tal
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=24018
> 27
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2401916
>


--
Regards,
Evgeny Shepelyuk

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2402070
jlouvel

RE: ServerResource returns null getVariants() when not-annotated

Reply Threaded More More options
Print post
Permalink
Hi Evgeny,

Unfortunately, we can't change 2.0 M5 anymore. Maybe you should use a recent snapshot instead?

As a temporary workaround, I suggest that you override this method in your BaseServerResource class to ensure that if null is returned by the parent class, you return an empty variants list.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com




-----Message d'origine-----
De : news [mailto:[hidden email]] De la part de Evgeny Shepelyuk
Envoyé : mercredi 30 septembre 2009 15:19
À : [hidden email]
Objet : Re: ServerResource returns null getVariants() when not-annotated

Hello, Jerome

Any chance that 2.0m5 will be updated with this fix ?

> Hi Tal,
>
> Good point, this list should be empty in this case. I've just fixed it in
> SVN trunk.
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
> -----Message d'origine-----
> De : Tal Liron  
> [mailto:[hidden email]]
> Envoyé : mercredi 30 septembre 2009 02:27
> À : [hidden email]
> Objet : ServerResource returns null getVariants() when not-annotated
>
> Seems simple to fix -- ServerResource.getVariants() should call
> super.getVariants() in such cases.
>
> -Tal
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=24018
> 27
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2401916
>


--
Regards,
Evgeny Shepelyuk

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2402070

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2402482
eshepelyuk

Re: ServerResource returns null getVariants() when not-annotated

Reply Threaded More More options
Print post
Permalink
In reply to this post by eshepelyuk
Hello,

Thnx for advice. I'm trying to migrate my 1.1.x codebase to 2.0
but seems it's still has issues so i will keep playing around with latest  
builds for now :)

> Hi Evgeny,
>
> Unfortunately, we can't change 2.0 M5 anymore. Maybe you should use a  
> recent snapshot instead?
>
> As a temporary workaround, I suggest that you override this method in  
> your BaseServerResource class to ensure that if null is returned by the  
> parent class, you return an empty variants list.
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
>
>
> -----Message d'origine-----
> De : news [mailto:[hidden email]] De la  
> part de Evgeny Shepelyuk
> Envoyé : mercredi 30 septembre 2009 15:19
> À : [hidden email]
> Objet : Re: ServerResource returns null getVariants() when not-annotated
>
> Hello, Jerome
>
> Any chance that 2.0m5 will be updated with this fix ?
>
>> Hi Tal,
>>
>> Good point, this list should be empty in this case. I've just fixed it  
>> in
>> SVN trunk.
>>
>> Best regards,
>> Jerome Louvel
>> --
>> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
>> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>>
>>
>> -----Message d'origine-----
>> De : Tal Liron
>> [mailto:[hidden email]]
>> Envoyé : mercredi 30 septembre 2009 02:27
>> À : [hidden email]
>> Objet : ServerResource returns null getVariants() when not-annotated
>>
>> Seems simple to fix -- ServerResource.getVariants() should call
>> super.getVariants() in such cases.
>>
>> -Tal
>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=24018
>> 27
>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2401916
>>
>
>


--
Regards,
Evgeny Shepelyuk

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2402492