You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/05/22 00:05:03 UTC
svn commit: r658894 - in /directory/apacheds/branches/bigbang:
core-entry/src/test/java/org/apache/directory/server/core/entry/
core-unit/src/main/java/org/apache/directory/server/core/unit/
kerberos-shared/src/main/java/org/apache/directory/server/ker...
Author: akarasulu
Date: Wed May 21 15:05:02 2008
New Revision: 658894
URL: http://svn.apache.org/viewvc?rev=658894&view=rev
Log:
fixing compilation problems with NamingEnums and NamingExceptions
Modified:
directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java Wed May 21 15:05:02 2008
@@ -18,6 +18,7 @@
*/
package org.apache.directory.server.core.entry;
+
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
@@ -33,7 +34,6 @@
import java.util.List;
import java.util.Set;
-import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.InvalidAttributeValueException;
@@ -59,6 +59,7 @@
import org.junit.BeforeClass;
import org.junit.Test;
+
/**
* Tests for the DefaultServerAttribute class
*
@@ -101,7 +102,7 @@
* Initialize the registries once for the whole test suite
*/
@BeforeClass
- public static void setup() throws NamingException
+ public static void setup() throws Exception
{
loader = new BootstrapSchemaLoader();
oidRegistry = new DefaultOidRegistry();
@@ -123,7 +124,7 @@
atPwd = registries.getAttributeTypeRegistry().lookup( "userpassword" );
}
- @Test public void testAddOneValue() throws NamingException
+ @Test public void testAddOneValue() throws Exception
{
AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
@@ -171,7 +172,7 @@
}
- @Test public void testAddTwoValue() throws NamingException
+ @Test public void testAddTwoValue() throws Exception
{
AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
@@ -205,7 +206,7 @@
}
- @Test public void testAddNullValue() throws NamingException
+ @Test public void testAddNullValue() throws Exception
{
AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
@@ -224,7 +225,7 @@
assertNull( ((ServerStringValue)value).get() );
}
- @Test public void testGetAttribute() throws NamingException
+ @Test public void testGetAttribute() throws Exception
{
AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
@@ -247,7 +248,7 @@
/**
* Test the contains() method
*/
- @Test public void testContains() throws NamingException
+ @Test public void testContains() throws Exception
{
AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
@@ -487,7 +488,7 @@
* Test method isValid()
*/
@Test
- public void testIsValid() throws NamingException
+ public void testIsValid() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atCN );
@@ -1001,7 +1002,7 @@
* Test method size()
*/
@Test
- public void testSize() throws NamingException
+ public void testSize() throws Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atCN );
@@ -1033,7 +1034,7 @@
* Test method put( byte[]... )
*/
@Test
- public void testPutByteArray() throws InvalidAttributeValueException, NamingException
+ public void testPutByteArray() throws InvalidAttributeValueException, Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atPwd );
@@ -1165,7 +1166,7 @@
* Test method put( Value... )
*/
@Test
- public void testPutValueArray() throws InvalidAttributeValueException, NamingException
+ public void testPutValueArray() throws InvalidAttributeValueException, Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atCN );
@@ -1298,7 +1299,7 @@
* Test method remove( Value... )
*/
@Test
- public void testRemoveValueArray() throws InvalidAttributeValueException, NamingException
+ public void testRemoveValueArray() throws InvalidAttributeValueException, Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atCN );
@@ -1368,7 +1369,7 @@
* Test method remove( byte... )
*/
@Test
- public void testRemoveByteArray() throws InvalidAttributeValueException, NamingException
+ public void testRemoveByteArray() throws InvalidAttributeValueException, Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atPwd );
@@ -1398,7 +1399,7 @@
* Test method remove( String... )
*/
@Test
- public void testRemoveStringArray() throws InvalidAttributeValueException, NamingException
+ public void testRemoveStringArray() throws InvalidAttributeValueException, Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atCN );
@@ -1484,7 +1485,7 @@
* Test method instanceOf()
*/
@Test
- public void testInstanceOf() throws NamingException
+ public void testInstanceOf() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atCN );
@@ -1501,7 +1502,7 @@
* Test method setUpId( String, AttributeType )
*/
@Test
- public void testSetUpIdStringAttributeType() throws NamingException
+ public void testSetUpIdStringAttributeType() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atSN );
@@ -1557,7 +1558,7 @@
* Test method setUpId( String ) inherited from ClientAttribute
*/
@Test
- public void testSetUpIdString() throws NamingException
+ public void testSetUpIdString() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atCN );
@@ -1609,7 +1610,7 @@
* Test method setAttributeType( AttributeType )
*/
@Test
- public void testSetAttributeType() throws NamingException
+ public void testSetAttributeType() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atCN );
@@ -1634,7 +1635,7 @@
* Test method getAttributeType()
*/
@Test
- public void testGetAttributeType() throws NamingException
+ public void testGetAttributeType() throws Exception
{
ServerAttribute attr = new DefaultServerAttribute( atSN );
@@ -1694,7 +1695,7 @@
* Test constructor DefaultServerAttribute( AttributeType, Value... )
*/
@Test
- public void testDefaultServerAttributeAttributeTypeValueArray() throws NamingException
+ public void testDefaultServerAttributeAttributeTypeValueArray() throws Exception
{
ServerAttribute attr1 = new DefaultServerAttribute( atCN, STR_VALUE1, STR_VALUE2, NULL_STRING_VALUE );
Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java Wed May 21 15:05:02 2008
@@ -27,7 +27,6 @@
import javax.naming.InvalidNameException;
import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.NoSuchAttributeException;
@@ -99,7 +98,7 @@
* Initialize the registries once for the whole test suite
*/
@BeforeClass
- public static void setup() throws NamingException
+ public static void setup() throws Exception
{
loader = new BootstrapSchemaLoader();
oidRegistry = new DefaultOidRegistry();
@@ -136,7 +135,7 @@
* Test for method DefaultServerEntry()
*/
@Test
- public void testDefaultServerEntry() throws NamingException
+ public void testDefaultServerEntry() throws Exception
{
Entry entry = new DefaultServerEntry();
assertNotNull( entry );
@@ -149,7 +148,7 @@
* Test for method DefaultServerEntry( registries )
*/
@Test
- public void testDefaultServerEntryRegistries() throws NamingException
+ public void testDefaultServerEntryRegistries() throws Exception
{
Entry entry = new DefaultServerEntry( registries );
assertNotNull( entry );
@@ -162,7 +161,7 @@
* Test for method DefaultServerEntry( registries, LdapDN )
*/
@Test
- public void testDefaultServerEntryRegistriesDN() throws NamingException
+ public void testDefaultServerEntryRegistriesDN() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
assertNotNull( entry );
@@ -175,7 +174,7 @@
* Test for method DefaultServerEntry( registries, LdapDN, AttributeType... )
*/
@Test
- public void testDefaultServerEntryRegistriesDNAttributeTypeArray() throws NamingException
+ public void testDefaultServerEntryRegistriesDNAttributeTypeArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, atOC, atPwd, atCN );
assertNotNull( entry );
@@ -191,7 +190,7 @@
* Test for method DefaultServerEntry( registries, LdapDN, AttributeType, upId )
*/
@Test
- public void testDefaultServerEntryRegistriesDNAttributeTypeUpId() throws NamingException
+ public void testDefaultServerEntryRegistriesDNAttributeTypeUpId() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, atOC, " OBJECTCLASS " );
assertNotNull( entry );
@@ -207,7 +206,7 @@
* Test for method DefaultServerEntry( registries, LdapDN, AttributeType, upId )
*/
@Test
- public void testDefaultServerEntryRegistriesDNUpIdArray() throws NamingException
+ public void testDefaultServerEntryRegistriesDNUpIdArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, " OBJECTCLASS ", " Cn " );
assertNotNull( entry );
@@ -229,7 +228,7 @@
* Test for method add( EntryAttribute...)
*/
@Test
- public void testAddEntryAttribute() throws NamingException
+ public void testAddEntryAttribute() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -268,7 +267,7 @@
* Test for method add( String, byte[]...)
*/
@Test
- public void testAddStringByteArrayArray() throws NamingException
+ public void testAddStringByteArrayArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -312,7 +311,7 @@
* Test for method add( String, String...)
*/
@Test
- public void testAddStringStringArray() throws NamingException
+ public void testAddStringStringArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -357,7 +356,7 @@
* Test for method add( String, Value<?>...)
*/
@Test
- public void testAddStringValueArray() throws NamingException
+ public void testAddStringValueArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
Value<String> value = new ServerStringValue( atCN, (String)null );
@@ -410,7 +409,7 @@
* Test method for add( AttributeType, byte[]... )
*/
@Test
- public void testAddAttributeTypeByteArrayArray() throws NamingException
+ public void testAddAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -433,7 +432,7 @@
* Test method for add( AttributeType, String... )
*/
@Test
- public void testAddAttributeTypeStringArray() throws NamingException
+ public void testAddAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -461,7 +460,7 @@
* Test method for add( AttributeType, Value<?>... )
*/
@Test
- public void testAddAttributeTypeValueArray() throws NamingException
+ public void testAddAttributeTypeValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -507,7 +506,7 @@
* Test method for add( String, AttributeType, byte[]... )
*/
@Test
- public void testAddStringAttributeTypeByteArrayArray() throws NamingException
+ public void testAddStringAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -544,7 +543,7 @@
* Test method for add( String, AttributeType, String... )
*/
@Test
- public void testAddStringAttributeTypeStringArray() throws NamingException
+ public void testAddStringAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -579,7 +578,7 @@
* Test method for add( String, AttributeType, Value<?>... )
*/
@Test
- public void testAddStringAttributeTypeValueArray() throws NamingException
+ public void testAddStringAttributeTypeValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -636,7 +635,7 @@
/**
* Test the add( AT, String... ) method
*/
- @Test public void testAddAtStringElipsis() throws NamingException
+ @Test public void testAddAtStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -687,7 +686,7 @@
/**
* Test the add( AT, byte[]... ) method
*/
- @Test public void testAddAtBytesElipsis() throws NamingException
+ @Test public void testAddAtBytesElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -744,7 +743,7 @@
/**
* Test the add( AT, SV... ) method
*/
- @Test public void testAddAtServerValueElipsis() throws NamingException
+ @Test public void testAddAtServerValueElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -850,7 +849,7 @@
/**
* Test the add( upId, String... ) method
*/
- @Test public void testAddUpIdStringElipsis() throws NamingException
+ @Test public void testAddUpIdStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -904,7 +903,7 @@
/**
* Test the add( upId, byte[]... ) method
*/
- @Test public void testAddUpIdBytesElipsis() throws NamingException
+ @Test public void testAddUpIdBytesElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -961,7 +960,7 @@
/**
* Test the add( upId, SV... ) method
*/
- @Test public void testAddUpIdServerValueElipsis() throws NamingException
+ @Test public void testAddUpIdServerValueElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -1073,7 +1072,7 @@
/**
* Test the add( UpId, AT, String... ) method
*/
- @Test public void testAddUpIdAtStringElipsis() throws NamingException
+ @Test public void testAddUpIdAtStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -1124,7 +1123,7 @@
/**
* Test the add( upId, AT, byte[]... ) method
*/
- @Test public void testAddUpIdAtBytesElipsis() throws NamingException
+ @Test public void testAddUpIdAtBytesElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -1181,7 +1180,7 @@
/**
* Test the add( upId, AT, SV... ) method
*/
- @Test public void testAddUpIdAtServerValueElipsis() throws NamingException
+ @Test public void testAddUpIdAtServerValueElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -1294,7 +1293,7 @@
* Test method for clear()
*/
@Test
- public void testClear() throws NamingException
+ public void testClear() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1318,7 +1317,7 @@
* Test method for clone()
*/
@Test
- public void testClone() throws NamingException
+ public void testClone() throws Exception
{
Entry entry1 = new DefaultServerEntry( registries );
@@ -1355,7 +1354,7 @@
* Test for method contains( AttributeType, byte[]... )
*/
@Test
- public void testContainsAttributeTypeByteArrayArray() throws NamingException
+ public void testContainsAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1378,7 +1377,7 @@
* Test for method contains( AttributeType, String... )
*/
@Test
- public void testContainsAttributeTypeStringArray() throws NamingException
+ public void testContainsAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1401,7 +1400,7 @@
* Test for method contains( AttributeType, Value<?>... )
*/
@Test
- public void testContainsAttributeTypeValuesArray() throws NamingException
+ public void testContainsAttributeTypeValuesArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1436,7 +1435,7 @@
* Test for method contains( EntryAttribute... )
*/
@Test
- public void testContainsEntryAttributeArray() throws NamingException
+ public void testContainsEntryAttributeArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1466,7 +1465,7 @@
* Test for method contains( String, byte[]... )
*/
@Test
- public void testContainsStringByteArrayArray() throws NamingException
+ public void testContainsStringByteArrayArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1490,7 +1489,7 @@
* Test for method contains( String, String... )
*/
@Test
- public void testContainsStringStringArray() throws NamingException
+ public void testContainsStringStringArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1514,7 +1513,7 @@
* Test for method contains( String, Value<?>... )
*/
@Test
- public void testContainsStringValueArray() throws NamingException
+ public void testContainsStringValueArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1549,7 +1548,7 @@
* Test method for containsAttribute( AttributeType )
*/
@Test
- public void testContainsAttributeAttributeType() throws NamingException
+ public void testContainsAttributeAttributeType() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1580,7 +1579,7 @@
* Test method for containsAttribute( String )
*/
@Test
- public void testContainsAttributeString() throws NamingException
+ public void testContainsAttributeString() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1609,7 +1608,7 @@
* Test method for equals()
*/
@Test
- public void testEqualsObject() throws NamingException
+ public void testEqualsObject() throws Exception
{
Entry entry1 = new DefaultServerEntry( registries );
Entry entry2 = new DefaultServerEntry( registries );
@@ -1657,7 +1656,7 @@
* Test method for getAttributeTypes()
*/
@Test
- public void testGetAttributeTypes() throws NamingException
+ public void testGetAttributeTypes() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1685,7 +1684,7 @@
* Test method for get( AttributeType )
*/
@Test
- public void testGetAttributeType() throws NamingException
+ public void testGetAttributeType() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1712,7 +1711,7 @@
* Test method for get( String )
*/
@Test
- public void testGetString() throws NamingException
+ public void testGetString() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1758,7 +1757,7 @@
* Test method for hashcode()
*/
@Test
- public void testHashCode() throws InvalidNameException, NamingException
+ public void testHashCode() throws InvalidNameException, Exception
{
Entry entry1 = new DefaultServerEntry( registries, EXAMPLE_DN );
Entry entry2 = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1793,7 +1792,7 @@
* Test method for hasObjectClass( EntryAttribute )
*/
@Test
- public void testHasObjectClassEntryAttribute() throws NamingException
+ public void testHasObjectClassEntryAttribute() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1822,7 +1821,7 @@
* Test method for hasObjectClass( String )
*/
@Test
- public void testHasObjectClassString() throws NamingException
+ public void testHasObjectClassString() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1876,7 +1875,7 @@
* Test method for Iterator()
*/
@Test
- public void testIterator() throws NamingException
+ public void testIterator() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1917,7 +1916,7 @@
* Test for method put( AttributeType, byte[]... )
*/
@Test
- public void testPutAttributeTypeByteArrayArray() throws NamingException
+ public void testPutAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1958,7 +1957,7 @@
* Test for method put( AttributeType, String... )
*/
@Test
- public void testPutAttributeTypeStringArray() throws NamingException
+ public void testPutAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -1999,7 +1998,7 @@
* Test for method put( AttributeType, Value<?>... )
*/
@Test
- public void testPutAttributeTypeValueArray() throws NamingException
+ public void testPutAttributeTypeValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -2047,7 +2046,7 @@
* Test for method put( EntryAttribute...)
*/
@Test
- public void testPutEntryAttribute() throws NamingException
+ public void testPutEntryAttribute() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -2097,7 +2096,7 @@
* Test for method put( String, AttributeType, byte[]... )
*/
@Test
- public void testPutStringAttributeTypeByteArrayArray() throws NamingException
+ public void testPutStringAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -2172,7 +2171,7 @@
* Test for method put( String, AttributeType, String... )
*/
@Test
- public void testPutStringAttributeTypeStringArray() throws NamingException
+ public void testPutStringAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -2246,7 +2245,7 @@
* Test for method put( String, AttributeType, Value<?>... )
*/
@Test
- public void testPutStringAttributeTypeValueArray() throws NamingException
+ public void testPutStringAttributeTypeValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -2545,7 +2544,7 @@
/**
* Test the put( SA... ) method
*/
- @Test public void tesPutServerAttributeElipsis() throws NamingException
+ @Test public void tesPutServerAttributeElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2626,7 +2625,7 @@
/**
* Test the put( AT, String... ) method
*/
- @Test public void tesPutAtStringElipsis() throws NamingException
+ @Test public void tesPutAtStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2685,7 +2684,7 @@
/**
* Test the put( AT, Byte[]... ) method
*/
- @Test public void tesPutAtByteElipsis() throws NamingException
+ @Test public void tesPutAtByteElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2749,7 +2748,7 @@
/**
* Test the put( AT, Value... ) method
*/
- @Test public void tesPutAtSVs() throws NamingException
+ @Test public void tesPutAtSVs() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2812,7 +2811,7 @@
/**
* Test the put( upId, String... ) method
*/
- @Test public void tesPutUpIdStringElipsis() throws NamingException
+ @Test public void tesPutUpIdStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2876,7 +2875,7 @@
/**
* Test the put( upId, byte[]... ) method
*/
- @Test public void tesPutUpIdBytesElipsis() throws NamingException
+ @Test public void tesPutUpIdBytesElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -2939,7 +2938,7 @@
/**
* Test the put( upId, AT, String... ) method
*/
- @Test public void tesPutUpIDAtStringElipsis() throws NamingException
+ @Test public void tesPutUpIDAtStringElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3004,7 +3003,7 @@
/**
* Test the put( upId, AT, byte[]... ) method
*/
- @Test public void tesPutUpIDAtBytesElipsis() throws NamingException
+ @Test public void tesPutUpIDAtBytesElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3087,7 +3086,7 @@
/**
* Test the put( upId, AT, SV... ) method
*/
- @Test public void tesPutUpIDAtSVElipsis() throws NamingException
+ @Test public void tesPutUpIDAtSVElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3167,7 +3166,7 @@
/**
* Test the put( upId, SV... ) method
*/
- @Test public void tesPutUpIDSVElipsis() throws NamingException
+ @Test public void tesPutUpIDSVElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3216,7 +3215,7 @@
* Test method for remove( AttributeType, byte[]... )
*/
@Test
- public void testRemoveAttributeTypeByteArrayArray() throws NamingException
+ public void testRemoveAttributeTypeByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3245,7 +3244,7 @@
* Test method for remove( AttributeType, String... )
*/
@Test
- public void testRemoveAttributeTypeStringArray() throws NamingException
+ public void testRemoveAttributeTypeStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3274,7 +3273,7 @@
* Test method for remove( AttributeType, Value<?>... )
*/
@Test
- public void testRemoveAttributeTypeValueArray() throws NamingException
+ public void testRemoveAttributeTypeValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3310,7 +3309,7 @@
* Test method for remove( EntryAttribute... )
*/
@Test
- public void testRemoveEntryAttribute() throws NamingException
+ public void testRemoveEntryAttribute() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3342,7 +3341,7 @@
* Test method for removeAttributes( AttributeType... )
*/
@Test
- public void testRemoveAttributesAttributeTypeArray() throws NamingException
+ public void testRemoveAttributesAttributeTypeArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3370,7 +3369,7 @@
* Test method for removeAttributes( String... )
*/
@Test
- public void testRemoveAttributesStringArray() throws NamingException
+ public void testRemoveAttributesStringArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3401,7 +3400,7 @@
* Test method for remove( String, byte[]... )
*/
@Test
- public void testRemoveStringByteArrayArray() throws NamingException
+ public void testRemoveStringByteArrayArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3434,7 +3433,7 @@
* Test method for remove( String, String... )
*/
@Test
- public void testRemoveStringStringArray() throws NamingException
+ public void testRemoveStringStringArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3467,7 +3466,7 @@
* Test method for remove( String, Value<?>... )
*/
@Test
- public void testRemoveStringValueArray() throws NamingException
+ public void testRemoveStringValueArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3502,7 +3501,7 @@
/**
* Test the remove( upId...) method
*/
- @Test public void testRemoveUpIdElipsis() throws NamingException
+ @Test public void testRemoveUpIdElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3562,7 +3561,7 @@
/**
* Test the set(AT...) method
*/
- @Test public void testSetATElipsis() throws NamingException
+ @Test public void testSetATElipsis() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3644,7 +3643,7 @@
/**
* Test the set( upId ) method
*/
- @Test public void testSetUpID() throws NamingException
+ @Test public void testSetUpID() throws Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3726,7 +3725,7 @@
* Test method for set( AttributeType... )
*/
@Test
- public void testSetAttributeTypeArray() throws NamingException
+ public void testSetAttributeTypeArray() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3756,7 +3755,7 @@
* Test method for set( String... )
*/
@Test
- public void testSetStringArray() throws NamingException
+ public void testSetStringArray() throws Exception
{
Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3801,7 +3800,7 @@
* Test for method size()
*/
@Test
- public void testSize() throws NamingException
+ public void testSize() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
@@ -3829,7 +3828,7 @@
/**
* Test a conversion from a ServerEntry to an AttributesImpl
*/
- @Test public void testToAttributesImpl() throws InvalidNameException, NamingException
+ @Test public void testToAttributesImpl() throws InvalidNameException, Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -3865,7 +3864,7 @@
/**
* Test a conversion from a ServerEntry to an BasicAttributes
*/
- @Test public void testToBasicAttributes() throws InvalidNameException, NamingException
+ @Test public void testToBasicAttributes() throws InvalidNameException, Exception
{
LdapDN dn = new LdapDN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( registries,dn );
@@ -3901,7 +3900,7 @@
* Test method for toString().
*/
@Test
- public void testToString() throws NamingException
+ public void testToString() throws Exception
{
ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java Wed May 21 15:05:02 2008
@@ -19,14 +19,13 @@
*/
package org.apache.directory.server.core.entry;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import javax.naming.NamingException;
-
import org.apache.directory.server.schema.bootstrap.ApacheSchema;
import org.apache.directory.server.schema.bootstrap.ApachemetaSchema;
import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
@@ -47,6 +46,7 @@
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+
/**
* Test the ServerEntry serialization/deserialization class
*
@@ -65,7 +65,7 @@
* Initialize the registries once for the whole test suite
*/
@BeforeClass
- public static void setup() throws NamingException
+ public static void setup() throws Exception
{
loader = new BootstrapSchemaLoader();
oidRegistry = new DefaultOidRegistry();
@@ -103,7 +103,7 @@
}
- @Test public void testSerializeEmtpyServerEntry() throws IOException, NamingException, ClassNotFoundException
+ @Test public void testSerializeEmtpyServerEntry() throws IOException, Exception, ClassNotFoundException
{
LdapDN dn = LdapDN.EMPTY_LDAPDN;
ServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -117,7 +117,7 @@
assertEquals( entry, result );
}
- @Test public void testSerializeDNServerEntry() throws IOException, NamingException, ClassNotFoundException
+ @Test public void testSerializeDNServerEntry() throws IOException, Exception, ClassNotFoundException
{
LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
dn.normalize( oids );
@@ -134,7 +134,7 @@
}
- @Test public void testSerializeServerEntryOC() throws IOException, NamingException, ClassNotFoundException
+ @Test public void testSerializeServerEntryOC() throws IOException, Exception, ClassNotFoundException
{
LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
dn.normalize( oids );
@@ -152,7 +152,7 @@
}
- @Test public void testSerializeServerEntry() throws IOException, NamingException, ClassNotFoundException
+ @Test public void testSerializeServerEntry() throws IOException, Exception, ClassNotFoundException
{
LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
dn.normalize( oids );
Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java Wed May 21 15:05:02 2008
@@ -19,7 +19,6 @@
*/
package org.apache.directory.server.core.unit;
-import javax.naming.NamingException;
import org.apache.directory.server.constants.ServerDNConstants;
@@ -32,7 +31,7 @@
*/
public abstract class AbstractAdminTestCase extends AbstractTestCase
{
- protected AbstractAdminTestCase() throws NamingException
+ protected AbstractAdminTestCase() throws Exception
{
super( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
}
Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java Wed May 21 15:05:02 2008
@@ -33,7 +33,6 @@
import org.slf4j.LoggerFactory;
import javax.naming.Context;
-import javax.naming.NamingException;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
@@ -109,7 +108,7 @@
protected DirectoryService service;
- protected AbstractTestCase( String username, String password ) throws NamingException
+ protected AbstractTestCase( String username, String password ) throws Exception
{
if ( username == null || password == null )
{
@@ -240,7 +239,7 @@
* Restarts the server without loading data when it has been shutdown.
* @throws NamingException if the restart fails
*/
- protected void restart() throws NamingException
+ protected void restart() throws Exception
{
if ( service == null )
{
@@ -290,7 +289,7 @@
* @param passwd the password of the user
* @throws NamingException if there is a failure of any kind
*/
- protected void setContextRoots( String user, String passwd ) throws NamingException
+ protected void setContextRoots( String user, String passwd ) throws Exception
{
Hashtable<String,Object> env = new Hashtable<String,Object>();
env.put( DirectoryService.JNDI_KEY, service );
@@ -309,7 +308,7 @@
* @param env an environment to use while setting up the system root.
* @throws NamingException if there is a failure of any kind
*/
- protected void setContextRoots( Hashtable<String,Object> env ) throws NamingException
+ protected void setContextRoots( Hashtable<String,Object> env ) throws Exception
{
Hashtable<String,Object> envFinal = new Hashtable<String,Object>( env );
if ( !envFinal.containsKey( Context.PROVIDER_URL ) )
@@ -352,9 +351,10 @@
}
- protected Hashtable getOverriddenEnvironment()
+ @SuppressWarnings("unchecked")
+ protected Hashtable<String,Object> getOverriddenEnvironment()
{
- return ( Hashtable ) overrides.clone();
+ return ( Hashtable<String,Object> ) overrides.clone();
}
@@ -423,7 +423,7 @@
* @param ldif the ldif containing entries to add to the server.
* @throws NamingException if there is a problem adding the entries from the LDIF
*/
- protected void injectEntries( String ldif ) throws NamingException
+ protected void injectEntries( String ldif ) throws Exception
{
LdifReader reader = new LdifReader();
List<LdifEntry> entries = reader.parseLdif( ldif );
Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java Wed May 21 15:05:02 2008
@@ -145,7 +145,8 @@
return operation.execute( ctx, null );
}
- private DirContext getDirContext( String name ) throws NamingException
+
+ private DirContext getDirContext( String name ) throws Exception
{
return directoryService.getJndiContext(catalog.getBaseDn( name ));
}
Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java?rev=658894&r1=658893&r2=658894&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java Wed May 21 15:05:02 2008
@@ -30,7 +30,6 @@
import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
import javax.naming.directory.DirContext;
-import javax.naming.NamingException;
import javax.security.auth.kerberos.KerberosPrincipal;
@@ -51,7 +50,7 @@
try
{
ctx = directoryService.getJndiContext(searchBaseDn);
- } catch ( NamingException e )
+ } catch ( Exception e )
{
throw new ServiceConfigurationException("Can't get context at" + searchBaseDn, e);
}