geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy" <c1vams...@gmail.com>
Subject Re: svn commit: r482713 - in /geronimo/specs: branches/1_1/geronimo-spec-j2ee-connector/src/main/java/javax/resource/ branches/1_1/geronimo-spec-j2ee-connector/src/test/java/javax/resource/ trunk/geronimo-j2ee-connector_1.5_spec/src/main/java/javax/r
Date Fri, 08 Dec 2006 07:33:36 GMT
Kevan,

After your Simpler suggestion, I did a little investigation and made it even
Simpler :o) .  Returning super.toString() in ResourceException.toString()
has the same effect as eliminating the method altogether.  I guess the
problem is with the bad testcase and it resulted in introducing further
problems.  I think we should remove both ResourceException.toString() and
ResourceExceptionTest.testToString() and this fix can go into all
specs\branches and trunk.

Vamsi


On 12/8/06, Kevan Miller <kevan.miller@gmail.com> wrote:
>
> Vamsi,
> A few things --
>
> First. Simpler, I think, to use the following as the toString
> implementation:
>
>      public String toString() {
>          // unit tests revealed that the errorCode is not included
>          return super.toString();
>      }
>
> I'm not sure what's going on in specs/branches/1_1. However, at
> present your change in that branch would never be picked up. The j2ee
> connector version number (1.1 ?) must not be right. Latest release
> version is 1.0.1 and specs/trunk is building 1.1-SNAPSHOT...
>
> Would be nice to fix this problem for 1.2 (I say this mostly out of
> guilt, because I see I've been sitting on a patch to fix this problem
> for a while...). This would require sorting out the version number...
> Only fixing in trunk will be just fine...
>
> --kevan
>
>
> On Dec 5, 2006, at 12:10 PM, vamsic007@apache.org wrote:
>
> > Author: vamsic007
> > Date: Tue Dec  5 09:10:35 2006
> > New Revision: 482713
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=482713
> > Log:
> > GERONIMO-1519 ResourceException.toString() can return null
> >   o Fixes toString() to return non-null string
> >
> > Modified:
> >     geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > main/java/javax/resource/ResourceException.java
> >     geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > test/java/javax/resource/ResourceExceptionTest.java
> >     geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/main/
> > java/javax/resource/ResourceException.java
> >     geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/test/
> > java/javax/resource/ResourceExceptionTest.java
> >
> > Modified: geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/
> > src/main/java/javax/resource/ResourceException.java
> > URL: http://svn.apache.org/viewvc/geronimo/specs/branches/1_1/
> > geronimo-spec-j2ee-connector/src/main/java/javax/resource/
> > ResourceException.java?view=diff&rev=482713&r1=482712&r2=482713
> > ======================================================================
> > ========
> > --- geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > main/java/javax/resource/ResourceException.java (original)
> > +++ geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > main/java/javax/resource/ResourceException.java Tue Dec  5 09:10:35
> > 2006
> > @@ -79,6 +79,8 @@
> >
> >      public String toString() {
> >          // unit tests revealed that the errorCode is not included
> > -        return getMessage();
> > +        String className = getClass().getName();
> > +        String msg = getMessage();
> > +        return msg != null ? className + ": "+msg : className;
> >      }
> >  }
> >
> > Modified: geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/
> > src/test/java/javax/resource/ResourceExceptionTest.java
> > URL: http://svn.apache.org/viewvc/geronimo/specs/branches/1_1/
> > geronimo-spec-j2ee-connector/src/test/java/javax/resource/
> > ResourceExceptionTest.java?view=diff&rev=482713&r1=482712&r2=482713
> > ======================================================================
> > ========
> > --- geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > test/java/javax/resource/ResourceExceptionTest.java (original)
> > +++ geronimo/specs/branches/1_1/geronimo-spec-j2ee-connector/src/
> > test/java/javax/resource/ResourceExceptionTest.java Tue Dec  5
> > 09:10:35 2006
> > @@ -54,9 +54,9 @@
> >
> >      public void testToString() {
> >          ResourceException exception = new ResourceException
> > ("problem");
> > -        assertEquals("problem", exception.toString());
> > +        assertEquals(ResourceException.class.getName()+":
> > "+"problem", exception.toString());
> >
> >          ResourceException other = new ResourceException("other
> > problem", "123");
> > -        assertEquals("other problem", other.toString());
> > +        assertEquals(ResourceException.class.getName()+": "+"other
> > problem", other.toString());
> >      }
> >  }
> >
> > Modified: geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/
> > main/java/javax/resource/ResourceException.java
> > URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-
> > j2ee-connector_1.5_spec/src/main/java/javax/resource/
> > ResourceException.java?view=diff&rev=482713&r1=482712&r2=482713
> > ======================================================================
> > ========
> > --- geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/main/
> > java/javax/resource/ResourceException.java (original)
> > +++ geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/main/
> > java/javax/resource/ResourceException.java Tue Dec  5 09:10:35 2006
> > @@ -78,6 +78,8 @@
> >
> >      public String toString() {
> >          // unit tests revealed that the errorCode is not included
> > -        return getMessage();
> > +        String className = getClass().getName();
> > +        String msg = getMessage();
> > +        return msg != null ? className + ": "+msg : className;
> >      }
> >  }
> >
> > Modified: geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/
> > test/java/javax/resource/ResourceExceptionTest.java
> > URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-
> > j2ee-connector_1.5_spec/src/test/java/javax/resource/
> > ResourceExceptionTest.java?view=diff&rev=482713&r1=482712&r2=482713
> > ======================================================================
> > ========
> > --- geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/test/
> > java/javax/resource/ResourceExceptionTest.java (original)
> > +++ geronimo/specs/trunk/geronimo-j2ee-connector_1.5_spec/src/test/
> > java/javax/resource/ResourceExceptionTest.java Tue Dec  5 09:10:35
> > 2006
> > @@ -53,9 +53,9 @@
> >
> >      public void testToString() {
> >          ResourceException exception = new ResourceException
> > ("problem");
> > -        assertEquals("problem", exception.toString());
> > +        assertEquals(ResourceException.class.getName()+":
> > "+"problem", exception.toString());
> >
> >          ResourceException other = new ResourceException("other
> > problem", "123");
> > -        assertEquals("other problem", other.toString());
> > +        assertEquals(ResourceException.class.getName()+": "+"other
> > problem", other.toString());
> >      }
> >  }
> >
> >
>
>

Mime
View raw message