Skip to content

Commit 90972c6

Browse files
authored
add type check in the equal method (#11346)
1 parent 915af3a commit 90972c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,14 @@ public CodegenSecurity filterByScopeNames(List<String> filterScopes) {
451451

452452
@Override
453453
public boolean equals(Object o) {
454+
if (o == null) {
455+
return false;
456+
}
457+
458+
if (this.getClass() != o.getClass()) {
459+
return false;
460+
}
461+
454462
boolean result = super.equals(o);
455463
JavaPlayFrameworkCodegen.ExtendedCodegenSecurity that = (JavaPlayFrameworkCodegen.ExtendedCodegenSecurity) o;
456464
return result &&

0 commit comments

Comments
 (0)