Commit 3be3480
Fix Java codegen: map Hack 'mixed' type to 'Object'
Summary:
The Maven build was failing with 'cannot find symbol: class mixed' in
ProductFeedUploadGet.java at 6 locations (fields/getters/setters for
end_time and start_time). 'mixed' is a Hack/PHP type meaning 'any
type'; it is not a valid Java type, so it leaked verbatim from the
API spec into the generated Java source.
Root cause:
- codegen/api_specs/specs/ProductFeedUploadGet.json declares
end_time and start_time with 'type': 'mixed'.
- CodeGenLanguageJava.js had no mapping for 'mixed', so the type was
emitted as-is.
Changes:
- codegen/lib/processors/CodeGenLanguageJava.js: add a mapping
'mixed' -> 'Object' (Java's equivalent of 'any type') so future
regenerations produce valid Java for any spec field typed 'mixed'.
- sdk/servers/java/release/.../ProductFeedUploadGet.java: replace
the 6 occurrences of 'mixed' with 'Object' to unblock the build
without re-running the full codegen.
Note: The 'mixed' references in AdReportRun.java and AdsInsights.java
are enum *value strings* ("mixed"), not types, so they are not
affected and compile correctly.
Reviewed By: jdholstein
Differential Revision: D107971413
fbshipit-source-id: 0b76a9ccc3792585c03f84cc92b0a06088ac42771 parent 42190d7 commit 3be3480
1 file changed
Lines changed: 6 additions & 6 deletions
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
0 commit comments