Indeed, it does appear to be legal, according to the JLS. I just found this little excerpt:
http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6 Note that it is legal to use single-element annotations for annotation types with multiple elements, so long as one element is named value, and all other elements have default values. Now, that doesn't mean I think adding support for host/domain is a good idea. Seems like a lot of work to support an uncommon need that can be addressed in other ways. The binding of the username from the subdomain can be handled in an interceptor, and the URLs can be generated using a custom JSP tag that extends Stripes' LinkTag. -Ben On Tue, Dec 29, 2009 at 1:05 PM, Aaron Porter <[email protected]> wrote: > I just tested with JDK 1.5 and 1.6 and there are no errors or warnings when > another annotation attribute is added as long as the new attribute has a > default value. I know there are many places that say the shorthand version > only works if there is a single attribute named value but in practice it > appears to work. > > Aaron > > Levi Hoogenberg wrote: > > I was about to post the same, but Eclipse accepts this without complaints. > > On Mon, Dec 28, 2009 at 8:24 PM, Ben Gunter <[email protected]> wrote: >> >> Doing so would break existing code because if we add any new elements >> to the @UrlBinding annotation then the shorthand form >> @UrlBinding("/blah") becomes illegal. >> >> On Mon, Dec 28, 2009 at 1:40 PM, Aaron Porter <[email protected]> wrote: >> > It wouldn't be too hard to add a host parameter to the @UrlBinding >> > annotation. That would make more sense to me than trying to get it into >> > the >> > value parameter. Then we don't have to worry about breaking any existing >> > code. >> > >> > Aaron >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Stripes-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-users > > ________________________________ > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > > ________________________________ > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > >
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
