Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC89B200CC3 for ; Sat, 1 Jul 2017 03:56:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB083160BF6; Sat, 1 Jul 2017 01:56:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2F2B5160BEB for ; Sat, 1 Jul 2017 03:56:11 +0200 (CEST) Received: (qmail 15237 invoked by uid 500); 1 Jul 2017 01:56:10 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 15217 invoked by uid 99); 1 Jul 2017 01:56:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2017 01:56:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B27421892A8 for ; Sat, 1 Jul 2017 01:56:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id q6w4uDjNaGJk for ; Sat, 1 Jul 2017 01:56:08 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id BC69B5F2FD for ; Sat, 1 Jul 2017 01:56:07 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B8632E0BC8 for ; Sat, 1 Jul 2017 01:56:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 166D8245E9 for ; Sat, 1 Jul 2017 01:56:03 +0000 (UTC) Date: Sat, 1 Jul 2017 01:56:03 +0000 (UTC) From: "Jeremy Custenborder (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KAFKA-5550) Struct.put() should include the field name if validation fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 01 Jul 2017 01:56:12 -0000 Jeremy Custenborder created KAFKA-5550: ------------------------------------------ Summary: Struct.put() should include the field name if validation fails Key: KAFKA-5550 URL: https://issues.apache.org/jira/browse/KAFKA-5550 Project: Kafka Issue Type: Bug Components: KafkaConnect Reporter: Jeremy Custenborder Assignee: Jeremy Custenborder Priority: Minor When calling struct.put() with an invalid value, the error message should include the field name. {code:java} @Test public void testPutIncludesFieldName() { final String fieldName = "fieldName"; Schema testSchema = SchemaBuilder.struct() .field(fieldName, Schema.STRING_SCHEMA); Struct struct = new Struct(testSchema); try { struct.put(fieldName, null); } catch (DataException ex) { assertEquals( "Invalid value: null used for required field: \"fieldName\", schema type: STRING", ex.getMessage() ); } } {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)