Skip to content

Commit 3e984b6

Browse files
committed
don't use JDK 7 methods yet
1 parent f741472 commit 3e984b6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

flapi-runtime/src/main/java/unquietcode/tools/flapi/runtime/SpringMethodUtils.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ public class SpringMethodUtils {
3838
* @return the Method object, or {@code null} if none found
3939
*/
4040
public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
41-
Objects.requireNonNull(clazz, "Class must not be null");
42-
Objects.requireNonNull(name, "Method name must not be null");
41+
if (clazz == null) {
42+
throw new NullPointerException("Class must not be null");
43+
}
44+
45+
if (name == null) {
46+
throw new NullPointerException("Method name must not be null");
47+
}
4348

4449
Class<?> searchType = clazz;
4550
while (searchType != null) {

0 commit comments

Comments
 (0)