Skip to content

Commit

Permalink
add missing HashMap import
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Apr 6, 2024
1 parent 1ceaaac commit f60b25a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Generator/Java.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ private function getImports(TypeAbstract $origin): array
$imports[] = 'import java.util.Map;';
}

if ($origin instanceof MapType) {
$imports[] = 'import java.util.HashMap;';
}

return $imports;
}
}
1 change: 1 addition & 0 deletions tests/Generator/resource/java/java.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public Location getOrigin() {
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
import java.util.Map;
import java.util.HashMap;
public class Meta extends HashMap<String, String> {
}

Expand Down

0 comments on commit f60b25a

Please sign in to comment.