directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r627793 - /directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
Date Thu, 14 Feb 2008 16:17:02 GMT
Author: elecharny
Date: Thu Feb 14 08:16:58 2008
New Revision: 627793

URL: http://svn.apache.org/viewvc?rev=627793&view=rev
Log:
Fixed a potential NPE in RdnParser.

Modified:
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=627793&r1=627792&r2=627793&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
Thu Feb 14 08:16:58 2008
@@ -228,6 +228,26 @@
      * Test the clone method for a RDN.
      */
     @Test
+    public void testParseRDNNull() throws InvalidNameException
+    {
+        Rdn rdn = null;
+
+        try
+        {
+        	RdnParser.parse( "c=d", rdn );
+        	fail();
+        }
+        catch ( InvalidNameException ine )
+        {
+        	assertTrue( true );
+        }
+    }
+
+
+    /**
+     * Test the clone method for a RDN.
+     */
+    @Test
     public void testRDNCloningOneNameComponent() throws InvalidNameException
     {
         Rdn rdn = new Rdn( "a", "a", "b", "b" );



Mime
View raw message