Polishing

This commit is contained in:
Juergen Hoeller
2023-07-04 21:24:35 +02:00
parent e945e7426e
commit c1a8b9a14d
2 changed files with 11 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -218,6 +218,7 @@ public class HandlerMethod {
this.description = handlerMethod.description;
}
private MethodParameter[] initMethodParameters() {
int count = this.bridgedMethod.getParameterCount();
MethodParameter[] result = new MethodParameter[count];
@@ -248,7 +249,7 @@ public class HandlerMethod {
for (Class<?> paramType : method.getParameterTypes()) {
joiner.add(paramType.getSimpleName());
}
return beanType.getName() + "#" + method.getName() + joiner.toString();
return beanType.getName() + "#" + method.getName() + joiner;
}
@@ -424,13 +425,8 @@ public class HandlerMethod {
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof HandlerMethod otherMethod)) {
return false;
}
return (this.bean.equals(otherMethod.bean) && this.method.equals(otherMethod.method));
return (this == other || (other instanceof HandlerMethod otherMethod &&
this.bean.equals(otherMethod.bean) && this.method.equals(otherMethod.method)));
}
@Override