Skip to content

Commit bf044de

Browse files
committed
Update release notes wrt #109
1 parent b0eff81 commit bf044de

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

mrbean/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ ${project.groupId}.mrbean.*;version=${project.version}
5555
<groupId>org.apache.maven.plugins</groupId>
5656
<artifactId>maven-compiler-plugin</artifactId>
5757
<configuration>
58-
<!-- Enable testing with Java 8 features, especially default methods in interfaces -->
58+
<!-- [modules-base#109] Enable testing with Java 8 features,
59+
especially default methods in interfaces
60+
-->
5961
<testSource>1.8</testSource>
6062
<testTarget>1.8</testTarget>
6163
</configuration>

mrbean/src/main/java/com/fasterxml/jackson/module/mrbean/BeanBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ protected boolean hasConcreteOverride(Method m0, JavaType implementedType)
182182
final String name = m0.getName();
183183
final Class<?>[] argTypes = m0.getParameterTypes();
184184
try {
185-
// getMethod returns the most-specific method implementation, for public methods only (which is any method in an interface)
185+
// 22-Sep-2020: [modules-base#109]: getMethod returns the most-specific method
186+
// implementation, for public methods only (which is any method in an interface)
186187
Method effectiveMethod = implementedType.getRawClass().getMethod(name, argTypes);
187188
if (BeanUtil.isConcrete(effectiveMethod)) {
188189
return true;

mrbean/src/test/java/com/fasterxml/jackson/module/mrbean/TestSimpleMaterializedInterfaces.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ private Class<?> _materializeRawType(AbstractTypeMaterializer mat,
142142
*/
143143
public void testSimpleInteface() throws Exception
144144
{
145-
ObjectMapper mapper = new ObjectMapper();
146-
mapper.registerModule(new MrBeanModule());
145+
ObjectMapper mapper = newMrBeanMapper();
147146
Bean bean = mapper.readValue("{\"a\":\"value\",\"x\":123 }", Bean.class);
148147
assertNotNull(bean);
149148
assertEquals("value", bean.getA());
@@ -155,8 +154,7 @@ public void testSimpleInteface() throws Exception
155154
*/
156155
public void testBeanHolder() throws Exception
157156
{
158-
ObjectMapper mapper = new ObjectMapper();
159-
mapper.registerModule(new MrBeanModule());
157+
ObjectMapper mapper = newMrBeanMapper();
160158
BeanHolder holder = mapper.readValue("{\"bean\":{\"a\":\"b\",\"x\":-4 }}", BeanHolder.class);
161159
assertNotNull(holder);
162160
Bean bean = holder.getBean();
@@ -167,8 +165,7 @@ public void testBeanHolder() throws Exception
167165

168166
public void testArrayInterface() throws Exception
169167
{
170-
ObjectMapper mapper = new ObjectMapper();
171-
mapper.registerModule(new MrBeanModule());
168+
ObjectMapper mapper = newMrBeanMapper();
172169
ArrayBean bean = mapper.readValue("{\"values\":[1,2,3], \"words\": [ \"cool\", \"beans\" ] }",
173170
ArrayBean.class);
174171
assertNotNull(bean);
@@ -178,15 +175,15 @@ public void testArrayInterface() throws Exception
178175

179176
public void testSubInterface() throws Exception
180177
{
181-
ObjectMapper mapper = new ObjectMapper();
182-
mapper.registerModule(new MrBeanModule());
178+
ObjectMapper mapper = newMrBeanMapper();
183179
BeanWithY bean = mapper.readValue("{\"a\":\"b\",\"x\":1, \"y\":2 }", BeanWithY.class);
184180
assertNotNull(bean);
185181
assertEquals("b", bean.getA());
186182
assertEquals(1, bean.getX());
187183
assertEquals(2, bean.getY());
188184
}
189185

186+
// [modules-base#109]
190187
public void testDefaultMethodInInterface() throws Exception
191188
{
192189
ObjectMapper mapper = newMrBeanMapper();
@@ -197,6 +194,7 @@ public void testDefaultMethodInInterface() throws Exception
197194
assertTrue(bean.anyValuePresent());
198195
}
199196

197+
// [modules-base#109]
200198
public void testInheritedDefaultMethodInInterface() throws Exception
201199
{
202200
ObjectMapper mapper = newMrBeanMapper();
@@ -235,7 +233,7 @@ public void testPartialBean() throws Exception
235233
}
236234
}
237235

238-
// As per [JACKSON-683]: fail gracefully if super type not public
236+
// Fail gracefully if super type not public
239237
public void testNonPublic() throws Exception
240238
{
241239
ObjectMapper mapper = new ObjectMapper();
@@ -247,5 +245,4 @@ public void testNonPublic() throws Exception
247245
verifyException(e, "is not public");
248246
}
249247
}
250-
251248
}

release-notes/CREDITS-2.x

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ Harrison Houghton (hrhino@github)
5050

5151
Bartosz Baranowski (baranowb@github)
5252

53-
* Reported #84: Add expand entity protection and secure processing to
53+
* Reported #84: (jaxb) Add expand entity protection and secure processing to
5454
DomElementJsonDeserializer
5555
(2.10.0)
56-
56+
57+
58+
Robby Morgan (robbytx@github)
59+
60+
* Contributed #109: (mrbean) Fix detection of inherited default method in Java 8+ interface
61+
(2.11.3)
62+

release-notes/VERSION-2.x

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Modules:
1010
=== Releases ===
1111
------------------------------------------------------------------------
1212

13+
2.11.3 (not yet released)
14+
15+
#109: (mrbean) Fix detection of inherited default method in Java 8+ interface
16+
(contributed by Robby M)
17+
1318
2.11.2 (02-Aug-2020)
1419

1520
- (mrbean / afterburner) Asm version 7.0 -> 7.3.1

0 commit comments

Comments
 (0)