You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jarek Gawor <jg...@gmail.com> on 2012/07/20 18:50:52 UTC
Re: svn commit: r1360561 - /geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java
Forrest,
We need to switch the order of the if check otherwise we might be
seeing NPE instead of the marshal exception.
Jarek
On Thu, Jul 12, 2012 at 3:41 AM, <xi...@apache.org> 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(
>
>
Re: svn commit: r1360561 - /geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java
Posted by Forrest Xia <fo...@gmail.com>.
On Sat, Jul 21, 2012 at 12:50 AM, Jarek Gawor <jg...@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, thank you for review :)
>
> Jarek
>
> On Thu, Jul 12, 2012 at 3:41 AM, <xi...@apache.org> 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