Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE39DD0F8 for ; Mon, 23 Jul 2012 02:26:19 +0000 (UTC) Received: (qmail 44732 invoked by uid 500); 23 Jul 2012 02:26:19 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 44634 invoked by uid 500); 23 Jul 2012 02:26:18 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 44624 invoked by uid 99); 23 Jul 2012 02:26:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 02:26:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of forrestxm@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 02:26:12 +0000 Received: by vbmv11 with SMTP id v11so5301949vbm.13 for ; Sun, 22 Jul 2012 19:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bjjjCosSWmk+5HZj1EYWeaBzJWALuaCwTSIO3juMwd0=; b=eGWW2t66xlrOXi7+sunr1tOZaRP0jlz23FPt1TDPdiDJTE7hqfG56lclOCEMIkjhp4 HT5xvPuR5gUuC93TO3xkrgHljfEPHxS8j1YVOT1AQfopwfk+x2Z5PAvAa9/20Uv+PG9l Z+SZiCyVsdtLLOJOYalfPCPahMi9DnaaRwLLOsSysrhJCe/U8+i6K4BUG1FW+m91locG nBCfwLQECmvt9l6CLG+VICTc3AkHTBPmzO37b0R6CWDb8j8XlW9I1usdrGgT1r7wls/9 rAyQSuChMLVRATNvvM5rUW7nzoE1qKaf1a1sUjBuxXrktyyOYVBZCRQMmki7JLPLWTB3 8RRQ== MIME-Version: 1.0 Received: by 10.52.176.66 with SMTP id cg2mr9603538vdc.121.1343010351395; Sun, 22 Jul 2012 19:25:51 -0700 (PDT) Received: by 10.58.190.135 with HTTP; Sun, 22 Jul 2012 19:25:51 -0700 (PDT) In-Reply-To: References: <20120712074115.D77E823888E7@eris.apache.org> Date: Mon, 23 Jul 2012 10:25:51 +0800 Message-ID: Subject: Re: svn commit: r1360561 - /geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java From: Forrest Xia To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=20cf307f34baecb47d04c575f61e X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f34baecb47d04c575f61e Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jul 21, 2012 at 12:50 AM, Jarek Gawor wrote: > Forrest, > > We need to switch the order of the if check otherwise we might be > seeing NPE instead of the marshal exception. > Done, thank you for review :) > > Jarek > > On Thu, Jul 12, 2012 at 3:41 AM, wrote: > > Author: xiaming > > Date: Thu Jul 12 07:41:15 2012 > > New Revision: 1360561 > > > > URL: http://svn.apache.org/viewvc?rev=1360561&view=rev > > Log: > > GERONIMOTCK-133 Add logic to allow YOKO endure invalid value type tag > sent from RI, a new system property org.apache.yoko.ignoreInvalidValueTag > introduced > > > > Modified: > > > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > > > > Modified: > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java?rev=1360561&r1=1360560&r2=1360561&view=diff > > > ============================================================================== > > --- > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > (original) > > +++ > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > Thu Jul 12 07:41:15 2012 > > @@ -1076,7 +1076,18 @@ final public class ValueReader { > > } > > ClassCreationStrategy strategy = new > ClassCreationStrategy(this, in_, > > clz); > > - return read(strategy); > > + java.io.Serializable result = null; > > + try { > > + result = read(strategy); > > + } catch (org.omg.CORBA.MARSHAL marshalex) { > > + logger.severe(marshalex.getMessage() + " at pos=" + > (in_.buf_.pos_- 4)); > > + if > (System.getProperty("org.apache.yoko.ignoreInvalidValueTag").equalsIgnoreCase("true")) > { > > + result = read(strategy); > > + } else { > > + throw marshalex; > > + } > > + } > > + return result; > > } > > > > public java.io.Serializable readValueBox( > > > > > -- Thanks! Regards, Forrest --20cf307f34baecb47d04c575f61e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Sat, Jul 21, 2012 at 12:50 AM, Jarek = Gawor <jgawor@gmail.com> wrote:
Forrest,

We need to switch the order of the if check otherwise we might be
seeing NPE instead of the marshal exception.
Done, tha= nk you for review :)

Jarek

On Thu, Jul 12, 2012 at 3:41 AM, =A0<xiaming@apache.org> wrote:
> Author: xiaming
> Date: Thu Jul 12 07:41:15 2012
> New Revision: 1360561
>
> URL: http://svn.apache.org/viewvc?rev=3D1360561&view= =3Drev
> Log:
> GERONIMOTCK-133 Add logic to allow YOKO endure invalid value type tag = sent from RI, a new system property org.apache.yoko.ignoreInvalidValueTag i= ntroduced
>
> Modified:
> =A0 =A0 geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/or= b/OB/ValueReader.java
>
> Modified: geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/= orb/OB/ValueReader.java
> URL: http://s= vn.apache.org/viewvc/geronimo/yoko/trunk/yoko-core/src/main/java/org/apache= /yoko/orb/OB/ValueReader.java?rev=3D1360561&r1=3D1360560&r2=3D13605= 61&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
> --- geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB= /ValueReader.java (original)
> +++ geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB= /ValueReader.java Thu Jul 12 07:41:15 2012
> @@ -1076,7 +1076,18 @@ final public class ValueReader {
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 =A0ClassCreationStrategy strategy =3D new ClassCreatio= nStrategy(this, in_,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0clz);
> - =A0 =A0 =A0 =A0return read(strategy);
> + =A0 =A0 =A0 =A0java.io.Serializable result =3D null;
> + =A0 =A0 =A0 =A0try {
> + =A0 =A0 =A0 =A0 =A0 =A0result =3D read(strategy);
> + =A0 =A0 =A0 =A0} catch (org.omg.CORBA.MARSHAL marshalex) {
> + =A0 =A0 =A0 =A0 =A0 =A0logger.severe(marshalex.getMessage() + "= at pos=3D" + (in_.buf_.pos_- 4));
> + =A0 =A0 =A0 =A0 =A0 =A0if (System.getProperty("org.apache.yoko.= ignoreInvalidValueTag").equalsIgnoreCase("true")) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0result =3D read(strategy);
> + =A0 =A0 =A0 =A0 =A0 =A0} else {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0throw marshalex;
> + =A0 =A0 =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 =A0return result;
> =A0 =A0 =A0}
>
> =A0 =A0 =A0public java.io.Serializable readValueBox(
>
>



--
Thanks!
=
Regards, Forrest

--20cf307f34baecb47d04c575f61e--