Skip to content

Commit e0dde49

Browse files
pujaganidiemol
andauthored
Update toJson() method creation for integer type in CdpClientGenerator. (#8997)
Co-authored-by: Diego Molina <[email protected]>
1 parent 27fe2d9 commit e0dde49

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/client/src/org/openqa/selenium/devtools/CdpClientGenerator.java

+3
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,9 @@ public TypeDeclaration<?> toTypeDeclaration() {
769769
if (type.equals("object")) {
770770
toJson.setType("java.util.Map<String, Object>");
771771
toJson.getBody().get().addStatement(String.format("return %s;", propertyName));
772+
} else if (type.equals("integer")) {
773+
toJson.setType(Integer.class);
774+
toJson.getBody().get().addStatement(String.format("return %s;", propertyName));
772775
} else {
773776
toJson.setType(String.class);
774777
toJson.getBody().get().addStatement(String.format("return %s.toString();", propertyName));

0 commit comments

Comments
 (0)