diff options
author | mcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-20 20:58:58 +0000 |
---|---|---|
committer | mcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-20 20:58:58 +0000 |
commit | 6d91145f80d26d341aa31c5eb41284364137f30d (patch) | |
tree | fd6453ea106a777f305432178060ccfe48c3653b /branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java | |
parent | 2a83d8422d3ea46230edad375265bf0e8f1b0a3b (diff) |
Issue: NullPointerException will be thrown in the destory methods if the domains fail to initialise because the destroy method attempts to close the domain but the domain is null.
Fix: Added check for null before attempting to close the domain
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786907 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java index 394cdf3f6d..2ed0729b00 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java @@ -51,7 +51,6 @@ import org.junit.Test; */ public class MediaCollectionTestCase { public final static String providerURI = "http://localhost:8084/receipt"; - protected static SCADomain scaConsumerDomain; protected static SCADomain scaProviderDomain; protected static CustomerClient testService; protected static Abdera abdera; @@ -71,11 +70,13 @@ public class MediaCollectionTestCase { abderaParser = Abdera.getNewParser(); } - @AfterClass - public static void destroy() throws Exception { - System.out.println(">>>MediaCollectionTestCase.destroy"); - scaProviderDomain.close(); - } + @AfterClass + public static void destroy() throws Exception { + System.out.println(">>>MediaCollectionTestCase.destroy"); + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } + } @Test public void testPrelim() throws Exception { |