[
https://issues.apache.org/jira/browse/SCB-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597144#comment-16597144
]
ASF GitHub Bot commented on SCB-873:
------------------------------------
wujimin commented on a change in pull request #884: [SCB-873] Make the
validation result display the parameter name instead of arg0, arg1
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/884#discussion_r213928364
##########
File path:
swagger/swagger-invocation/invocation-validator/src/main/java/org/apache/servicecomb/swagger/invocation/validator/ParanamerParameterNameProvider.java
##########
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.swagger.invocation.validator;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Parameter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.validation.ParameterNameProvider;
+
+import org.apache.servicecomb.swagger.generator.core.utils.ParamUtils;
+
+
+public class ParanamerParameterNameProvider implements ParameterNameProvider {
Review comment:
getParameterNames will be invoke for every invocation
and for the same input will always return the same result
so better to cache them?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Make the validation result display the parameter name instead of arg0, arg1
> ---------------------------------------------------------------------------
>
> Key: SCB-873
> URL: https://issues.apache.org/jira/browse/SCB-873
> Project: Apache ServiceComb
> Issue Type: Improvement
> Components: Java-Chassis
> Affects Versions: java-chassis-1.0.0
> Reporter: WeiChao
> Assignee: WeiChao
> Priority: Major
> Fix For: java-chassis-1.1.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)