mirror of
https://github.com/microsoft/playwright-java.git
synced 2025-12-28 18:30:43 +00:00
fix: skip syntetic fields when converting options (#804)
This commit is contained in:
parent
3cdefc2931
commit
ea6ede4670
@ -51,6 +51,10 @@ class Utils {
|
||||
try {
|
||||
T result = t.getDeclaredConstructor().newInstance();
|
||||
for (Field toField : t.getDeclaredFields()) {
|
||||
// Skip fields added by test coverage tools, see https://github.com/microsoft/playwright-java/issues/802
|
||||
if (toField.isSynthetic()) {
|
||||
continue;
|
||||
}
|
||||
if (Modifier.isStatic(toField.getModifiers())) {
|
||||
throw new RuntimeException("Unexpected field modifiers: " + t.getCanonicalName() + "." + toField.getName() + ", modifiers: " + toField.getModifiers());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user