You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ismael Juma (JIRA)" <ji...@apache.org> on 2016/05/17 14:33:13 UTC

[jira] [Updated] (KAFKA-3426) Improve protocol type errors when invalid sizes are received

     [ https://issues.apache.org/jira/browse/KAFKA-3426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismael Juma updated KAFKA-3426:
-------------------------------
    Fix Version/s:     (was: 0.10.1.0)

> Improve protocol type errors when invalid sizes are received
> ------------------------------------------------------------
>
>                 Key: KAFKA-3426
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3426
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.9.0.0
>            Reporter: Ismael Juma
>            Assignee: Ismael Juma
>             Fix For: 0.10.0.0
>
>
> We currently don't perform much validation on the size value read by the protocol types. This means that we end up throwing exceptions like `BufferUnderflowException`, `NegativeArraySizeException`, etc. `Schema.read` catches these exceptions and adds some useful information like:
> {code}
> throw new SchemaException("Error reading field '" + fields[i].name +
>                                           "': " +
>                                           (e.getMessage() == null ? e.getClass().getName() : e.getMessage()));
> {code}
> We could do even better by throwing a `SchemaException` with a more user friendly message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)