directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065463 - in /directory/shared/trunk/ldap/src: main/java/org/apache/directory/shared/ldap/codec/ test/java/org/apache/directory/shared/ldap/codec/
Date Mon, 31 Jan 2011 01:46:14 GMT
Author: akarasulu
Date: Mon Jan 31 01:46:14 2011
New Revision: 1065463

URL: http://svn.apache.org/viewvc?rev=1065463&view=rev
Log:
removed some stuff that is not a test

Removed:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/TestCodecControl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/TestControl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/TestControlFactory.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/TestLdapCodecService.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/UseCaseTest.java
Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java?rev=1065463&r1=1065462&r2=1065463&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Mon Jan 31 01:46:14 2011
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import java.lang.reflect.Field;
+import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -250,7 +251,13 @@ public class DefaultLdapCodecService imp
 
     public javax.naming.ldap.Control toJndiControl( Control control ) throws EncoderException
     {
-        return null;
+        ICodecControl<? extends Control> decorator = decorate( control );
+        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
+        decorator.encode( bb );
+        bb.flip();
+        javax.naming.ldap.BasicControl jndiControl = 
+            new javax.naming.ldap.BasicControl( control.getOid(), control.isCritical(), bb.array()
);
+        return jndiControl;
     }
 
 



Mime
View raw message