File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
src/main/java/org/weakref/jmx Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 4040 <scope >test</scope >
4141 </dependency >
4242
43- <dependency >
44- <groupId >io.airlift</groupId >
45- <artifactId >parameternames</artifactId >
46- <version >1.5</version >
47- </dependency >
48-
4943 <dependency >
5044 <groupId >com.google.inject</groupId >
5145 <artifactId >guice</artifactId >
Original file line number Diff line number Diff line change 2121
2222import java .lang .annotation .Annotation ;
2323import java .lang .reflect .Method ;
24+ import java .lang .reflect .Parameter ;
25+ import java .util .Arrays ;
2426import java .util .List ;
2527
2628import static com .google .common .base .Preconditions .checkArgument ;
27- import static io .airlift .parameternames .ParameterNames .getParameterNames ;
2829import static java .util .Objects .requireNonNull ;
30+ import static java .util .stream .Collectors .toUnmodifiableList ;
2931
3032public class MBeanOperationBuilder
3133{
@@ -71,7 +73,10 @@ public MBeanOperation build()
7173
7274 //
7375 // Build Parameter Infos
74- List <String > parameterNames = getParameterNames (concreteMethod );
76+ List <String > parameterNames = Arrays .stream (concreteMethod .getParameters ())
77+ .map (Parameter ::getName )
78+ .collect (toUnmodifiableList ());
79+
7580 Class <?>[] types = concreteMethod .getParameterTypes ();
7681
7782 // Parameter annotations used form descriptor come from the annotated method, not the public method
You can’t perform that action at this time.
0 commit comments