>> In the patch for Wicket 7.x in WICKET-5823 you added a new method to the
>> API, instead of replacing the old one. Having several #save() methods
>> didn't look OK to me.

sorry for that, I was afraid to break all existing code (wasn't aware
varargs param will not be API break)

#save(String, String...) is OK for me, should I create new pull request?

On Wed, Feb 25, 2015 at 3:00 PM, Martin Grigorov <[email protected]>
wrote:

> Hi Maxim,
>
> On Tue, Feb 24, 2015 at 6:09 PM, Maxim Solodovnik <[email protected]>
> wrote:
>
> > Hello All,
> >
> > recently I have proposed the patch to reduce copy/paste while
> implementing
> > custom IAuthenticationStrategy.
> >
>
> https://issues.apache.org/jira/browse/WICKET-5823
>
>
> >
> > Actually this interface have 2 methods which are not correlate to each
> > other
> > String[] load();
> > void save(final String username, final String password);
> >
> > in fact this is getter and setter but with different signatures
> > The change I would like to propose is to replace (in Wicket7)
> > void save(final String username, final String password);
> > with
> > void save(final String... credentials);
> >
> > this will allow to easily store additional credentials (like domain) and
> > will not introduce the code break since previous calls will work as
> > expected
> >
> > What do you think?
> >
>
> Replacing #save(String, String) with #save(String, String, String...) looks
> better to me.
> This way it guarantees that the username and password are still provided.
> Or maybe with #save(String, String...) - if only one thing will be saved
> (e.g. a token?!).
> #save(String...) suggests that it is possible to save nothing. I don't see
> a use case for this.
>
> In the patch for Wicket 7.x in WICKET-5823 you added a new method to the
> API, instead of replacing the old one. Having several #save() methods
> didn't look OK to me.
>
>
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax

Reply via email to