Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 57169 invoked from network); 12 Jul 2007 17:13:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2007 17:13:59 -0000 Received: (qmail 29623 invoked by uid 500); 12 Jul 2007 17:13:56 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 29602 invoked by uid 500); 12 Jul 2007 17:13:56 -0000 Mailing-List: contact hadoop-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-commits@lucene.apache.org Received: (qmail 29572 invoked by uid 99); 12 Jul 2007 17:13:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 10:13:55 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 10:13:51 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C1CFE1A981A; Thu, 12 Jul 2007 10:13:30 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r555697 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/io/GenericWritable.java Date: Thu, 12 Jul 2007 17:13:30 -0000 To: hadoop-commits@lucene.apache.org From: omalley@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070712171330.C1CFE1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: omalley Date: Thu Jul 12 10:13:29 2007 New Revision: 555697 URL: http://svn.apache.org/viewvc?view=rev&rev=555697 Log: HADOOP-1585. Declare the classes in GenericWritable to be subclasses of Writable. Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/src/java/org/apache/hadoop/io/GenericWritable.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=555697&r1=555696&r2=555697 ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Thu Jul 12 10:13:29 2007 @@ -331,6 +331,9 @@ 102. HADOOP-1535. Fix the user-controlled grouping to the reduce function. (Vivek Ratan via omalley) +103. HADOOP-1585. Modify GenericWritable to declare the classes as subtypes + of Writable (Espen Amble Kolstad via omalley) + Release 0.13.0 - 2007-06-08 1. HADOOP-1047. Fix TestReplication to succeed more reliably. Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/GenericWritable.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/GenericWritable.java?view=diff&rev=555697&r1=555696&r2=555697 ============================================================================== --- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/GenericWritable.java (original) +++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/GenericWritable.java Thu Jul 12 10:13:29 2007 @@ -81,9 +81,9 @@ public void readFields(DataInput in) throws IOException { type = in.readByte(); - Class clazz = getTypes()[type & 0xff]; + Class clazz = getTypes()[type & 0xff]; try { - instance = (Writable) clazz.newInstance(); + instance = clazz.newInstance(); } catch (Exception e) { e.printStackTrace(); throw new IOException("Cannot initialize the class: " + clazz); @@ -103,6 +103,6 @@ * Return all classes that may be wrapped. Subclasses should implement this * to return a constant array of classes. */ - abstract protected Class[] getTypes(); + abstract protected Class[] getTypes(); }