You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2011/01/24 09:48:09 UTC

Re: svn commit: r1062673 - /wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java

You should rather write a test. Even though its unused now it seems useful
and maybe used in the future.

-igor
On Jan 24, 2011 12:06 AM, <mg...@apache.org> wrote:
> Author: mgrigorov
> Date: Mon Jan 24 08:06:16 2011
> New Revision: 1062673
>
> URL: http://svn.apache.org/viewvc?rev=1062673&view=rev
> Log:
> Remove unused and untested method.
>
> Modified:
>
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
>
> Modified:
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
> URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java?rev=1062673&r1=1062672&r2=1062673&view=diff
>
==============================================================================
> ---
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
(original)
> +++
wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
Mon Jan 24 08:06:16 2011
> @@ -285,22 +285,6 @@ public final class Url implements Serial
> }
>
> /**
> - *
> - * @param base
> - */
> - public void resolveRelativeTo(final Url base)
> - {
> - Url url = new Url(base);
> -
> - while (!getSegments().isEmpty() && "..".equals(getSegments().get(0)))
> - {
> - removeLeadingSegments(0);
> - url.getSegments().remove(url.getSegments().size() - 1);
> - }
> - getSegments().addAll(url.getSegments());
> - }
> -
> - /**
> * Returns segments of the URL. Segments form the part before query string.
> *
> * @return mutable list of segments
>
>

Re: svn commit: r1062673 - /wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java

Posted by Martin Grigorov <mg...@apache.org>.
This method is a cut version of resolveRelative(Url). The comment is not
very informative what is the difference
It just confused me the other day when I debugged the problem with
onSelectionChanged() problem.
I prefer to kill unused code. Less code, less problems.

That reminds me that we have maven-license-plugin just in wicket 1.4.x and
even there I not sure whether it is used at all.
I'd like to kill it too, unless Jeremy wants to continue working on it some
day. Even in this case I think trunk is better place to experiment with new
features.

On Mon, Jan 24, 2011 at 9:48 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> You should rather write a test. Even though its unused now it seems useful
> and maybe used in the future.
>
> -igor
> On Jan 24, 2011 12:06 AM, <mg...@apache.org> wrote:
> > Author: mgrigorov
> > Date: Mon Jan 24 08:06:16 2011
> > New Revision: 1062673
> >
> > URL: http://svn.apache.org/viewvc?rev=1062673&view=rev
> > Log:
> > Remove unused and untested method.
> >
> > Modified:
> >
>
> wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
> >
> > Modified:
>
> wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
> > URL:
>
> http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java?rev=1062673&r1=1062672&r2=1062673&view=diff
> >
>
> ==============================================================================
> > ---
>
> wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
> (original)
> > +++
>
> wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/Url.java
> Mon Jan 24 08:06:16 2011
> > @@ -285,22 +285,6 @@ public final class Url implements Serial
> > }
> >
> > /**
> > - *
> > - * @param base
> > - */
> > - public void resolveRelativeTo(final Url base)
> > - {
> > - Url url = new Url(base);
> > -
> > - while (!getSegments().isEmpty() && "..".equals(getSegments().get(0)))
> > - {
> > - removeLeadingSegments(0);
> > - url.getSegments().remove(url.getSegments().size() - 1);
> > - }
> > - getSegments().addAll(url.getSegments());
> > - }
> > -
> > - /**
> > * Returns segments of the URL. Segments form the part before query
> string.
> > *
> > * @return mutable list of segments
> >
> >
>