Revised ExtendedBeanInfo test for SPR-8937 (for JDK 8u40 compatibility)
Issue: SPR-12582
This commit is contained in:
parent
ec84fa6da3
commit
7492129236
|
|
@ -841,19 +841,24 @@ public class ExtendedBeanInfoTests {
|
||||||
public String getAddress(int index){ return null; }
|
public String getAddress(int index){ return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // baseline. ExtendedBeanInfo needs to behave exactly like the following
|
// Baseline: ExtendedBeanInfo needs to behave exactly like the following...
|
||||||
|
boolean hasReadMethod;
|
||||||
|
boolean hasWriteMethod;
|
||||||
|
boolean hasIndexedReadMethod;
|
||||||
|
boolean hasIndexedWriteMethod;
|
||||||
|
{
|
||||||
BeanInfo bi = Introspector.getBeanInfo(A.class);
|
BeanInfo bi = Introspector.getBeanInfo(A.class);
|
||||||
assertThat(hasReadMethodForProperty(bi, "address"), is(false));
|
hasReadMethod = hasReadMethodForProperty(bi, "address");
|
||||||
assertThat(hasWriteMethodForProperty(bi, "address"), is(false));
|
hasWriteMethod = hasWriteMethodForProperty(bi, "address");
|
||||||
assertThat(hasIndexedReadMethodForProperty(bi, "address"), is(true));
|
hasIndexedReadMethod = hasIndexedReadMethodForProperty(bi, "address");
|
||||||
assertThat(hasIndexedWriteMethodForProperty(bi, "address"), is(true));
|
hasIndexedWriteMethod = hasIndexedWriteMethodForProperty(bi, "address");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
BeanInfo bi = new ExtendedBeanInfo(Introspector.getBeanInfo(A.class));
|
BeanInfo bi = new ExtendedBeanInfo(Introspector.getBeanInfo(A.class));
|
||||||
assertThat(hasReadMethodForProperty(bi, "address"), is(false));
|
assertEquals(hasReadMethodForProperty(bi, "address"), hasReadMethod);
|
||||||
assertThat(hasWriteMethodForProperty(bi, "address"), is(false));
|
assertEquals(hasWriteMethodForProperty(bi, "address"), hasWriteMethod);
|
||||||
assertThat(hasIndexedReadMethodForProperty(bi, "address"), is(true));
|
assertEquals(hasIndexedReadMethodForProperty(bi, "address"), hasIndexedReadMethod);
|
||||||
assertThat(hasIndexedWriteMethodForProperty(bi, "address"), is(true));
|
assertEquals(hasIndexedWriteMethodForProperty(bi, "address"), hasIndexedWriteMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue