Skip to content

Commit

Permalink
remove redundant modifiers (#7510)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningCN authored Apr 7, 2021
1 parent f280a22 commit 6055932
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface MethodUtils {
* @param method the method to check
* @return whether the given method is setter method
*/
public static boolean isSetter(Method method) {
static boolean isSetter(Method method) {
return method.getName().startsWith("set")
&& !"set".equals(method.getName())
&& Modifier.isPublic(method.getModifiers())
Expand All @@ -66,7 +66,7 @@ public static boolean isSetter(Method method) {
* @param method the method to check
* @return whether the given method is getter method
*/
public static boolean isGetter(Method method) {
static boolean isGetter(Method method) {
String name = method.getName();
return (name.startsWith("get") || name.startsWith("is"))
&& !"get".equals(name) && !"is".equals(name)
Expand All @@ -83,7 +83,7 @@ public static boolean isGetter(Method method) {
* @param method the method to check
* @return whether the given method is meta method
*/
public static boolean isMetaMethod(Method method) {
static boolean isMetaMethod(Method method) {
String name = method.getName();
if (!(name.startsWith("get") || name.startsWith("is"))) {
return false;
Expand Down Expand Up @@ -114,7 +114,7 @@ public static boolean isMetaMethod(Method method) {
* @param method the method to check
* @return whether the given method is deprecated method
*/
public static boolean isDeprecated(Method method) {
static boolean isDeprecated(Method method) {
return method.getAnnotation(Deprecated.class) != null;
}

Expand Down

0 comments on commit 6055932

Please sign in to comment.