Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 36092 invoked from network); 11 Aug 2010 09:33:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Aug 2010 09:33:40 -0000 Received: (qmail 14433 invoked by uid 500); 11 Aug 2010 09:33:40 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 14326 invoked by uid 500); 11 Aug 2010 09:33:37 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 14313 invoked by uid 99); 11 Aug 2010 09:33:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Aug 2010 09:33:36 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mwessendorf@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-wy0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Aug 2010 09:33:30 +0000 Received: by wyb34 with SMTP id 34so585076wyb.36 for ; Wed, 11 Aug 2010 02:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=2MR5C/2+cy2sxeaRFK4np5dS5U3BDen0cvocmjCAfbM=; b=M3/rv5piJYy48yZ2JZ/t4GLp81TNsvOB3Yfqp6fAFFijdptIViTqqBrTYPjME3yRL7 jeq+hDt+UaWqZqaxxnQ4nY8q6TRggx+Q3o/ENaJ/OBkic3J0FxGTVQq9WWIzIFKxT4bA 8qttEFsmyqJ5+OS66ep+d46eAG5By8kwACg18= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=T9dLSD3jfPBZs48EaGuE9qilm31FL+xDofkAP363AZdI26sVN6Vfn1R9czVQNMV/Rh V2HPTdRVhEi+r12GJc2kvFMrofQr2dpbvYUplyQzeSodcItt2mk9Ckm71Vme4CgELOxG JMGeX9yFdoEc1eDHqtv4Xti71B1/I0wj5JUHY= MIME-Version: 1.0 Received: by 10.227.135.144 with SMTP id n16mr16061221wbt.192.1281519189677; Wed, 11 Aug 2010 02:33:09 -0700 (PDT) Sender: mwessendorf@gmail.com Received: by 10.227.130.206 with HTTP; Wed, 11 Aug 2010 02:33:09 -0700 (PDT) In-Reply-To: References: <201008101012.o7AACxXK017679@d06av04.portsmouth.uk.ibm.com> Date: Wed, 11 Aug 2010 11:33:09 +0200 X-Google-Sender-Auth: BtmuHDNFzQhYt10v3klR1_giCPY Message-ID: Subject: Re: [luni] ObjectInputStream.java From: Matthias Wessendorf To: dev@harmony.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org a little background. I am working on an Apache MyFaces project, were we have our own ObjectInputStream class ([1]). Now when we update to the latest version of one of our dependencies (JSF 2.0, Sun Mojarra), we got this exception: java.lang.ClassNotFoundException: void ... I filed a bug against them, b/c of that (see [2] for more). They said the reason why we see it is that with the new version one of their helper class stores null values as Void.TYPE(s). Therefore they suggested to do what the JDK does. The did a very simple patch ([3]), which I think is code from the Sun JDK 1.6.x of the "standard" ObjectInputStream. In order to avoid any license issues, by looking into Sun's JDK, I opened Harmony can "borrowed" code. So I am wondering if the void has been forgotten..., since I suspect (as of [3]) that the Sun JDK's ObjectInputStream does register void/void.class.... BTW. I changed our custom ObjectInputStream patch (see [4]) and the error (java.lang.ClassNotFoundException: void) is now gone Greetings, Matthias [1] https://issues.apache.org/jira/secure/attachment/12439193/1.2.12.2_comp= ressviewstate.patch [2] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=3D1607 [3] https://javaserverfaces.dev.java.net/nonav/issues/showattachment.cgi/12= 41/1607.txt [4] https://issues.apache.org/jira/secure/attachment/12451648/TRINIDAD-1747= _August10.patch On Wed, Aug 11, 2010 at 10:21 AM, Jimmy,Jing Lv wrote: > Hi Matthias, > > =A0 =A0 I suppose ObjectInputStream is mainly use to serialize Object but= void > is not a kind of Class to be serialized. Please tell me if I am wrong. > > 2010/8/10 Mark Hindess > >> >> In message , >> Matthias Wessendorf writes: >> > >> > Hello, >> > >> > looking at ObjectInputStream.java, >> > >> > =A0 =A0 static { >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("byte", byte.class); //$NON-NLS-= 1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("short", short.class); //$NON-NL= S-1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("int", int.class); //$NON-NLS-1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("long", long.class); //$NON-NLS-= 1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("boolean", boolean.class); //$NO= N-NLS-1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("char", char.class); //$NON-NLS-= 1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("float", float.class); //$NON-NL= S-1$ >> > =A0 =A0 =A0 =A0 PRIMITIVE_CLASSES.put("double", double.class); //$NON-= NLS-1$ >> > =A0 =A0 } >> > >> > I am wondering why there is no "void", void.class key-value pair? >> >> I see you've raised a JIRA bug for this. =A0I'm struggling to understand >> in what context this would be needed. =A0Can you provide a test case tha= t >> shows why it is needed? >> >> Regards, >> =A0Mark. >> >> >> > > > -- > > Best Regards! > > Jimmy, Jing Lv > --=20 Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf