Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 35953 invoked from network); 7 Mar 2011 13:31:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Mar 2011 13:31:21 -0000 Received: (qmail 27215 invoked by uid 500); 7 Mar 2011 13:31:21 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 27183 invoked by uid 500); 7 Mar 2011 13:31:21 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 27175 invoked by uid 99); 7 Mar 2011 13:31:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 13:31:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 13:31:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 34E5839BA70 for ; Mon, 7 Mar 2011 13:31:00 +0000 (UTC) Date: Mon, 7 Mar 2011 13:31:00 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <776745505.908.1299504660213.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1846874015.7578.1296749909031.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (HADOOP-7131) set() and toString Methods of the org.apache.hadoop.io.Text class does not include the root exception, in the wrapping RuntimeException. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-7131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003352#comment-13003352 ] Hudson commented on HADOOP-7131: -------------------------------- Integrated in Hadoop-Common-trunk #623 (See [https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/623/]) HADOOP-7131. Exceptions thrown by Text methods should include the causing exception. Contributed by Uma Maheswara Rao G. > set() and toString Methods of the org.apache.hadoop.io.Text class does not include the root exception, in the wrapping RuntimeException. > ---------------------------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-7131 > URL: https://issues.apache.org/jira/browse/HADOOP-7131 > Project: Hadoop Common > Issue Type: Improvement > Components: io > Affects Versions: 0.20.1, 0.20.2 > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Priority: Minor > Fix For: 0.23.0 > > Attachments: HADOOP-7131.patch > > > In below code snippets, we can include e, instead of e.toString(), so that caller can get complete trace. > 1) > /** Set to contain the contents of a string. > */ > public void set(String string) { > try { > ByteBuffer bb = encode(string, true); > bytes = bb.array(); > length = bb.limit(); > }catch(CharacterCodingException e) { > throw new RuntimeException("Should not have happened ",e.toString()); > } > } > 2) > public String toString() { > try { > return decode(bytes, 0, length); > } catch (CharacterCodingException e) { > throw new RuntimeException("Should not have happened ",e.toString()); > } > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira