mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Make private methods static where possible
This avoids an unneeded object reference. Found via error-prone.
This commit is contained in:
parent
c8ae720caf
commit
f63d21fd13
2 changed files with 5 additions and 5 deletions
|
@ -1496,11 +1496,11 @@ public class JSONObject {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isValidMethodName(String name) {
|
||||
private static boolean isValidMethodName(String name) {
|
||||
return !"getClass".equals(name) && !"getDeclaringClass".equals(name);
|
||||
}
|
||||
|
||||
private String getKeyNameFromMethod(Method method) {
|
||||
private static String getKeyNameFromMethod(Method method) {
|
||||
final int ignoreDepth = getAnnotationDepth(method, JSONPropertyIgnore.class);
|
||||
if (ignoreDepth > 0) {
|
||||
final int forcedNameDepth = getAnnotationDepth(method, JSONPropertyName.class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue