directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1486629 - /directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
Date Mon, 27 May 2013 13:57:07 GMT
Author: pamarcelot
Date: Mon May 27 13:57:07 2013
New Revision: 1486629

URL: http://svn.apache.org/r1486629
Log:
Fix for DIRSTUDIO-917 (Exporting for ApacheDS an AT with a not-set syntax length results in
'm-length: 0' output in the resulting LDIF file).

Modified:
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java?rev=1486629&r1=1486628&r2=1486629&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
Mon May 27 13:57:07 2013
@@ -266,12 +266,16 @@ public class ExportSchemasForADSWizard e
             holder.setCollective( at.isCollective() );
             holder.setDescription( at.getDescription() );
             holder.setEquality( at.getEqualityOid() );
+            
             List<String> names = new ArrayList<String>();
+            
             for ( String name : at.getNames() )
             {
                 names.add( name );
             }
+            
             holder.setNames( names );
+            
             holder.setNoUserModification( !at.isUserModifiable() );
             holder.setObsolete( at.isObsolete() );
             holder.setOrdering( at.getOrderingOid() );
@@ -279,7 +283,12 @@ public class ExportSchemasForADSWizard e
             holder.setSubstr( at.getSubstringOid() );
             holder.setSuperior( at.getSuperiorOid() );
             holder.setSyntax( at.getSyntaxOid() );
-            holder.setOidLen( new Long( at.getSyntaxLength() ).intValue() );
+
+            if ( at.getSyntaxLength() > 0 )
+            {
+                holder.setOidLen( at.getSyntaxLength() );
+            }
+
             holder.setUsage( at.getUsage() );
 
             sb.append( holder.toLdif( schema.getSchemaName() ) + "\n" ); //$NON-NLS-1$



Mime
View raw message