File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
bson/src/main/org/bson/codecs/pojo Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ static <T> void configureClassModelBuilder(final ClassModelBuilder<T> classModel
138
138
139
139
Constructor <T > noArgsConstructor = null ;
140
140
for (Constructor <?> constructor : clazz .getDeclaredConstructors ()) {
141
- if (constructor .getParameterTypes (). length == 0
141
+ if (constructor .getParameterCount () == 0
142
142
&& (isPublic (constructor .getModifiers ()) || isProtected (constructor .getModifiers ()))) {
143
143
noArgsConstructor = (Constructor <T >) constructor ;
144
144
noArgsConstructor .setAccessible (true );
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ private PropertyReflectionUtils() {}
32
32
private static final String SET_PREFIX = "set" ;
33
33
34
34
static boolean isGetter (final Method method ) {
35
- if (method .getParameterTypes (). length > 0 ) {
35
+ if (method .getParameterCount () > 0 ) {
36
36
return false ;
37
37
} else if (method .getName ().startsWith (GET_PREFIX ) && method .getName ().length () > GET_PREFIX .length ()) {
38
38
return Character .isUpperCase (method .getName ().charAt (GET_PREFIX .length ()));
@@ -44,7 +44,7 @@ static boolean isGetter(final Method method) {
44
44
45
45
static boolean isSetter (final Method method ) {
46
46
if (method .getName ().startsWith (SET_PREFIX ) && method .getName ().length () > SET_PREFIX .length ()
47
- && method .getParameterTypes (). length == 1 ) {
47
+ && method .getParameterCount () == 1 ) {
48
48
return Character .isUpperCase (method .getName ().charAt (SET_PREFIX .length ()));
49
49
}
50
50
return false ;
You can’t perform that action at this time.
0 commit comments