directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Henne <jo...@bawue.de>
Subject Re: Questions about the versions in the repository
Date Sat, 29 Jul 2006 21:46:01 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Emmanuel Lecharny schrieb:
<blockquote cite="mid44CBCBD8.5050706@gmail.com" type="cite">Alex
Karasulu a écrit :
  <br>
  <blockquote type="cite">Jörg Henne wrote:
    <br>
    <blockquote type="cite">Hi all,
      <br>
      <br>
so far, I've only worked with the release candidates
(directory/releases/apacheds/1.0-RCx). But there is, of course, also
the trunk and the 1.0 branch. The difference between the 1.0 branch and
the trunk seems to be rather significant. What, roughly, are the
important differences between those two, and which one is the
recommended starting point?
      <br>
    </blockquote>
The 1.1 branch is the trunk.  1.0 is the stable branch we're trying to
clean up and get out the door.
    <br>
    <br>
1.1 has a bunch of new features like OSGi and Triggers/Stored Procs.
    <br>
    <br>
HTH,
    <br>
Alex
    <br>
    <br>
  </blockquote>
I will add that we are currently working in a branch ( 1.0
optimization-trunk) which will be merged soon in the 1.0 branch and the
trunks.
  <br>
  <br>
Emmanuel.
  <br>
</blockquote>
Ok, thanks for the overview. Since I am focused on getting something
production-ish ready, I'll stick with 1.0-trunks for now.<br>
I've had some problems getting <a
 href="cid:part1.00020108.02040303@bawue.de">org.apache.directory.shared.ldap.ldif.LdifReaderTest.java</a>
to succeed:<br>
- the generated test files use the absolute path "/tmp/" as a prefix.
This is fine on *nix, but fails on Windows, of course.<br>
- the <a class="moz-txt-link-freetext" href="file://">file://</a> URLs have the
same Problem, of course.<br>
- the UTF-8 used in the file doesn't seem to be recognized out of the
box. This causes problems with three tests. I don't know whether this
is a problem with maven, my setup, or Windows. Anyway: I converted two
of them to use \uxxxx escapes, however there is still
testLdifParserRFC2849Sample4() which I don't readily see how to
convert, since eclipse doesn't display some characters (and I do have
CJK fonts installed!). Maybe I'll start another try with vi tomorrow.<br>
<br>
Joerg Henne<br>
<br>
Here's a patch for the file, although I fear that applying it might
fail due to character set problems...<br>
<br>
Index:
C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java<br>
===================================================================<br>
---
C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java   
(revision 426825)<br>
+++
C:/workspaces/apacheds-1.0-trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java   
(working copy)<br>
@@ -8,6 +8,7 @@<br>
 import java.io.FileOutputStream;<br>
 import java.io.IOException;<br>
 import java.io.UnsupportedEncodingException;<br>
+import java.net.URL;<br>
 import java.util.List;<br>
 <br>
 import junit.framework.TestCase;<br>
@@ -27,10 +28,12 @@<br>
 public class LdifReaderTest extends TestCase<br>
 {<br>
     private byte[] data;<br>
+    private URL jensenURL;<br>
+    private URL fionaURL;<br>
 <br>
     private File createFile( String name, byte[] data ) throws
IOException<br>
     {<br>
-        File jpeg = new File( "/tmp/" + name );<br>
+        File jpeg = File.createTempFile(name, null);<br>
 <br>
         jpeg.createNewFile();<br>
 <br>
@@ -60,8 +63,8 @@<br>
             data[i] = (byte) i;<br>
         }<br>
 <br>
-        createFile( "hjensen.jpg", data );<br>
-        createFile( "fiona.jpg", data );<br>
+        jensenURL = createFile( "hjensen.jpg", data ).toURL();<br>
+        fionaURL = createFile( "fiona.jpg", data ).toURL();<br>
     }<br>
 <br>
     public void testLdifNull() throws NamingException<br>
@@ -467,7 +470,7 @@<br>
         assertEquals(
"cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn() );<br>
 <br>
         Attribute attr = entry.get( "cn" );<br>
-        assertTrue( attr.contains( "Emmanuel Lécharny".getBytes(
"UTF-8" ) ) );<br>
+        assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes(
"UTF-8" ) ) );<br>
 <br>
         attr = entry.get( "objectclass" );<br>
         assertTrue( attr.contains( "top" ) );<br>
@@ -510,7 +513,7 @@<br>
         assertEquals(
"cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn() );<br>
 <br>
         Attribute attr = entry.get( "cn" );<br>
-        assertTrue( attr.contains( "Emmanuel Lécharny  ".getBytes(
"UTF-8" ) ) );<br>
+        assertTrue( attr.contains( "Emmanuel L\u00e9charny 
".getBytes( "UTF-8" ) ) );<br>
 <br>
         attr = entry.get( "objectclass" );<br>
         assertTrue( attr.contains( "top" ) );<br>
@@ -911,7 +915,7 @@<br>
             "sn: Jensen\n" + <br>
             "uid: hjensen\n" + <br>
             "telephonenumber: +1 408 555 1212\n" + <br>
-            "jpegphoto:&lt; <a class="moz-txt-link-freetext" href="file:///tmp/hjensen.jpg">file:///tmp/hjensen.jpg</a>";<br>
+            "jpegphoto:&lt; " + jensenURL.toExternalForm();<br>
 <br>
         LdifReader reader = new LdifReader();<br>
         List entries = reader.parseLdif( ldif );<br>
@@ -1007,7 +1011,7 @@<br>
             "sn: Jensen\n" +<br>
             "uid: fiona\n" +<br>
             "telephonenumber: +1 408 555 1212\n" +<br>
-            "jpegphoto:&lt; <a class="moz-txt-link-freetext" href="file:///tmp/fiona.jpg\n">file:///tmp/fiona.jpg\n</a>"
+<br>
+            "jpegphoto:&lt; " + fionaURL + "\n" +<br>
             "\n" +<br>
             // Second entry modification : DELETE<br>
             "# Delete an existing entry\n" +<br>
<br>
</body>
</html>

Mime
View raw message