You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/03/18 01:21:19 UTC

svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Author: ehillenius
Date: Sat Mar 17 17:21:18 2007
New Revision: 519483

URL: http://svn.apache.org/viewvc?view=rev&rev=519483
Log:
fixed build

Modified:
    incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java Sat Mar 17 17:21:18 2007
@@ -71,8 +71,6 @@
 		proxy = factory.getFieldValue(field, obj);
 		locator = (SpringBeanLocator) ((ILazyInitProxy) proxy)
 				.getObjectLocator();
-		assertTrue(locator.getBeanName() == null
-				|| locator.getBeanName().length() == 0);
 		assertTrue(locator.getBeanType().equals(Bean.class));
 		assertTrue(locator.getSpringContextLocator() == mockCtxLocator);
 		assertTrue(factory.getFieldValue(field, obj) instanceof ILazyInitProxy);



Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
> sometimes it is nice to treat code as a blackbox and check your inputs and
> outputs. but maybe thats just me.

Sure. But in this case the test was flaky to start with. It wasn't
clear what it tested for someone who didn't write the test, and by
giving the code a closer look, it never actually tested what the
author probably had in mind in the first place.

Eelco

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Igor Vaynberg <ig...@gmail.com>.
sometimes it is nice to treat code as a blackbox and check your inputs and
outputs. but maybe thats just me. if someone changed the default value of id
attr in the annot you would get a bean not found exception, where as the
code below wouldve caught it. but whatever. i am done arguing this.

-igor


On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > 1) make sure the default value of the springbean annot id property is
> either
> > null or an empty string
>
> SpringBeanLocator#getBeanName:
>
>         public final String getBeanName()
>         {
>                 if (beanName == null || "".equals(beanName))
>                 {
>                         beanName = getBeanNameOfClass(getSpringContext(),
> getBeanType());
>
>                 }
>                 return beanName;
>         }
>
> where getBeanNameOfClass always returns a non-null, non-empty value,
> right?
>
> Then the test:
>
>                 assertTrue(locator.getBeanName() == null
>                                 || locator.getBeanName().length() == 0);
>
> doesn't make sense to me.
>
> What Martijn added today is the || "".equals(beanName) part, which
> fixed exceptions like:
>
> ERROR - RequestCycle               - No bean named '' is defined
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> bean named '' is defined
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition
> (DefaultListableBeanFactory.java:355)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition
> (AbstractBeanFactory.java:800)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(
> AbstractBeanFactory.java:343)
>         at
> org.springframework.context.support.AbstractApplicationContext.isSingleton
> (AbstractApplicationContext.java:654)
>         at wicket.spring.SpringBeanLocator.isSingletonBean(
> SpringBeanLocator.java:126)
>         at
> wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(
> AnnotProxyFieldValueFactory.java:92)
>         at wicket.injection.Injector.inject(Injector.java:108)
>         at wicket.injection.ConfigurableInjector.inject(
> ConfigurableInjector.java:40)
>         at wicket.injection.ComponentInjector.onInstantiation(
> ComponentInjector.java:53)
>         at wicket.Application.notifyComponentInstantiationListeners(
> Application.java:920)
>         at wicket.Component.<init>(Component.java:568)
>         at wicket.MarkupContainer.<init>(MarkupContainer.java:110)
>         at wicket.Page.<init>(Page.java:201)
>         at wicket.markup.html.WebPage.<init>(WebPage.java:96)
>         at wicket.spring.common.web.BasePage.<init>(BasePage.java:28)
>         at wicket.spring.common.web.ContactsDisplayPage.<init>(
> ContactsDisplayPage.java:34)
>         at wicket.spring.annot.web.AnnotPage.<init>(AnnotPage.java:29)
>
> .... etc
>
> This bug seems to have been introduced because of the recent Spring
> singleton thingy.
>
> Another interesting thing about the test is that the SpringBean
> annotation's name field has a default value of "" (empty string), so
> getBeanName would never return null and getBeanNameOfClass would never
> been called in that method when no name was given in the annotation.
> That would later on be triggered by
> locateProxyTarget/lookupSpringBean.
>
> So Martijn's fix made sense to me, whereas the test didn't.
>
> Eelco
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> 1) make sure the default value of the springbean annot id property is either
> null or an empty string

SpringBeanLocator#getBeanName:

	public final String getBeanName()
	{
		if (beanName == null || "".equals(beanName))
		{
			beanName = getBeanNameOfClass(getSpringContext(), getBeanType());

		}
		return beanName;
	}

where getBeanNameOfClass always returns a non-null, non-empty value, right?

Then the test:

		assertTrue(locator.getBeanName() == null
				|| locator.getBeanName().length() == 0);

doesn't make sense to me.

What Martijn added today is the || "".equals(beanName) part, which
fixed exceptions like:

ERROR - RequestCycle               - No bean named '' is defined
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named '' is defined
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:355)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:800)
	at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:343)
	at org.springframework.context.support.AbstractApplicationContext.isSingleton(AbstractApplicationContext.java:654)
	at wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator.java:126)
	at wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:92)
	at wicket.injection.Injector.inject(Injector.java:108)
	at wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:40)
	at wicket.injection.ComponentInjector.onInstantiation(ComponentInjector.java:53)
	at wicket.Application.notifyComponentInstantiationListeners(Application.java:920)
	at wicket.Component.<init>(Component.java:568)
	at wicket.MarkupContainer.<init>(MarkupContainer.java:110)
	at wicket.Page.<init>(Page.java:201)
	at wicket.markup.html.WebPage.<init>(WebPage.java:96)
	at wicket.spring.common.web.BasePage.<init>(BasePage.java:28)
	at wicket.spring.common.web.ContactsDisplayPage.<init>(ContactsDisplayPage.java:34)
	at wicket.spring.annot.web.AnnotPage.<init>(AnnotPage.java:29)

.... etc

This bug seems to have been introduced because of the recent Spring
singleton thingy.

Another interesting thing about the test is that the SpringBean
annotation's name field has a default value of "" (empty string), so
getBeanName would never return null and getBeanNameOfClass would never
been called in that method when no name was given in the annotation.
That would later on be triggered by
locateProxyTarget/lookupSpringBean.

So Martijn's fix made sense to me, whereas the test didn't.

Eelco

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Igor Vaynberg <ig...@gmail.com>.
1) make sure the default value of the springbean annot id property is either
null or an empty string
2) make sure that the constructed bean locator properly parsed that value
3) exercised getbeanname() of the locator to make sure no exceptions were
thrown if the default value of id attr was used

-igor


On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Yup. What did the test do?
>
> Eelco
>
> On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > i didnt break that test, i think that was from martijn's change
> >
> > -igor
> >
> >
> > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > >
> > > Last reply:
> > >
> > > SpringBeanLocator has this:
> > >
> > >         public final String getBeanName()
> > >         {
> > >                 if (beanName == null || "".equals(beanName))
> > >                 {
> > >                         beanName =
> getBeanNameOfClass(getSpringContext(),
> > > getBeanType());
> > >
> > >                 }
> > >                 return beanName;
> > >         }
> > >
> > > The test had this:
> > >
> > >                 assertTrue(locator.getBeanName() == null
> > >                                 || locator.getBeanName().length() ==
> 0);
> > >
> > >
> > > Which doesn't make sense does it? And as there was no explanation at
> > > all what that test is supposed to do it looked to me like it was fine
> > > to remove it.
> > >
> > > Eelco
> > >
> > >
> > > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > > There is zero explanation with the unit test, and there was just now
> a
> > > > breakage fixed that had to do with naming. Put it back if you want,
> > > > but please run the tests first ok?
> > > >
> > > > Eelco
> > > >
> > > > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > > > I thought they were irrelevant. Aren't they?
> > > > >
> > > > > Eelco
> > > > >
> > > > >
> > > > > On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > > > > > did you remove these checks because they were irrelevant or
> because
> > > you
> > > > > > wanted to fix the build?
> > > > > >
> > > > > > -igor
> > > > > >
> > > > > >
> > > > > > On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> > > > > > >
> > > > > > > Author: ehillenius
> > > > > > > Date: Sat Mar 17 17:21:18 2007
> > > > > > > New Revision: 519483
> > > > > > >
> > > > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > > > > > > Log:
> > > > > > > fixed build
> > > > > > >
> > > > > > > Modified:
> > > > > > >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > > > >
> > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > >
> > > > > > > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > > > >
> > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > > URL:
> > > > > > >
> > >
> http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> > > > > > >
> > > > > > >
> > >
> ==============================================================================
> > > > > > > --- incubator/wicket/branches/wicket-1.x/jdk-1.5
> > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > > (original)
> > > > > > > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5
> > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > > Sat Mar 17 17:21:18 2007
> > > > > > > @@ -71,8 +71,6 @@
> > > > > > >                 proxy = factory.getFieldValue(field, obj);
> > > > > > >                 locator = (SpringBeanLocator)
> ((ILazyInitProxy)
> > > proxy)
> > > > > > >                                 .getObjectLocator();
> > > > > > > -               assertTrue(locator.getBeanName() == null
> > > > > > > -                               || locator.getBeanName
> ().length()
> > > == 0);
> > > > > > >                 assertTrue(locator.getBeanType().equals(
> Bean.class
> > > ));
> > > > > > >                 assertTrue(locator.getSpringContextLocator()
> ==
> > > > > > > mockCtxLocator);
> > > > > > >                 assertTrue(factory.getFieldValue(field, obj)
> > > instanceof
> > > > > > > ILazyInitProxy);
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
Yup. What did the test do?

Eelco

On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> i didnt break that test, i think that was from martijn's change
>
> -igor
>
>
> On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> >
> > Last reply:
> >
> > SpringBeanLocator has this:
> >
> >         public final String getBeanName()
> >         {
> >                 if (beanName == null || "".equals(beanName))
> >                 {
> >                         beanName = getBeanNameOfClass(getSpringContext(),
> > getBeanType());
> >
> >                 }
> >                 return beanName;
> >         }
> >
> > The test had this:
> >
> >                 assertTrue(locator.getBeanName() == null
> >                                 || locator.getBeanName().length() == 0);
> >
> >
> > Which doesn't make sense does it? And as there was no explanation at
> > all what that test is supposed to do it looked to me like it was fine
> > to remove it.
> >
> > Eelco
> >
> >
> > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > There is zero explanation with the unit test, and there was just now a
> > > breakage fixed that had to do with naming. Put it back if you want,
> > > but please run the tests first ok?
> > >
> > > Eelco
> > >
> > > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > > I thought they were irrelevant. Aren't they?
> > > >
> > > > Eelco
> > > >
> > > >
> > > > On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > > > > did you remove these checks because they were irrelevant or because
> > you
> > > > > wanted to fix the build?
> > > > >
> > > > > -igor
> > > > >
> > > > >
> > > > > On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> > > > > >
> > > > > > Author: ehillenius
> > > > > > Date: Sat Mar 17 17:21:18 2007
> > > > > > New Revision: 519483
> > > > > >
> > > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > > > > > Log:
> > > > > > fixed build
> > > > > >
> > > > > > Modified:
> > > > > >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > > >
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > >
> > > > > > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > > >
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > URL:
> > > > > >
> > http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> > > > > >
> > > > > >
> > ==============================================================================
> > > > > > --- incubator/wicket/branches/wicket-1.x/jdk-1.5
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > (original)
> > > > > > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > > Sat Mar 17 17:21:18 2007
> > > > > > @@ -71,8 +71,6 @@
> > > > > >                 proxy = factory.getFieldValue(field, obj);
> > > > > >                 locator = (SpringBeanLocator) ((ILazyInitProxy)
> > proxy)
> > > > > >                                 .getObjectLocator();
> > > > > > -               assertTrue(locator.getBeanName() == null
> > > > > > -                               || locator.getBeanName().length()
> > == 0);
> > > > > >                 assertTrue(locator.getBeanType().equals(Bean.class
> > ));
> > > > > >                 assertTrue(locator.getSpringContextLocator() ==
> > > > > > mockCtxLocator);
> > > > > >                 assertTrue(factory.getFieldValue(field, obj)
> > instanceof
> > > > > > ILazyInitProxy);
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Igor Vaynberg <ig...@gmail.com>.
i didnt break that test, i think that was from martijn's change

-igor


On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Last reply:
>
> SpringBeanLocator has this:
>
>         public final String getBeanName()
>         {
>                 if (beanName == null || "".equals(beanName))
>                 {
>                         beanName = getBeanNameOfClass(getSpringContext(),
> getBeanType());
>
>                 }
>                 return beanName;
>         }
>
> The test had this:
>
>                 assertTrue(locator.getBeanName() == null
>                                 || locator.getBeanName().length() == 0);
>
>
> Which doesn't make sense does it? And as there was no explanation at
> all what that test is supposed to do it looked to me like it was fine
> to remove it.
>
> Eelco
>
>
> On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > There is zero explanation with the unit test, and there was just now a
> > breakage fixed that had to do with naming. Put it back if you want,
> > but please run the tests first ok?
> >
> > Eelco
> >
> > On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > I thought they were irrelevant. Aren't they?
> > >
> > > Eelco
> > >
> > >
> > > On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > > > did you remove these checks because they were irrelevant or because
> you
> > > > wanted to fix the build?
> > > >
> > > > -igor
> > > >
> > > >
> > > > On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> > > > >
> > > > > Author: ehillenius
> > > > > Date: Sat Mar 17 17:21:18 2007
> > > > > New Revision: 519483
> > > > >
> > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > > > > Log:
> > > > > fixed build
> > > > >
> > > > > Modified:
> > > > >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > >
> > > > > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > >
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > URL:
> > > > >
> http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> > > > >
> > > > >
> ==============================================================================
> > > > > --- incubator/wicket/branches/wicket-1.x/jdk-1.5
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > (original)
> > > > > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > > Sat Mar 17 17:21:18 2007
> > > > > @@ -71,8 +71,6 @@
> > > > >                 proxy = factory.getFieldValue(field, obj);
> > > > >                 locator = (SpringBeanLocator) ((ILazyInitProxy)
> proxy)
> > > > >                                 .getObjectLocator();
> > > > > -               assertTrue(locator.getBeanName() == null
> > > > > -                               || locator.getBeanName().length()
> == 0);
> > > > >                 assertTrue(locator.getBeanType().equals(Bean.class
> ));
> > > > >                 assertTrue(locator.getSpringContextLocator() ==
> > > > > mockCtxLocator);
> > > > >                 assertTrue(factory.getFieldValue(field, obj)
> instanceof
> > > > > ILazyInitProxy);
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
Last reply:

SpringBeanLocator has this:

	public final String getBeanName()
	{
		if (beanName == null || "".equals(beanName))
		{
			beanName = getBeanNameOfClass(getSpringContext(), getBeanType());

		}
		return beanName;
	}

The test had this:

		assertTrue(locator.getBeanName() == null
				|| locator.getBeanName().length() == 0);


Which doesn't make sense does it? And as there was no explanation at
all what that test is supposed to do it looked to me like it was fine
to remove it.

Eelco


On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> There is zero explanation with the unit test, and there was just now a
> breakage fixed that had to do with naming. Put it back if you want,
> but please run the tests first ok?
>
> Eelco
>
> On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > I thought they were irrelevant. Aren't they?
> >
> > Eelco
> >
> >
> > On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > > did you remove these checks because they were irrelevant or because you
> > > wanted to fix the build?
> > >
> > > -igor
> > >
> > >
> > > On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> > > >
> > > > Author: ehillenius
> > > > Date: Sat Mar 17 17:21:18 2007
> > > > New Revision: 519483
> > > >
> > > > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > > > Log:
> > > > fixed build
> > > >
> > > > Modified:
> > > >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > >
> > > > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > URL:
> > > > http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> > > >
> > > > ==============================================================================
> > > > --- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > (original)
> > > > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > > Sat Mar 17 17:21:18 2007
> > > > @@ -71,8 +71,6 @@
> > > >                 proxy = factory.getFieldValue(field, obj);
> > > >                 locator = (SpringBeanLocator) ((ILazyInitProxy) proxy)
> > > >                                 .getObjectLocator();
> > > > -               assertTrue(locator.getBeanName() == null
> > > > -                               || locator.getBeanName().length() == 0);
> > > >                 assertTrue(locator.getBeanType().equals(Bean.class));
> > > >                 assertTrue(locator.getSpringContextLocator() ==
> > > > mockCtxLocator);
> > > >                 assertTrue(factory.getFieldValue(field, obj) instanceof
> > > > ILazyInitProxy);
> > > >
> > > >
> > > >
> > >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
There is zero explanation with the unit test, and there was just now a
breakage fixed that had to do with naming. Put it back if you want,
but please run the tests first ok?

Eelco

On 3/17/07, Eelco Hillenius <ee...@gmail.com> wrote:
> I thought they were irrelevant. Aren't they?
>
> Eelco
>
>
> On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > did you remove these checks because they were irrelevant or because you
> > wanted to fix the build?
> >
> > -igor
> >
> >
> > On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> > >
> > > Author: ehillenius
> > > Date: Sat Mar 17 17:21:18 2007
> > > New Revision: 519483
> > >
> > > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > > Log:
> > > fixed build
> > >
> > > Modified:
> > >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > >
> > > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > URL:
> > > http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> > >
> > > ==============================================================================
> > > --- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > (original)
> > > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > > Sat Mar 17 17:21:18 2007
> > > @@ -71,8 +71,6 @@
> > >                 proxy = factory.getFieldValue(field, obj);
> > >                 locator = (SpringBeanLocator) ((ILazyInitProxy) proxy)
> > >                                 .getObjectLocator();
> > > -               assertTrue(locator.getBeanName() == null
> > > -                               || locator.getBeanName().length() == 0);
> > >                 assertTrue(locator.getBeanType().equals(Bean.class));
> > >                 assertTrue(locator.getSpringContextLocator() ==
> > > mockCtxLocator);
> > >                 assertTrue(factory.getFieldValue(field, obj) instanceof
> > > ILazyInitProxy);
> > >
> > >
> > >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Eelco Hillenius <ee...@gmail.com>.
I thought they were irrelevant. Aren't they?

Eelco


On 3/17/07, Igor Vaynberg <ig...@gmail.com> wrote:
> did you remove these checks because they were irrelevant or because you
> wanted to fix the build?
>
> -igor
>
>
> On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
> >
> > Author: ehillenius
> > Date: Sat Mar 17 17:21:18 2007
> > New Revision: 519483
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> > Log:
> > fixed build
> >
> > Modified:
> >     incubator/wicket/branches/wicket-1.x/jdk-1.5
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> >
> > Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> > /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > URL:
> > http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
> >
> > ==============================================================================
> > --- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > (original)
> > +++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> > Sat Mar 17 17:21:18 2007
> > @@ -71,8 +71,6 @@
> >                 proxy = factory.getFieldValue(field, obj);
> >                 locator = (SpringBeanLocator) ((ILazyInitProxy) proxy)
> >                                 .getObjectLocator();
> > -               assertTrue(locator.getBeanName() == null
> > -                               || locator.getBeanName().length() == 0);
> >                 assertTrue(locator.getBeanType().equals(Bean.class));
> >                 assertTrue(locator.getSpringContextLocator() ==
> > mockCtxLocator);
> >                 assertTrue(factory.getFieldValue(field, obj) instanceof
> > ILazyInitProxy);
> >
> >
> >
>

Re: svn commit: r519483 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java

Posted by Igor Vaynberg <ig...@gmail.com>.
did you remove these checks because they were irrelevant or because you
wanted to fix the build?

-igor


On 3/17/07, ehillenius@apache.org <eh...@apache.org> wrote:
>
> Author: ehillenius
> Date: Sat Mar 17 17:21:18 2007
> New Revision: 519483
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=519483
> Log:
> fixed build
>
> Modified:
>     incubator/wicket/branches/wicket-1.x/jdk-1.5
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
>
> Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5
> /wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> URL:
> http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java?view=diff&rev=519483&r1=519482&r2=519483
>
> ==============================================================================
> --- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> (original)
> +++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/test/java/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java
> Sat Mar 17 17:21:18 2007
> @@ -71,8 +71,6 @@
>                 proxy = factory.getFieldValue(field, obj);
>                 locator = (SpringBeanLocator) ((ILazyInitProxy) proxy)
>                                 .getObjectLocator();
> -               assertTrue(locator.getBeanName() == null
> -                               || locator.getBeanName().length() == 0);
>                 assertTrue(locator.getBeanType().equals(Bean.class));
>                 assertTrue(locator.getSpringContextLocator() ==
> mockCtxLocator);
>                 assertTrue(factory.getFieldValue(field, obj) instanceof
> ILazyInitProxy);
>
>
>