sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radu Cotescu <r...@apache.org>
Subject Re: [VOTE] Release Apache Sling API 2.20.0, Apache Sling Servlets Resolver 2.5.0, Apache Sling Servlet Annotations 1.2.2
Date Thu, 13 Dec 2018 22:11:53 GMT
Hi Konrad,

> On 13 Dec 2018, at 19:44, Konrad Windszus <konrad_w@gmx.de> wrote:
> 
> Hi Radu,
> I don't really understand the fix in https://github.com/apache/sling-org-apache-sling-servlets-annotations/commit/9cc022fa517a858e96229e8629b0102914abb435
<https://github.com/apache/sling-org-apache-sling-servlets-annotations/commit/9cc022fa517a858e96229e8629b0102914abb435>.
> The previous default (i.e. null) should lead to the fact that the service property is
not generated if there is no value set. Now  the property is always generated!  The former
seems to be the more correct approach. Especially if I want to generate servlets targeting
pre 2.5.0 servlet resolver.
> Can you explain?
> 
> Thanks,
> Konrad

There was no default value before - which would force consumers to specify a value in all
annotations - and “null” is not an allowed default value [0][1]. An empty string value
would not be taken into consideration by the o.a.s.servlets.resolver, but maybe a better option
would be to specify “sling/servlet/default”?!

Cheers,
Radu

[0] - https://docs.oracle.com/javase/specs/jls/se11/html/jls-9.html#jls-9.6.2 <https://docs.oracle.com/javase/specs/jls/se11/html/jls-9.html#jls-9.6.2>
[1] - https://builds.apache.org/job/sling-org-apache-sling-servlets-annotations-it-1.8/97/console
<https://builds.apache.org/job/sling-org-apache-sling-servlets-annotations-it-1.8/97/console>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message