{"record":{"id":"c11a942e650be337","repo":"quarkusio/quarkus","slug":"function-functionname-has-paramtype-type","errorCode":null,"errorMessage":"Function '${functionName}' has ${paramType} type 'Byte[]' (boxed byte array). Use 'byte[]' (primitive byte array) instead. Byte[] is not supported for binary data handling in Funqy Knative Events.","messagePattern":"Function '(.+?)' has (.+?) type 'Byte\\[\\]' \\(boxed byte array\\)\\. Use 'byte\\[\\]' \\(primitive byte array\\) instead\\. Byte\\[\\] is not supported for binary data handling in Funqy Knative Events\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-knative-events/runtime/src/main/java/io/quarkus/funqy/runtime/bindings/knative/events/KnativeEventsBindingRecorder.java","lineNumber":295,"sourceCode":"        // empty set is sub-set of any set\n        if (first.size() <= 0 || second.size() <= 0) {\n            log.warn(\"Invoker \" + name + \" has multiple matching filters \" + one + \" \" + two);\n            return true;\n        }\n\n        boolean result = first.size() <= second.size() ? second.containsAll(first) : first.containsAll(second);\n        if (result) {\n            log.warn(\"Invoker \" + name + \" has multiple matching filters \" + one + \" \" + two);\n        }\n        return result;\n    }\n\n    private void validateNotBoxedByteArray(Type type, String functionName, String paramType) {\n        Class<?> rawType = Reflections.getRawType(type);\n        if (rawType != null && rawType.isArray()) {\n            Class<?> componentType = rawType.getComponentType();\n            if (Byte.class.equals(componentType)) {\n                throw new IllegalStateException(\n                        \"Function '\" + functionName + \"' has \" + paramType + \" type 'Byte[]' (boxed byte array). \" +\n                                \"Use 'byte[]' (primitive byte array) instead. \" +\n                                \"Byte[] is not supported for binary data handling in Funqy Knative Events.\");\n            }\n        }\n    }\n}\n","sourceCodeStart":277,"sourceCodeEnd":303,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-knative-events/runtime/src/main/java/io/quarkus/funqy/runtime/bindings/knative/events/KnativeEventsBindingRecorder.java#L277-L303","documentation":"Funqy Knative Events validates function parameter and return types when binding recorders initialize. A Byte[] (boxed byte array) parameter or return type is rejected because binary CloudEvent data is handled with primitive byte[]; the boxed variant is not supported. The check throws IllegalStateException during startup.","triggerScenarios":"Declaring a @Funq function whose parameter or return type is java.lang.Byte[] (e.g. void f(Byte[] data) or Byte[] f(String in)) in a project using quarkus-funqy-knative-events.","commonSituations":"Converting code from other frameworks where Byte[] was the convention; IDE auto-boxing when generating array types; developers confusing Byte[] with byte[] for binary payload handling.","solutions":["Change the parameter/return type from Byte[] to the primitive byte[]","If individual Byte values are needed elsewhere, convert inside the function body (ArrayUtils.toPrimitive / manual copy)","Rebuild and restart; validation runs at startup so the fix is verified immediately"],"exampleFix":"// before\n@Funq public void process(byte[] ignored, Byte[] data) { ... }\n// after\n@Funq public void process(byte[] ignored, byte[] data) { ... }","handlingStrategy":"validation","validationCode":"// Guard before declaring/using a Funqy knative-events function\nstatic void ensureNotBoxedByteArray(Type type, String name) {\n    Class<?> raw = Reflections.getRawType(type);\n    if (raw != null && raw.isArray() && Byte.class.equals(raw.getComponentType()))\n        throw new IllegalStateException(name + \" must use byte[] not Byte[]\");\n}","typeGuard":"static boolean isPrimitiveByteArray(Type t) {\n    Class<?> raw = Reflections.getRawType(t);\n    return raw != null && raw.isArray() && raw.getComponentType() == byte.class;\n}","tryCatchPattern":"try {\n    invoker.validateTypes();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Byte[]\")) {\n        log.error(\"Replace Byte[] with byte[] in Funqy function signature\");\n    }\n    throw e;\n}","preventionTips":["Always use byte[] for binary data in Funqy functions","Enable IDE inspection for boxed array types (IntelliJ 'Array objects in calls to varargs' style inspections)","Add an ArchUnit or annotation-processor test rejecting Byte[] in @Funq signatures","Read the Funqy knative-events docs on binary CloudEvent payloads before designing signatures"],"tags":["quarkus","funqy","knative","type-validation"],"backgroundTag":"boxed-byte-array-unsupported","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}