Skip to content

Commit

Permalink
apache#2045 add empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
cvictory committed Mar 12, 2019
1 parent 58cf410 commit feaa9cc
Showing 1 changed file with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,29 @@ public MethodConfig() {

public MethodConfig(Method method) {
appendAnnotation(Method.class, method);

this.setReturn(method.isReturn());
this.setOninvoke(method.oninvoke());
this.setOnreturn(method.onreturn());
this.setOnthrow(method.onthrow());

if(!"".equals(method.oninvoke())){
this.setOninvoke(method.oninvoke());
}
if(!"".equals(method.onreturn())){
this.setOnreturn(method.onreturn());
}
if(!"".equals(method.onthrow())){
this.setOnthrow(method.onthrow());
}
//if "" of @Method, then should set to null
// if("".equals(this.loadbalance)){
// this.setLoadbalance(null);
// }
// if("".equals(this.cache)){
// this.setLoadbalance(null);
// }
// if("".equals(this.validation)){
// this.setValidation(null);
// }

if (method.arguments() != null && method.arguments().length != 0) {
List<ArgumentConfig> argumentConfigs = new ArrayList<ArgumentConfig>(method.arguments().length);
this.setArguments(argumentConfigs);
Expand Down

0 comments on commit feaa9cc

Please sign in to comment.