Skip to content

Commit 915ce56

Browse files
committed
Minor code improvements
1 parent 7660e74 commit 915ce56

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

gson/src/main/java/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ public T read(JsonReader in) throws IOException {
127127
public void write(JsonWriter out, T value) throws IOException {
128128
out.nullValue();
129129
}
130+
131+
@Override
132+
public String toString() {
133+
return "AnonymousOrNonStaticLocalClassAdapter";
134+
}
130135
};
131136
}
132137

gson/src/main/java/com/google/gson/internal/reflect/ReflectionHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private static void appendExecutableParameters(
148148
}
149149

150150
public static boolean isStatic(Class<?> clazz) {
151-
return (clazz.getModifiers() & Modifier.STATIC) != 0;
151+
return Modifier.isStatic(clazz.getModifiers());
152152
}
153153

154154
/** Returns whether the class is anonymous or a non-static local class. */

0 commit comments

Comments
 (0)