Skip to content

Commit

Permalink
Replace getParameterTypes().length with getParameterCount()
Browse files Browse the repository at this point in the history
Fixes #1601

Signed-off-by: Clara Fang <[email protected]>
  • Loading branch information
clara0 authored and lukasj committed Mar 16, 2022
1 parent e7b0c5f commit b0c74f5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -475,7 +476,7 @@ private void addFactory(Object factory) {
// look for methods whose signature is T createXXX()
if(!m.getName().startsWith("create"))
continue;
if(m.getParameterTypes().length>0)
if(m.getParameterCount()>0)
continue;

Class type = m.getReturnType();
Expand Down

0 comments on commit b0c74f5

Please sign in to comment.