Skip to content

Commit 9b9df6a

Browse files
committed
Add test
Issue: SPR-13837
1 parent 714ae26 commit 9b9df6a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1763,6 +1763,14 @@ public void cornerSpr10115() {
17631763
assertEquals("val1", Spr10115Bean.prop1);
17641764
}
17651765

1766+
@Test
1767+
public void cornerSpr13837() {
1768+
Spr13837Bean target = new Spr13837Bean();
1769+
AbstractPropertyAccessor accessor = createAccessor(target);
1770+
accessor.setPropertyValue("something", 42);
1771+
assertEquals(Integer.valueOf(42), target.something);
1772+
}
1773+
17661774

17671775
private Person createPerson(String name, String city, String country) {
17681776
return new Person(name, new Address(city, country));
@@ -2201,6 +2209,20 @@ public static void setProp1(String prop1) {
22012209
}
22022210
}
22032211

2212+
static class Spr13837Bean {
2213+
2214+
protected Integer something;
2215+
2216+
public Spr13837Bean setSomething(final Integer something) {
2217+
this.something = something;
2218+
return this;
2219+
}
2220+
2221+
public Integer getSomething() {
2222+
return this.something;
2223+
}
2224+
}
2225+
22042226
@SuppressWarnings("serial")
22052227
public static class ReadOnlyMap<K, V> extends HashMap<K, V> {
22062228

0 commit comments

Comments
 (0)