{"record":{"id":"3b899112328cd233","repo":"microg/GmsCore","slug":"field-name-in-clazz-fullname-has-unsupported-t","errorCode":null,"errorMessage":"Field $name in ${clazz.fullName} has unsupported type $type.","messagePattern":"Field \\$name in (.+?) has unsupported type \\$type\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt","lineNumber":368,"sourceCode":"            \"java.util.List<java.lang.Long>\", \"java.util.ArrayList<java.lang.Long>\" -> when {\n                !useValueParcel -> \"$variableName = $SafeParcelReader.readLongList(parcel, header)\"\n                else -> \"$variableName = $SafeParcelReader.readList(parcel, header, java.lang.Long.class.getClassLoader())\"\n            }\n            \"java.util.List<java.lang.Float>\", \"java.util.ArrayList<java.lang.Float>\" -> when {\n                !useValueParcel -> \"$variableName = $SafeParcelReader.readFloatList(parcel, header)\"\n                else -> \"$variableName = $SafeParcelReader.readList(parcel, header, java.lang.Float.class.getClassLoader())\"\n            }\n            \"java.util.List<java.lang.Double>\", \"java.util.ArrayList<java.lang.Double>\" -> when {\n                !useValueParcel -> \"$variableName = $SafeParcelReader.readDoubleList(parcel, header)\"\n                else -> \"$variableName = $SafeParcelReader.readList(parcel, header, java.lang.Double.class.getClassLoader())\"\n            }\n            else -> when {\n                isList && isParcelable && !useValueParcel -> \"$variableName = $SafeParcelReader.readParcelableList(parcel, header, $listItemType.CREATOR)\"\n                isArray && isParcelable -> \"$variableName = $SafeParcelReader.readParcelableArray(parcel, header, $listItemType.CREATOR)\"\n                isList -> \"$variableName = $SafeParcelReader.readList(parcel, header, $listItemType.class.getClassLoader())\"\n                isParcelable -> \"$variableName = $SafeParcelReader.readParcelable(parcel, header, $type.CREATOR)\"\n                !isList && isIInterface -> \"$variableName = $type.Stub.asInterface($SafeParcelReader.readBinder(parcel, header))\"\n                else -> throw UnsupportedOperationException(\"Field $name in ${clazz.fullName} has unsupported type $type.\")\n            }\n        }\n    }\n    val readVariableFromParcelCase by lazy { \"case $id: $readVariableFromParcel; break;\" }\n    val writeVariableToParcel by lazy {\n        when (type) {\n            \"boolean\", \"byte\", \"char\", \"short\", \"int\", \"long\", \"float\", \"double\",\n            \"java.lang.Boolean\", \"java.lang.Byte\", \"java.lang.Char\", \"java.lang.Short\", \"java.lang.Integer\", \"java.lang.Long\", \"java.lang.Float\", \"java.lang.Double\" ->\n                \"$SafeParcelWriter.write(parcel, $id, $variableName);\"\n\n            \"java.util.List<java.lang.String>\", \"java.util.ArrayList<java.lang.String>\" -> when {\n                !useValueParcel -> \"$SafeParcelWriter.writeStringList(parcel, $id, $variableName, $mayNull);\"\n                else -> \"$SafeParcelWriter.write(parcel, $id, $variableName, $mayNull);\"\n            }\n\n            \"java.util.List<java.lang.Integer>\", \"java.util.ArrayList<java.lang.Integer>\" -> when {\n                !useValueParcel -> \"$SafeParcelWriter.writeIntegerList(parcel, $id, $variableName, $mayNull);\"\n                else -> \"$SafeParcelWriter.write(parcel, $id, $variableName, $mayNull);\"","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt#L350-L386","documentation":"SafeParcelProcessor's FieldInfo throws this when generating parcel-read code for a field whose type it cannot map to a SafeParcelReader call. The processor supports primitives, Parcelable lists/arrays, Binders/IInterface, and Parcelable types with CREATORs; anything else is unsupported at compile time.","triggerScenarios":"Declaring a @Field on a type not covered by the mapping — e.g. generic Maps, custom non-Parcelable objects, arrays of arrays, interfaces without Stub, types without a static CREATOR — triggering the `else -> throw` in readVariableFromParcel.","commonSituations":"Using Map<K,V> or Set fields; forgetting to make a nested class Parcelable; field typed as an abstract class without CREATOR; recently refactored a field to a new type the processor doesn't know.","solutions":["Change the field type to one SafeParcel supports (primitive, String, Bundle, IBinder, Parcelable with CREATOR, or List/Array of those).","Make the field's type Parcelable with a static CREATOR and reprocess.","Exclude/refactor unsupported fields (e.g. convert Map to List<Pair>) or persist them another way.","Check the processor's supported-type list in SafeParcelProcessor.kt and add a case if you own the code."],"exampleFix":"// before\n@Field(10) val config: HashMap<String, String>\n// after\n@Field(10) val config: List<String>","handlingStrategy":"validation","validationCode":"// compile-time guard: field types must be primitives, String, Bundle, IBinder,\n// or Parcelable with CREATOR (optionally List/Array of those)\nrequire(myField is Parcelable || myField is String || myField is Number)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use SafeParcel-supported field types","Make nested types Parcelable with a CREATOR before referencing them in @Field","Avoid Map/Set/generic fields in parcelable models","Run the processor build early to catch unsupported fields at compile time"],"tags":["kotlin","annotation-processor","parcelable","compile-time"],"backgroundTag":"type-mismatch","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}