commit | bced36e1279d74901db5ae617f3b6c3ddae7fb05 | [log] [tgz] |
---|---|---|
author | Vamsavardhana Chillakuru <vamsic007@apache.org> | Sat Dec 09 08:33:52 2006 +0000 |
committer | Vamsavardhana Chillakuru <vamsic007@apache.org> | Sat Dec 09 08:33:52 2006 +0000 |
tree | f7dfe2667494ae86d95119e173985b99d86dd603 | |
parent | 548435b82a22f844db958d9efc8fc1eef336f8a6 [diff] |
GERONIMO-1519 ResourceException.toString() can return null o The method seems to have been introduced to account for a bad testcase. Removed ResourceException.toString() and the corresponding test ResourceExceptionTest.testToString() o For a discussion on this, see http://www.mail-archive.com/dev%40geronimo.apache.org/msg38005.html git-svn-id: https://svn.apache.org/repos/asf/geronimo/specs/branches/1_1@484948 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-spec-j2ee-connector/src/main/java/javax/resource/ResourceException.java b/geronimo-spec-j2ee-connector/src/main/java/javax/resource/ResourceException.java index de1137b..bcbe6bf 100644 --- a/geronimo-spec-j2ee-connector/src/main/java/javax/resource/ResourceException.java +++ b/geronimo-spec-j2ee-connector/src/main/java/javax/resource/ResourceException.java
@@ -76,11 +76,4 @@ // unit tests revealed that Throwable.initCause is not invoked this.linkedException = ex; } - - public String toString() { - // unit tests revealed that the errorCode is not included - String className = getClass().getName(); - String msg = getMessage(); - return msg != null ? className + ": "+msg : className; - } }
diff --git a/geronimo-spec-j2ee-connector/src/test/java/javax/resource/ResourceExceptionTest.java b/geronimo-spec-j2ee-connector/src/test/java/javax/resource/ResourceExceptionTest.java index aad7007..4a757e4 100644 --- a/geronimo-spec-j2ee-connector/src/test/java/javax/resource/ResourceExceptionTest.java +++ b/geronimo-spec-j2ee-connector/src/test/java/javax/resource/ResourceExceptionTest.java
@@ -51,12 +51,4 @@ exception.setLinkedException(root); assertSame(root, exception.getLinkedException()); } - - public void testToString() { - ResourceException exception = new ResourceException("problem"); - assertEquals(ResourceException.class.getName()+": "+"problem", exception.toString()); - - ResourceException other = new ResourceException("other problem", "123"); - assertEquals(ResourceException.class.getName()+": "+"other problem", other.toString()); - } }