Skip to content

Commit d52fec9

Browse files
committed
Merge branch '2.10'
2 parents 9e5183b + 1e1351a commit d52fec9

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ language: java
22

33
jdk:
44
- openjdk8
5-
- oraclejdk9
5+
- openjdk11
66

7-
# whitelist
7+
# allow-list to prevent build of all branches
88
branches:
99
only:
1010
- master

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public BeanBuilder implement(boolean failOnUnrecognized)
7070
// First: find all supertypes:
7171
implTypes.add(_type);
7272
BeanUtil.findSuperTypes(_type, Object.class, implTypes);
73-
final boolean hasConcrete = !_type.isInterface();
74-
73+
7574
for (JavaType impl : implTypes) {
7675
TypeResolutionContext ctxt = buildTypeContext(impl);
7776

@@ -109,7 +108,7 @@ public BeanBuilder implement(boolean failOnUnrecognized)
109108
continue;
110109
}
111110
// [module-mrbean#11]: try to support overloaded methods
112-
if (hasConcrete && hasConcreteOverride(m, _type)) {
111+
if (hasConcreteOverride(m, _type)) {
113112
continue;
114113
}
115114
if (failOnUnrecognized) {
@@ -119,14 +118,13 @@ public BeanBuilder implement(boolean failOnUnrecognized)
119118
_unsupportedMethods.put(methodName, m);
120119
}
121120
}
122-
123121
return this;
124122
}
125123

126124
/**
127125
* Method that generates byte code for class that implements abstract
128126
* types requested so far.
129-
*
127+
*
130128
* @param className Fully-qualified name of the class to generate
131129
* @return Byte code Class instance built by this builder
132130
*/
@@ -171,7 +169,7 @@ public byte[] build(String className)
171169
/**
172170
* Helper method used to detect if an abstract method found in a base class
173171
* may actually be implemented in a (more) concrete sub-class.
174-
*
172+
*
175173
* @since 2.4
176174
*/
177175
protected boolean hasConcreteOverride(Method m0, JavaType implementedType)
@@ -191,7 +189,7 @@ protected boolean hasConcreteOverride(Method m0, JavaType implementedType)
191189
}
192190
return false;
193191
}
194-
192+
195193
protected String getPropertyName(String methodName)
196194
{
197195
int prefixLen = methodName.startsWith("is") ? 2 : 3;
@@ -215,7 +213,7 @@ protected void addGetter(TypeResolutionContext ctxt, Method m)
215213
POJOProperty prop = findProperty(ctxt, getPropertyName(m.getName()));
216214
// only set if not yet set; we start with super class:
217215
if (prop.getGetter() == null) {
218-
prop.setGetter(m);
216+
prop.setGetter(m);
219217
}
220218
}
221219

@@ -236,7 +234,7 @@ protected POJOProperty findProperty(TypeResolutionContext ctxt, String propName)
236234
}
237235
return prop;
238236
}
239-
237+
240238
protected final static boolean returnsBoolean(Method m)
241239
{
242240
Class<?> rt = m.getReturnType();

release-notes/CREDITS-2.x

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ Jeffrey Bagdis (jbagdis@github)
4848
* Reported, contributed fix for #49: Afterburner `MyClassLoader#loadAndResolve()`
4949
is not idempotent when `tryToUseParent` is true
5050
(2.9.9)
51+
52+
Harrison Houghton (hrhino@github)
53+
54+
* Suggested, contributed impl for #52: Interfaces may have non-abstract methods (since java8)
55+
(2.10.0)

release-notes/VERSION-2.x

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Modules:
1212

1313
2.10.0 (not yet released)
1414

15-
#79: Add simple module-info for JDK9+, using Moditect
15+
#52: (mrbean) Interfaces may have non-abstract methods (since java8)
16+
(suggested by Harrison H)
17+
#79: (all) Add simple module-info for JDK9+, using Moditect
1618
- Update `asm` version 5.2 -> 7.0 for JDK 11 support
1719
- Remove SPI metadata for OSGi module as there is no 0-arg constructor, does
1820
not work

0 commit comments

Comments
 (0)