Merge branch '1.3.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2016 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.
|
||||
@@ -110,14 +110,16 @@ class TypeElementMembers {
|
||||
|
||||
private boolean isGetter(ExecutableElement method) {
|
||||
String name = method.getSimpleName().toString();
|
||||
return (name.startsWith("get") || name.startsWith("is"))
|
||||
return ((name.startsWith("get") && name.length() > 3)
|
||||
|| (name.startsWith("is") && name.length() > 2))
|
||||
&& method.getParameters().isEmpty()
|
||||
&& (TypeKind.VOID != method.getReturnType().getKind());
|
||||
}
|
||||
|
||||
private boolean isSetter(ExecutableElement method) {
|
||||
final String name = method.getSimpleName().toString();
|
||||
return name.startsWith("set") && method.getParameters().size() == 1
|
||||
return (name.startsWith("set") && name.length() > 3)
|
||||
&& method.getParameters().size() == 1
|
||||
&& (isSetterReturnType(method));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user