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
138138
139139 Constructor <T > noArgsConstructor = null ;
140140 for (Constructor <?> constructor : clazz .getDeclaredConstructors ()) {
141- if (constructor .getParameterTypes (). length == 0
141+ if (constructor .getParameterCount () == 0
142142 && (isPublic (constructor .getModifiers ()) || isProtected (constructor .getModifiers ()))) {
143143 noArgsConstructor = (Constructor <T >) constructor ;
144144 noArgsConstructor .setAccessible (true );
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ private PropertyReflectionUtils() {}
3232 private static final String SET_PREFIX = "set" ;
3333
3434 static boolean isGetter (final Method method ) {
35- if (method .getParameterTypes (). length > 0 ) {
35+ if (method .getParameterCount () > 0 ) {
3636 return false ;
3737 } else if (method .getName ().startsWith (GET_PREFIX ) && method .getName ().length () > GET_PREFIX .length ()) {
3838 return Character .isUpperCase (method .getName ().charAt (GET_PREFIX .length ()));
@@ -44,7 +44,7 @@ static boolean isGetter(final Method method) {
4444
4545 static boolean isSetter (final Method method ) {
4646 if (method .getName ().startsWith (SET_PREFIX ) && method .getName ().length () > SET_PREFIX .length ()
47- && method .getParameterTypes (). length == 1 ) {
47+ && method .getParameterCount () == 1 ) {
4848 return Character .isUpperCase (method .getName ().charAt (SET_PREFIX .length ()));
4949 }
5050 return false ;
You can’t perform that action at this time.
0 commit comments