Skip to content

Commit cc28a1b

Browse files
committed
Added null filtering to methods
1 parent ff30c0d commit cc28a1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/javawebstack/httpserver/router/RouteBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private static List<Method> getMethodsRecursive(Class<?> type) {
187187
List<Method> methods = new ArrayList<>(Arrays.asList(type.getDeclaredMethods()));
188188
if (type.getSuperclass() != null && type.getSuperclass() != Object.class)
189189
methods.addAll(getMethodsRecursive(type.getSuperclass()));
190-
return methods;
190+
return methods.stream().filter(Objects::nonNull).collect(Collectors.toList());
191191
}
192192

193193
private static class BindMapper {

0 commit comments

Comments
 (0)