You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/04/27 11:16:49 UTC

svn commit: r768902 - in /felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation: bnd.bnd src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java

Author: rickhall
Date: Mon Apr 27 09:16:48 2009
New Revision: 768902

URL: http://svn.apache.org/viewvc?rev=768902&view=rev
Log:
Updated test cases to reflect to understanding of boot delegation wildcard
matching.

Modified:
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/bnd.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java

Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/bnd.bnd?rev=768902&r1=768901&r2=768902&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/bnd.bnd (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/bnd.bnd Mon Apr 27 09:16:48 2009
@@ -7,6 +7,6 @@
 
 	
 -runproperties: report=true, \
-        org.osgi.framework.bootdelegation="javax.swing.text.html.*"
+        org.osgi.framework.bootdelegation="javax.swing,javax.swing.text.html,javax.swing.text.html.*"
 
 Test-Cases = ${classes;extending;*TestCase}

Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java?rev=768902&r1=768901&r2=768902&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.bootdelegation/src/org/apache/felix/framework/bootdelegation/BootDelegationTest.java Mon Apr 27 09:16:48 2009
@@ -33,32 +33,63 @@
     public void testBootDelegation() throws Exception
     {
         // This test has configured the framework to boot delegate
-        // java.* (by default) and javax.swing.text.html.*.
+        // java.* (by default), javax.swing, javax.swing.text.html, and
+        // javax.swing.text.html.*.
         Class clazz = null;
 
         // Should NOT throw an exception.
-        clazz = Class.forName("java.util.Map");
-        // SHOULD throw an exception.
+        try
+        {
+            clazz = Class.forName("java.util.Map");
+        }
+        catch (Exception ex)
+        {
+            assertTrue("Class should be visible", false);
+        }
+        // Should NOT throw an exception.
         try
         {
             clazz = Class.forName("javax.swing.JComponent");
-            throw new Exception("Class should not be visible: " + clazz);
         }
-        catch (ClassNotFoundException ex)
+        catch (Exception ex)
+        {
+            assertTrue("Class should be visible", false);
+        }
+        // Should throw an exception.
+        try
+        {
+            clazz = Class.forName("javax.swing.table.TableModel");
+            assertTrue("Class should not be visible: " + clazz, false);
+        }
+        catch (Exception ex)
         {
             // Ignore.
         }
         // Should NOT throw an exception.
-        clazz = Class.forName("javax.swing.text.html.BlockView");
+        try
+        {
+            clazz = Class.forName("javax.swing.text.html.BlockView");
+        }
+        catch (Exception ex)
+        {
+            assertTrue("Class should be visible", false);
+        }
         // Should NOT throw an exception.
-        clazz = Class.forName("javax.swing.text.html.parser.AttributeList");
-        // SHOULD throw an exception.
+        try
+        {
+            clazz = Class.forName("javax.swing.text.html.parser.AttributeList");
+        }
+        catch (Exception ex)
+        {
+            assertTrue("Class should be visible", false);
+        }
+        // Should throw an exception.
         try
         {
             clazz = Class.forName("javax.swing.text.Document");
-            throw new Exception("Class should not be visible: " + clazz);
+            assertTrue("Class should not be visible: " + clazz, false);
         }
-        catch (ClassNotFoundException ex)
+        catch (Exception ex)
         {
             // Ignore.
         }