Skip to content

Commit

Permalink
Don't exclude static local classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Sep 17, 2021
1 parent b82c767 commit fca73eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gson/src/main/java/com/google/gson/internal/Excluder.java
Expand Up @@ -199,7 +199,8 @@ private boolean excludeClassChecks(Class<?> clazz) {
return true;
}

if (isAnonymousOrLocal(clazz)) {
// Permit static local classes, such as Records (Java 16 feature)
if (!isStatic(clazz) && isAnonymousOrLocal(clazz)) {
return true;
}

Expand Down

0 comments on commit fca73eb

Please sign in to comment.