directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r823129 - /directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java
Date Thu, 08 Oct 2009 11:21:36 GMT
Author: seelmann
Date: Thu Oct  8 11:21:35 2009
New Revision: 823129

URL: http://svn.apache.org/viewvc?rev=823129&view=rev
Log:
Check if DN is valid, this adds an error marker to the LDIF editor.

Modified:
    directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java

Modified: directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java?rev=823129&r1=823128&r2=823129&view=diff
==============================================================================
--- directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java
(original)
+++ directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/model/lines/LdifDnLine.java
Thu Oct  8 11:21:35 2009
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldifparser.model.lines;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldifparser.LdifParserConstants;
 import org.apache.directory.studio.ldifparser.LdifUtils;
 
@@ -74,7 +75,7 @@
 
     public boolean isValid()
     {
-        return super.isValid();
+        return super.isValid() && LdapDN.isValid( getUnfoldedDn() );
     }
 
 
@@ -88,6 +89,10 @@
         {
             return "Missing DN";
         }
+        else if ( !LdapDN.isValid( getUnfoldedDn() ) )
+        {
+            return "Invalid DN";
+        }
         else
         {
             return super.getInvalidString();



Mime
View raw message