Skip to content

Commit 3be3480

Browse files
satwikareddy3meta-codesync[bot]
authored andcommitted
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: 0b76a9ccc3792585c03f84cc92b0a06088ac4277
1 parent 42190d7 commit 3be3480

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/java/com/facebook/ads/sdk/ProductFeedUploadGet.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*/
4343
public class ProductFeedUploadGet extends APINode {
4444
@SerializedName("end_time")
45-
private mixed mEndTime = null;
45+
private Object mEndTime = null;
4646
@SerializedName("error_count")
4747
private Long mErrorCount = null;
4848
@SerializedName("error_report")
@@ -66,7 +66,7 @@ public class ProductFeedUploadGet extends APINode {
6666
@SerializedName("progresses")
6767
private Object mProgresses = null;
6868
@SerializedName("start_time")
69-
private mixed mStartTime = null;
69+
private Object mStartTime = null;
7070
@SerializedName("upload_complete")
7171
private Boolean mUploadComplete = null;
7272
@SerializedName("url")
@@ -224,11 +224,11 @@ public String toString() {
224224
}
225225

226226

227-
public mixed getFieldEndTime() {
227+
public Object getFieldEndTime() {
228228
return mEndTime;
229229
}
230230

231-
public ProductFeedUploadGet setFieldEndTime(mixed value) {
231+
public ProductFeedUploadGet setFieldEndTime(Object value) {
232232
this.mEndTime = value;
233233
return this;
234234
}
@@ -332,11 +332,11 @@ public ProductFeedUploadGet setFieldProgresses(Object value) {
332332
return this;
333333
}
334334

335-
public mixed getFieldStartTime() {
335+
public Object getFieldStartTime() {
336336
return mStartTime;
337337
}
338338

339-
public ProductFeedUploadGet setFieldStartTime(mixed value) {
339+
public ProductFeedUploadGet setFieldStartTime(Object value) {
340340
this.mStartTime = value;
341341
return this;
342342
}

0 commit comments

Comments
 (0)