From directory-cvs-return-danielmartin@example.com Tue Mar 01 22:46:38 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 66847 invoked from network); 1 Mar 2005 22:46:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 22:46:38 -0000 Received: (qmail 11144 invoked by uid 500); 1 Mar 2005 22:46:37 -0000 Delivered-To: danielmartin@example.com Received: (qmail 11085 invoked by uid 500); 1 Mar 2005 22:46:36 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 11071 invoked by uid 99); 1 Mar 2005 22:46:36 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 14:46:36 -0800 Received: (qmail 66781 invoked by uid 65534); 1 Mar 2005 22:46:34 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Tue, 01 Mar 2005 22:46:34 -0000 Subject: svn commit: r155835 - in incubator/directory/asn1/trunk/ber/src: java/org/apache/asn1/ber/Length.java test/org/apache/asn1/ber/LengthTest.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: adc Date: Tue Mar 1 14:46:31 2005 New Revision: 155835 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155835 Log: The Length' s number of bytes must not be 127 http://issues.apache.org/jira/browse/DIRSNICKERS-102 Modified: incubator/directory/asn1/trunk/ber/src/java/org/apache/asn1/ber/Length.= java incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/LengthT= est.java Modified: incubator/directory/asn1/trunk/ber/src/java/org/apache/asn1/ber/L= ength.java URL: http://svn.apache.org/viewcvs/incubator/directory/asn1/trunk/ber/src/j= ava/org/apache/asn1/ber/Length.java?view=3Ddiff&r1=3D155834&r2=3D155835 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/asn1/trunk/ber/src/java/org/apache/asn1/ber/Length.= java (original) +++ incubator/directory/asn1/trunk/ber/src/java/org/apache/asn1/ber/Length.= java Tue Mar 1 14:46:31 2005 @@ -32,8 +32,8 @@ public class Length { /** used to mark length as indefinate */ - public static final int INDEFINATE =3D -2 ; - /** used to mark length as undefined */=20 + public static final int INDEFINITE =3D -2 ; + /** used to mark length as undefined */ public static final int UNDEFINED =3D -1 ; /** the end long form terminate bit flag mask */ public static final int END_MASK =3D 0x80 ; @@ -44,21 +44,21 @@ private int numOctets =3D UNDEFINED ; /** whether or not this length has been fixated */ private boolean isFixated =3D false ; - /** a byte buffer used to collect the arriving length octets */=20 + /** a byte buffer used to collect the arriving length octets */ private final ByteBuffer buf =3D ByteBuffer.allocate( 5 ) ; =20 =20 /** * Checks to see if the length has been fixated. - *=20 + * * @return true if it is fixated, false if not */ public boolean isFixated() { return isFixated ; } - =20 - =20 + + /** * Clears this tag's data of all bytes and values calculated so all is= as it * was when this instance was created. @@ -70,13 +70,13 @@ numOctets =3D 1 ; buf.clear() ; } - =20 - =20 + + /** - * Fixates the data within this Length calculating all the derived=20 + * Fixates the data within this Length calculating all the derived * properties from the existing set of octets. While fixated octets * cannot be added. - *=20 + * * @throws org.apache.asn1.codec.DecoderException if this Length is in= valid */ void fixate() throws DecoderException @@ -85,37 +85,52 @@ value =3D getLength( buf ) ; isFixated =3D true ; } - =20 - =20 + + /** * Adds an octet to this Length component and as a side effect fixates= the * Length component if all the required length data has arrived. - *=20 + * * @param octet the 8 bit byte to add */ void add( byte octet ) throws DecoderException { if ( isFixated ) - { =20 + { throw new IllegalStateException( "data added to fixated length= " ) ; } - =20 + buf.put( octet ) ; - =20 + if ( buf.position() =3D=3D 1 ) { - // if its the long form - if ( END_MASK =3D=3D ( octet & END_MASK ) && ( octet & 0x7F ) = > 0 ) + // if its the long form, but not above 126 octets : (1)111 111= 1 is not + // allowed : this value is reserved for future extension. + if ( END_MASK =3D=3D ( octet & END_MASK )) { - // capture number of octets we need to compute length - numOctets =3D octet & 0x7F ; + int typeLength =3D octet & 0x7F; + + if (typeLength =3D=3D 0) + { + numOctets =3D INDEFINITE; + fixate() ; + } + else if (typeLength =3D=3D 0x7F) + { + throw new DecoderException( "The number of octets must not b= e 127 (reserved for future extension) " ) ; + } + else + { + // capture number of octets we need to compute length + numOctets =3D octet & 0x7F ; + } } - else=20 - { =20 + else + { fixate() ; } } - =20 + /* * if we have collected all the octets needed for computing the lo= ng * form length so we need to calculate the length and just fixate @@ -125,22 +140,22 @@ fixate() ; } } - =20 - =20 + + /** * Gets the length of the value. - *=20 + * * @return the length of the value */ public int getLength() { return value ; } - =20 - =20 + + /** * Gets the number of octets currently in this Length component. - *=20 + * * @return the number of octets currently within this Length component */ public int size() @@ -148,10 +163,10 @@ return buf.position() ; } =20 - =20 + /** * Decodes the length of a value for a tlv using the Length field byte= s=2E - *=20 + * * @param octets the length field bytes in the TLV * @return the length of the TLV * @throws DecoderException if the precision cannot hold the number @@ -167,20 +182,20 @@ */ throw new DecoderException( "Length number is too large." ) ; } - =20 + byte octet =3D octets.get() ; - =20 + // if we are using the short form then just return the first octet if ( ( octet & END_MASK ) =3D=3D 0 ) { return octet ; } - // using the indefinate form + // using the indefinite form else if ( ( octet & 0x7F ) =3D=3D 0 ) { - return INDEFINATE ; + return INDEFINITE ; } - =20 + // using the long form so we calculate the length from all octets int length =3D 0 ; for ( int ii =3D octets.remaining(), shift =3D (ii-1)<<3; ii > 0; = ii--, shift -=3D 8 ) @@ -196,7 +211,7 @@ // shift +=3D 8 ; // } // while ( octets.hasRemaining() ) ; - =20 + return length ; } } Modified: incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/L= engthTest.java URL: http://svn.apache.org/viewcvs/incubator/directory/asn1/trunk/ber/src/t= est/org/apache/asn1/ber/LengthTest.java?view=3Ddiff&r1=3D155834&r2=3D155835 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/LengthT= est.java (original) +++ incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/LengthT= est.java Tue Mar 1 14:46:31 2005 @@ -237,4 +237,48 @@ =20 assertEquals( 1, length.getLength() ); } + + /** + * Test that a Length could not begin with a 0xFF byte, which is + * reserved for future extensions. + * + */ + public void testRestrictedValueForFutureExtension()=20 + { + Length length =3D new Length(); + + try + { + length.add( (byte) 0xFF ) ; + length.add( (byte) 0x01 ) ; + fail( "should fail before we get here" ) ; + } + catch ( DecoderException t ) + { + assertNotNull( t ) ; + } + } + + /** + * Test that an indefinite Length form is rejected.=20 + * + */ + public void testIndefiniteLength()=20 + { + Length length =3D new Length(); + + try + { + length.add( (byte) 0x80 ) ; + length.add( (byte) 0x01 ) ; + length.add( (byte) 0x00 ) ; + length.add( (byte) 0x00 ) ; + fail( "should fail before we get here" ) ; + } + catch ( Throwable t ) + { + assertNotNull( t ) ; + } + } } + From directory-cvs-return-danielmartin@example.com Tue Mar 01 23:37:14 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 89712 invoked from network); 1 Mar 2005 23:37:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 23:37:14 -0000 Received: (qmail 90171 invoked by uid 500); 1 Mar 2005 23:37:13 -0000 Delivered-To: danielmartin@example.com Received: (qmail 90131 invoked by uid 500); 1 Mar 2005 23:37:13 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 90117 invoked by uid 99); 1 Mar 2005 23:37:13 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 15:37:11 -0800 Received: (qmail 89668 invoked by uid 65534); 1 Mar 2005 23:37:09 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Tue, 01 Mar 2005 23:37:09 -0000 Subject: svn commit: r155840 - in incubator/directory/sitedocs/trunk/xdocs: index.xml news.xml svn.xml To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Tue Mar 1 15:37:05 2005 New Revision: 155840 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155840 Log: some cleanup Modified: incubator/directory/sitedocs/trunk/xdocs/index.xml incubator/directory/sitedocs/trunk/xdocs/news.xml incubator/directory/sitedocs/trunk/xdocs/svn.xml Modified: incubator/directory/sitedocs/trunk/xdocs/index.xml URL: http://svn.apache.org/viewcvs/incubator/directory/sitedocs/trunk/xdocs= /index.xml?view=3Ddiff&r1=3D155839&r2=3D155840 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/sitedocs/trunk/xdocs/index.xml (original) +++ incubator/directory/sitedocs/trunk/xdocs/index.xml Tue Mar 1 15:37:05 = 2005 @@ -19,9 +19,9 @@ <area shape=3D"rect" alt=3D"Apache Directory Server Core" href=3D"http:/= /incubator.apache.org/directory/subprojects/apacheds/projects/apacheds-core= /index.html" target=3D"http://incubator.apache.org/directory/subprojects/ap= acheds/projects/apacheds-core/index.html" title=3D"Apache Directory Server = Core" coords=3D"209,277,612,443" /> <area shape=3D"rect" alt=3D"Kerberos Provider" href=3D"http://incubator.= apache.org/directory/subprojects/kerberos/index.html" target=3D"http://incu= bator.apache.org/directory/subprojects/kerberos/index.html" title=3D"Kerber= os Provider" coords=3D"457,210,530,225" /> <area shape=3D"rect" alt=3D"LDAP Provider" href=3D"http://incubator.apac= he.org/directory/subprojects/apacheds/index.html" target=3D"http://incubato= r=2Eapache.org/directory/subprojects/apacheds/index.html" title=3D"LDAP Pro= vider" coords=3D"374,210,448,225"/> - <area shape=3D"rect" alt=3D"DNS Provider" href=3D"http://svn.apache.org/= viewcvs.cgi/incubator/directory/dns/trunk/" target=3D"http://svn.apache.org= /viewcvs.cgi/incubator/directory/dns/trunk/" title=3D"DNS Provider" coords= =3D"209,210,283,224" /> - <area shape=3D"rect" alt=3D"DHCP Provider" href=3D"http://svn.apache.org= /viewcvs.cgi/incubator/directory/dhcp/trunk/" target=3D"http://svn.apache.o= rg/viewcvs.cgi/incubator/directory/dhcp/trunk/" title=3D"DHCP Provider" coo= rds=3D"128,210,202,225" /> - <area shape=3D"rect" alt=3D"NTP Provider" href=3D"http://svn.apache.org/= viewcvs.cgi/incubator/directory/ntp/trunk/" target=3D"http://svn.apache.org= /viewcvs.cgi/incubator/directory/ntp/trunk/" title=3D"NTP Provider" coords= =3D"44,209,118,224" /> + <area shape=3D"rect" alt=3D"DNS Provider" href=3D"http://svn.apache.org/= viewcvs.cgi/incubator/directory/protocols/dns/trunk/" target=3D"http://svn.= apache.org/viewcvs.cgi/incubator/directory/network/dns/trunk/" title=3D"DNS= Provider" coords=3D"209,210,283,224" /> + <area shape=3D"rect" alt=3D"DHCP Provider" href=3D"http://svn.apache.org= /viewcvs.cgi/incubator/directory/protocols/dhcp/trunk/" target=3D"http://sv= n=2Eapache.org/viewcvs.cgi/incubator/directory/network/dhcp/trunk/" title= =3D"DHCP Provider" coords=3D"128,210,202,225" /> + <area shape=3D"rect" alt=3D"NTP Provider" href=3D"http://svn.apache.org/= viewcvs.cgi/incubator/directory/protocols/ntp/trunk/" target=3D"http://svn.= apache.org/viewcvs.cgi/incubator/directory/network/ntp/trunk/" title=3D"NTP= Provider" coords=3D"44,209,118,224" /> </map> <img usemap=3D"server" src=3D"./images/50k-ft-architecture.png"/> =20 @@ -49,24 +49,6 @@ also becoming the one stop shop for all directory and naming conce= rns=20 here at the ASF. These concerns may be outside of the scope of JN= DI=20 or may not even fall under Java. - </p> - </section> - =20 - <section name=3D"Incubation Disclaimer"> - <p> - The Directory Project is an effort undergoing incubation at the Ap= ache=20 - Software Foundation (ASF), sponsored by Noel Bergman. Incubation i= s=20 - required of all newly accepted projects until a further review ind= icates - that the infrastructure, communications, and decision making proce= ss=20 - have stabilized in a manner consistent with other successful ASF=20 - projects. While incubation status is not necessarily a reflection = of=20 - the completeness or stability of the code, it does indicate that t= he=20 - project has yet to be fully endorsed by the ASF.=20 - </p> - =20 - <p> - The status of the Directory Project is tracked by the Apache Incub= ator - <a href=3D"http://incubator.apache.org/projects/directory.html">he= re</a>. </p> </section> </body> Modified: incubator/directory/sitedocs/trunk/xdocs/news.xml URL: http://svn.apache.org/viewcvs/incubator/directory/sitedocs/trunk/xdocs= /news.xml?view=3Ddiff&r1=3D155839&r2=3D155840 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/sitedocs/trunk/xdocs/news.xml (original) +++ incubator/directory/sitedocs/trunk/xdocs/news.xml Tue Mar 1 15:37:05 2= 005 @@ -10,11 +10,29 @@ <section name=3D"News and Information"> <!-- insert new news items as a subsection here w/ most recent first= --> =20 - <subsection name=3D"04-JUL-2004: Directory Project Website Revamped"> - <p> - The Directory Project site has been reorganized and the look and= feel improved. - </p> - </subsection> + <subsection name=3D"23-FEB-2004: Directory Project Graduates Incub= ator"> + <p> + The Directory Project is now an official top level Apache Proj= ect as of the + board meeting where the resolution was passed. The PMC Chair = is Alex Karasulu + and the following individuals comprise the new PMC: + </p> + + <table> + <tr><th>PMC Member</th></tr> + <tr><td>Trustin Lee</td></tr> + <tr><td>Vince Tence</td></tr> + <tr><td>Alex Karasulu</td></tr> + <tr><td>Noel Burgman</td></tr> + <tr><td>Enrique Rodriguez</td></tr> + <tr><td>Brett Porter</td></tr> + <tr><td>Phil Steitz</td></tr> + </table> + </subsection> + <subsection name=3D"04-JUL-2004: Directory Project Website Revampe= d"> + <p> + The Directory Project site has been reorganized and the look a= nd feel improved. + </p> + </subsection> <subsection name=3D"01-FEB-2004: Published Directory Project Website= "> <p> Thanks to the Avalon folks for allowing us to use their new site= as Modified: incubator/directory/sitedocs/trunk/xdocs/svn.xml URL: http://svn.apache.org/viewcvs/incubator/directory/sitedocs/trunk/xdocs= /svn.xml?view=3Ddiff&r1=3D155839&r2=3D155840 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/sitedocs/trunk/xdocs/svn.xml (original) +++ incubator/directory/sitedocs/trunk/xdocs/svn.xml Tue Mar 1 15:37:05 20= 05 @@ -6,21 +6,21 @@ </properties>=20 <body> =20 - <section name=3D"No Releases?"> + <section name=3D"No Releases?"> <p> If you are looking to download the source code for stable versions= of=20 the Directory projects, you're out of luck. We can't really relea= se=20 anything until an incubator exit. - </p> + </p> </section> =20 <section name=3D"About Subversion"> - <p> Subversion is an open source version control system, released un= der=20 - an Apache/BSD-style license. This application was designed, and is= on=20 - track to replace CVS. Users familiar with CVS will be able to jump= into=20 - Subversion easily as most of the interface is the same. Details ab= out=20 - the benefits and technical information can be viewed on the Subver= sion=20 - <a href=3D"http://subversion.tigris.org/">home page</a>, here are = just a=20 + <p> Subversion is an open source version control system, released un= der=20 + an Apache/BSD-style license. This application was designed, and is= on=20 + track to replace CVS. Users familiar with CVS will be able to jump= into=20 + Subversion easily as most of the interface is the same. Details ab= out=20 + the benefits and technical information can be viewed on the Subver= sion=20 + <a href=3D"http://subversion.tigris.org/">home page</a>, here are = just a=20 few of the highlights:=20 <ul>=20 <li> Atomic Commits </li>=20 @@ -33,16 +33,16 @@ </section>=20 =20 <section name=3D"Getting Help"> =20 - <p> The subversion book is an excellent resource for users and=20 - administrators, it can obtained <a href=3D=20 - "http://svnbook.red-bean.com/html-chunk/">here</a>. + <p> The subversion book is an excellent resource for users and=20 + administrators, it can obtained <a href=3D=20 + "http://svnbook.red-bean.com/html-chunk/">here</a>. </p> </section> =20 <section name=3D"Browsing the Repository"> <p> You can browse the repository using ViewSVN <a href=3D - "http://svn.apache.org/viewcvs.cgi/incubator/directory/?root=3DApac= he-SVN"> + "http://svn.apache.org/viewcvs.cgi/directory/?root=3DApache-SVN"> here</a>. </p> </section> @@ -64,7 +64,7 @@ =20 <p>To get the entire project, run the following command</p> <source> - svn co https://svn.apache.org/repos/asf/incubator/directory + svn co https://svn.apache.org/repos/asf/directory </source> =20 <p> @@ -97,15 +97,15 @@ <p> Before you can commit to the subversion repository, you will need to create an SVN password. To do this, log on to=20 - minotaur.apache.org and run the following command: + minotaur.apache.org and run the following command: </p> <source> - svnpasswd=20 + svnpasswd=20 </source> <p> The will ask you for a subversion password. This is the user=20 - and password you will use when checking in code. =20 - </p> + and password you will use when checking in code. =20 + </p> </subsection> <subsection name=3D"Commit Code Via Command Line"> <p> @@ -117,11 +117,11 @@ SVN password, which is not the same as your minotaur password This password can be entered as a command line argument to=20 avoid interaction. The follow command line will commit with a=20 - specified username and password: + specified username and password: </p> <source> - svn commit --username <i>username</i> --password <i>password</i> - </source> + svn commit --username <i>username</i> --password <i>password</i> + </source> </subsection> <subsection name=3D"Commit with Tortoise"> <p> @@ -133,8 +133,8 @@ will appear prompting for username and password. You will also be able to select a check box to remember the credentials. If y= ou select this check box, you will not be prompted for information = in - the future - </p> + the future + </p> </subsection> </section> </body> From directory-cvs-return-danielmartin@example.com Tue Mar 01 23:53:08 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 94806 invoked from network); 1 Mar 2005 23:53:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 23:53:08 -0000 Received: (qmail 12891 invoked by uid 500); 1 Mar 2005 23:53:08 -0000 Delivered-To: danielmartin@example.com Received: (qmail 12836 invoked by uid 500); 1 Mar 2005 23:53:08 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 12822 invoked by uid 99); 1 Mar 2005 23:53:07 -0000 X-ASF-Spam-Status: No, hits=-9.6 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 15:53:07 -0800 Received: (qmail 94795 invoked by uid 65534); 1 Mar 2005 23:53:06 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Tue, 01 Mar 2005 23:53:06 -0000 Subject: svn commit: r155841 - in incubator/directory/protocols: changepw/trunk/INCUBATOR-DISCLAIMER.txt dhcp/trunk/INCUBATOR-DISCLAIMER.txt dns/trunk/INCUBATOR-DISCLAIMER.txt kerberos/trunk/INCUBATOR-DISCLAIMER.txt ntp/trunk/INCUBATOR-DISCLAIMER.txt To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: erodriguez Date: Tue Mar 1 15:53:04 2005 New Revision: 155841 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155841 Log: Removed incubator disclaimers from the protocols. Removed: incubator/directory/protocols/changepw/trunk/INCUBATOR-DISCLAIMER.txt incubator/directory/protocols/dhcp/trunk/INCUBATOR-DISCLAIMER.txt incubator/directory/protocols/dns/trunk/INCUBATOR-DISCLAIMER.txt incubator/directory/protocols/kerberos/trunk/INCUBATOR-DISCLAIMER.txt incubator/directory/protocols/ntp/trunk/INCUBATOR-DISCLAIMER.txt From directory-cvs-return-danielmartin@example.com Wed Mar 02 00:30:35 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 8401 invoked from network); 2 Mar 2005 00:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 00:30:34 -0000 Received: (qmail 51428 invoked by uid 500); 2 Mar 2005 00:30:34 -0000 Delivered-To: danielmartin@example.com Received: (qmail 51370 invoked by uid 500); 2 Mar 2005 00:30:33 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 51356 invoked by uid 99); 2 Mar 2005 00:30:33 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 16:30:33 -0800 Received: (qmail 8374 invoked by uid 65534); 2 Mar 2005 00:30:32 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 00:30:32 -0000 Subject: svn commit: r155845 - in incubator/directory/asn1/branches/rewrite/ber/src: java/org/apache/asn1/ber/Length.java test/org/apache/asn1/ber/LengthTest.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Tue Mar 1 16:30:30 2005 New Revision: 155845 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155845 Log: applying changes made to trunk by Alan using patches from Emmanuel Modified: incubator/directory/asn1/branches/rewrite/ber/src/java/org/apache/asn1/= ber/Length.java incubator/directory/asn1/branches/rewrite/ber/src/test/org/apache/asn1/= ber/LengthTest.java Modified: incubator/directory/asn1/branches/rewrite/ber/src/java/org/apache= /asn1/ber/Length.java URL: http://svn.apache.org/viewcvs/incubator/directory/asn1/branches/rewrit= e/ber/src/java/org/apache/asn1/ber/Length.java?view=3Ddiff&r1=3D155844&r2= =3D155845 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/asn1/branches/rewrite/ber/src/java/org/apache/asn1/= ber/Length.java (original) +++ incubator/directory/asn1/branches/rewrite/ber/src/java/org/apache/asn1/= ber/Length.java Tue Mar 1 16:30:30 2005 @@ -33,8 +33,8 @@ public class Length { /** used to mark length as indefinate */ - public static final int INDEFINATE =3D -2 ; - /** used to mark length as undefined */=20 + public static final int INDEFINITE =3D -2 ; + /** used to mark length as undefined */ public static final int UNDEFINED =3D -1 ; /** the end long form terminate bit flag mask */ public static final int END_MASK =3D 0x80 ; @@ -45,21 +45,21 @@ private int numOctets =3D UNDEFINED ; /** whether or not this length has been fixated */ private boolean isFixated =3D false ; - /** a byte buffer used to collect the arriving length octets */=20 + /** a byte buffer used to collect the arriving length octets */ private final ByteBuffer buf =3D ByteBuffer.allocate( 5 ) ; =20 =20 /** * Checks to see if the length has been fixated. - *=20 + * * @return true if it is fixated, false if not */ public boolean isFixated() { return isFixated ; } - =20 - =20 + + /** * Clears this tag's data of all bytes and values calculated so all is= as it * was when this instance was created. @@ -71,13 +71,13 @@ numOctets =3D 1 ; buf.clear() ; } - =20 - =20 + + /** - * Fixates the data within this Length calculating all the derived=20 + * Fixates the data within this Length calculating all the derived * properties from the existing set of octets. While fixated octets * cannot be added. - *=20 + * * @throws org.apache.asn1.codec.DecoderException if this Length is in= valid */ void fixate() throws DecoderException @@ -86,37 +86,52 @@ value =3D getLength( buf ) ; isFixated =3D true ; } - =20 - =20 + + /** * Adds an octet to this Length component and as a side effect fixates= the * Length component if all the required length data has arrived. - *=20 + * * @param octet the 8 bit byte to add */ void add( byte octet ) throws DecoderException { if ( isFixated ) - { =20 + { throw new IllegalStateException( "data added to fixated length= " ) ; } - =20 + buf.put( octet ) ; - =20 + if ( buf.position() =3D=3D 1 ) { - // if its the long form - if ( END_MASK =3D=3D ( octet & END_MASK ) && ( octet & 0x7F ) = > 0 ) + // if its the long form, but not above 126 octets : (1)111 111= 1 is not + // allowed : this value is reserved for future extension. + if ( END_MASK =3D=3D ( octet & END_MASK )) { - // capture number of octets we need to compute length - numOctets =3D octet & 0x7F ; + int typeLength =3D octet & 0x7F; + + if (typeLength =3D=3D 0) + { + numOctets =3D INDEFINITE; + fixate() ; + } + else if (typeLength =3D=3D 0x7F) + { + throw new DecoderException( "The number of octets must not b= e 127 (reserved for future extension) " ) ; + } + else + { + // capture number of octets we need to compute length + numOctets =3D octet & 0x7F ; + } } - else=20 - { =20 + else + { fixate() ; } } - =20 + /* * if we have collected all the octets needed for computing the lo= ng * form length so we need to calculate the length and just fixate @@ -126,22 +141,22 @@ fixate() ; } } - =20 - =20 + + /** * Gets the length of the value. - *=20 + * * @return the length of the value */ public int getLength() { return value ; } - =20 - =20 + + /** * Gets the number of octets currently in this Length component. - *=20 + * * @return the number of octets currently within this Length component */ public int size() @@ -149,10 +164,10 @@ return buf.position() ; } =20 - =20 + /** * Decodes the length of a value for a tlv using the Length field byte= s=2E - *=20 + * * @param octets the length field bytes in the TLV * @return the length of the TLV * @throws DecoderException if the precision cannot hold the number @@ -168,20 +183,20 @@ */ throw new DecoderException( "Length number is too large." ) ; } - =20 + byte octet =3D octets.get() ; - =20 + // if we are using the short form then just return the first octet if ( ( octet & END_MASK ) =3D=3D 0 ) { return octet ; } - // using the indefinate form + // using the indefinite form else if ( ( octet & 0x7F ) =3D=3D 0 ) { - return INDEFINATE ; + return INDEFINITE ; } - =20 + // using the long form so we calculate the length from all octets int length =3D 0 ; for ( int ii =3D octets.remaining(), shift =3D (ii-1)<<3; ii > 0; = ii--, shift -=3D 8 ) @@ -197,7 +212,7 @@ // shift +=3D 8 ; // } // while ( octets.hasRemaining() ) ; - =20 + return length ; } } Modified: incubator/directory/asn1/branches/rewrite/ber/src/test/org/apache= /asn1/ber/LengthTest.java URL: http://svn.apache.org/viewcvs/incubator/directory/asn1/branches/rewrit= e/ber/src/test/org/apache/asn1/ber/LengthTest.java?view=3Ddiff&r1=3D155844&= r2=3D155845 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/asn1/branches/rewrite/ber/src/test/org/apache/asn1/= ber/LengthTest.java (original) +++ incubator/directory/asn1/branches/rewrite/ber/src/test/org/apache/asn1/= ber/LengthTest.java Tue Mar 1 16:30:30 2005 @@ -237,4 +237,48 @@ =20 assertEquals( 1, length.getLength() ); } + + /** + * Test that a Length could not begin with a 0xFF byte, which is + * reserved for future extensions. + * + */ + public void testRestrictedValueForFutureExtension()=20 + { + Length length =3D new Length(); + + try + { + length.add( (byte) 0xFF ) ; + length.add( (byte) 0x01 ) ; + fail( "should fail before we get here" ) ; + } + catch ( DecoderException t ) + { + assertNotNull( t ) ; + } + } + + /** + * Test that an indefinite Length form is rejected.=20 + * + */ + public void testIndefiniteLength()=20 + { + Length length =3D new Length(); + + try + { + length.add( (byte) 0x80 ) ; + length.add( (byte) 0x01 ) ; + length.add( (byte) 0x00 ) ; + length.add( (byte) 0x00 ) ; + fail( "should fail before we get here" ) ; + } + catch ( Throwable t ) + { + assertNotNull( t ) ; + } + } } + From directory-cvs-return-danielmartin@example.com Wed Mar 02 01:35:49 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 31655 invoked from network); 2 Mar 2005 01:35:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 01:35:49 -0000 Received: (qmail 47504 invoked by uid 500); 2 Mar 2005 01:35:49 -0000 Delivered-To: danielmartin@example.com Received: (qmail 47470 invoked by uid 500); 2 Mar 2005 01:35:48 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 47457 invoked by uid 99); 2 Mar 2005 01:35:48 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 17:35:48 -0800 Received: (qmail 31627 invoked by uid 65534); 2 Mar 2005 01:35:47 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 01:35:47 -0000 Subject: svn commit: r155853 - incubator/directory/sitedocs/trunk/project.xml To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Tue Mar 1 17:35:46 2005 New Revision: 155853 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155853 Log: setting list info which does not seem to render Modified: incubator/directory/sitedocs/trunk/project.xml Modified: incubator/directory/sitedocs/trunk/project.xml URL: http://svn.apache.org/viewcvs/incubator/directory/sitedocs/trunk/proje= ct.xml?view=3Ddiff&r1=3D155852&r2=3D155853 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/sitedocs/trunk/project.xml (original) +++ incubator/directory/sitedocs/trunk/project.xml Tue Mar 1 17:35:46 2005 @@ -3,18 +3,18 @@ <pomVersion>3</pomVersion> <groupId>directory</groupId> <id>directory-sitedocs</id> - <name>The Apache Directory Project</name> - =20 + <name>Apache Directory</name> + <organization> - <name>The Apache Incubator</name> - <url>http://incubator.apache.org</url> - <logo>/images/apache-incubator-logo.png</logo> + <name>Apache Software Foundation</name> + <url>http://directory.apache.org</url> + <logo>/images/apache-logo.png</logo> </organization> =20 <inceptionYear>2003</inceptionYear> <package>org.apache.directory.sitedocs</package> <logo>/images/apache-directory-logo.png</logo> - <url>http://incubator.apache.org/directory</url> + <url>http://directory.apache.org</url> =20 <issueTrackingUrl> http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=3D10400 @@ -22,10 +22,10 @@ =20 <siteAddress>minotaur.apache.org</siteAddress> <siteDirectory> - /www/incubator.apache.org/directory + /www/directory.apache.org </siteDirectory> <distributionDirectory> - /www/cvs.apache.org/dist/incubator/directory + /www/cvs.apache.org/dist/directory </distributionDirectory> =20 =20 @@ -39,22 +39,55 @@ <mailingList> <name>Directory Developer List</name> <subscribe> - danielmartin@example.com + danielmartin@example.com + </subscribe> + <unsubscribe> + danielmartin@example.com + </unsubscribe> + <archive> + http://nagoya.apache.org/eyebrowse/SummarizeList?listId=3D181 + </archive> + </mailingList> + <mailingList> + <name>Directory User List</name> + <subscribe> + danielmartin@example.com + </subscribe> + <unsubscribe> + danielmartin@example.com + </unsubscribe> + <archive> + http://nagoya.apache.org/eyebrowse/SummarizeList?listId=3D181 + </archive> + </mailingList> + <mailingList> + <name>Directory SCM List</name> + <subscribe> + danielmartin@example.com </subscribe> <unsubscribe> - danielmartin@example.com + danielmartin@example.com </unsubscribe> <archive> http://nagoya.apache.org/eyebrowse/SummarizeList?listId=3D181 </archive> </mailingList> + <mailingList> + <name>Directory PMC List</name> + <subscribe> + danielmartin@example.com + </subscribe> + <unsubscribe> + danielmartin@example.com + </unsubscribe> + </mailingList> </mailingLists> =20 <developers/> =20 <licenses> <license> - <name>Apache 1.1 License</name> + <name>Apache 2.0 License</name> <url> http://cvs.apache.org/viewcvs.cgi/incubator/directory/LICENSE.txt?rev=3D13= 69&amp;root=3DApache-SVN&amp;view=3Dmarkup </url> From directory-cvs-return-danielmartin@example.com Wed Mar 02 03:29:47 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 92953 invoked from network); 2 Mar 2005 03:29:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 03:29:46 -0000 Received: (qmail 4894 invoked by uid 500); 2 Mar 2005 03:29:45 -0000 Delivered-To: danielmartin@example.com Received: (qmail 4853 invoked by uid 500); 2 Mar 2005 03:29:45 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 4838 invoked by uid 99); 2 Mar 2005 03:29:45 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Mar 2005 19:29:45 -0800 Received: (qmail 92920 invoked by uid 65534); 2 Mar 2005 03:29:43 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 03:29:43 -0000 Subject: svn commit: r155862 - in incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server: ContextPartitionConfig.java jndi/EnvKeys.java jndi/PartitionConfigBuilder.java jndi/ServerContextFactory.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Tue Mar 1 19:29:42 2005 New Revision: 155862 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155862 Log: changes ... o applying Endi's changes from the partition.patch file present here http://issues.apache.org/jira/secure/attachment/19058/partition.patch o adds extra optional options to the partition configuration and env props NOTE - Endi please update the environment property documentation This feature enables different context partition implementations to be used with the server. More info about the feature is available here even though this is only half the JIRA: http://issues.apache.org/jira/browse/DIREVE-141 Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/ContextPartitionConfig.java incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/EnvKeys.java incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/PartitionConfigBuilder.java incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/ContextPartitionConfig.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/ContextPartitionConfig.java?view=3Ddif= f&r1=3D155861&r2=3D155862 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/ContextPartitionConfig.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/ContextPartitionConfig.java Tue Mar 1 19:29:42 2005 @@ -32,6 +32,8 @@ private String id; private String[] indices; private Attributes attributes; + private String partitionClass; + private String properties; =20 =20 public String getSuffix() @@ -79,5 +81,25 @@ public void setAttributes( Attributes attributes ) { this.attributes =3D attributes; + } + + public String getPartitionClass() + { + return partitionClass; + } + + public void setPartitionClass(String partitionClass) + { + this.partitionClass =3D partitionClass; + } + + public String getProperties() + { + return properties; + } + + public void setProperties(String properties) + { + this.properties =3D properties; } } Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/jndi/EnvKeys.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/jndi/EnvKeys.java?view=3Ddiff&r1=3D155= 861&r2=3D155862 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/EnvKeys.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/EnvKeys.java Tue Mar 1 19:29:42 2005 @@ -68,6 +68,10 @@ public static final String PARTITIONS =3D "server.db.partitions"; /** the envprop key base to the suffix of a partition */ public static final String SUFFIX =3D "server.db.partition.suffix."; + /** the envprop key base to the implementation of a partition */ + public static final String PARTITION_CLASS =3D "server.db.partition.cl= ass."; + /** the envprop key base to the properties of a partition */ + public static final String PROPERTIES =3D "server.db.partition.propert= ies."; /** the envprop key base to the space separated list of indices for a = partition */ public static final String INDICES =3D "server.db.partition.indices."; /** the envprop key base to the Attributes for the context nexus entry= */ Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/jndi/PartitionConfigBuilder.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/jndi/PartitionConfigBuilder.java?view= =3Ddiff&r1=3D155861&r2=3D155862 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/PartitionConfigBuilder.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/PartitionConfigBuilder.java Tue Mar 1 19:29:42 2005 @@ -76,6 +76,32 @@ config.setSuffix( suffix ); =20 // ---------------------------------------------------------------= ----- + // set partition class + // ---------------------------------------------------------------= ----- + + buf.setLength( 0 ); + buf.append( EnvKeys.PARTITION_CLASS ).append( id ); + String partitionClass =3D ( String ) env.get( buf.toString() ); + + if ( partitionClass !=3D null ) + { + config.setPartitionClass( partitionClass ); + } + + // ---------------------------------------------------------------= ----- + // set partition properties + // ---------------------------------------------------------------= ----- + + buf.setLength( 0 ); + buf.append( EnvKeys.PROPERTIES ).append( id ); + String properties =3D ( String ) env.get( buf.toString() ); + + if ( properties !=3D null ) + { + config.setProperties( properties ); + } + + // ---------------------------------------------------------------= ----- // extract index list and set the list of indices in config // ---------------------------------------------------------------= ----- =20 Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/jndi/ServerContextFactory.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?view=3D= diff&r1=3D155861&r2=3D155862 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java Tue Mar 1 19:29:42 2005 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import java.lang.reflect.Constructor; =20 import javax.naming.Context; import javax.naming.Name; @@ -46,10 +47,7 @@ import org.apache.ldap.common.util.DateUtils; import org.apache.ldap.common.util.PropertiesUtils; import org.apache.ldap.common.util.StringTools; -import org.apache.ldap.server.ApplicationPartition; -import org.apache.ldap.server.ContextPartitionConfig; -import org.apache.ldap.server.RootNexus; -import org.apache.ldap.server.SystemPartition; +import org.apache.ldap.server.*; import org.apache.ldap.server.db.Database; import org.apache.ldap.server.db.DefaultSearchEngine; import org.apache.ldap.server.db.ExpressionEnumerator; @@ -681,8 +679,39 @@ =20 AttributeType[] indexTypes =3D ( AttributeType[] ) attributeTy= peList .toArray( new AttributeType[attributeTypeList.size()] = ); - ApplicationPartition partition =3D new ApplicationPartition( u= pSuffix, normSuffix, db, eng, indexTypes ); - nexus.register( partition ); + + String partitionClass =3D configs[ii].getPartitionClass(); + String properties =3D configs[ii].getProperties(); + ContextPartition partition =3D null; + + if ( partitionClass =3D=3D null ) + { + // If custom partition is not defined, use the Application= Partion. + partition =3D new ApplicationPartition( upSuffix, + normSuffix, db, eng, indexTypes ); + + } + else + { + // If custom partition is defined, instantiate it. + try + { + Class clazz =3D Class.forName( partitionClass ); + Constructor constructor =3D clazz.getConstructor( + new Class[] { Name.class, Name.class, String.c= lass } ); + partition =3D ( ContextPartition ) constructor.newInst= ance( + new Object[] { upSuffix, normSuffix, propertie= s } ); + } + catch ( Exception e ) + { + e.printStackTrace(); + } + } + + if ( partition !=3D null )=20 + {=20 + nexus.register( partition ); + } =20 // -----------------------------------------------------------= ----- // add the nexus context entry From directory-cvs-return-danielmartin@example.com Wed Mar 02 14:01:03 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 54939 invoked from network); 2 Mar 2005 14:01:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 14:01:03 -0000 Received: (qmail 24775 invoked by uid 500); 2 Mar 2005 14:01:02 -0000 Delivered-To: danielmartin@example.com Received: (qmail 24740 invoked by uid 500); 2 Mar 2005 14:01:02 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 24727 invoked by uid 99); 2 Mar 2005 14:01:02 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Mar 2005 06:01:00 -0800 Received: (qmail 54860 invoked by uid 65534); 2 Mar 2005 14:00:59 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 14:00:59 -0000 Subject: svn commit: r155918 - incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/AvailablePortFinder.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: trustin Date: Wed Mar 2 06:00:57 2005 New Revision: 155918 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155918 Log: Copied AvailablePortFinder from APSEDA Added: incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/Av= ailablePortFinder.java (contents, props changed) - copied, changed from r155914, incubator/directory/network/apseda/tr= unk/src/java/org/apache/apseda/listener/AvailablePortFinder.java Copied: incubator/directory/network/mina/trunk/src/java/org/apache/mina/uti= l/AvailablePortFinder.java (from r155914, incubator/directory/network/apsed= a/trunk/src/java/org/apache/apseda/listener/AvailablePortFinder.java) URL: http://svn.apache.org/viewcvs/incubator/directory/network/mina/trunk/s= rc/java/org/apache/mina/util/AvailablePortFinder.java?view=3Ddiff&rev=3D155= 918&p1=3Dincubator/directory/network/apseda/trunk/src/java/org/apache/apsed= a/listener/AvailablePortFinder.java&r1=3D155914&p2=3Dincubator/directory/ne= twork/mina/trunk/src/java/org/apache/mina/util/AvailablePortFinder.java&r2= =3D155918 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/network/apseda/trunk/src/java/org/apache/apseda/lis= tener/AvailablePortFinder.java (original) +++ incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/Av= ailablePortFinder.java Wed Mar 2 06:00:57 2005 @@ -1,4 +1,6 @@ /* + * @(#) $Id$ + *=20 * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +17,7 @@ * */ =20 -package org.apache.apseda.listener; +package org.apache.mina.util; =20 import java.io.IOException; import java.net.DatagramSocket; @@ -28,8 +30,7 @@ /** * Finds currently available server ports. * - * @author Trustin Lee - * @author <a href=3D"mailto:danielmartin@example.com">Apache Di= rectory Project</a> + * @author The Apache Directory Project * @version $Rev$ * @see <a href=3D"http://www.iana.org/assignments/port-numbers">IANA.org<= /a> */ @@ -48,7 +49,7 @@ /** * Creates a new instance. */ - public AvailablePortFinder() + private AvailablePortFinder() { } =20 @@ -59,7 +60,7 @@ * * WARNING: this can take a very long time. */ - public Set getAvailablePorts() + public static Set getAvailablePorts() { return getAvailablePorts(MIN_PORT_NUMBER, MAX_PORT_NUMBER); } @@ -172,7 +173,7 @@ * {@link #MIN_PORT_NUMBER} and {@link #MAX_PORT_NUMBER} or * <code>fromPort</code> if greater than <code>toPort</code>. */ - public Set getAvailablePorts(int fromPort, int toPort) + public static Set getAvailablePorts(int fromPort, int toPort) { if ( (fromPort < MIN_PORT_NUMBER) || (toPort > MAX_PORT_NUMBER) Propchange: incubator/directory/network/mina/trunk/src/java/org/apache/mina= /util/AvailablePortFinder.java ---------------------------------------------------------------------------= --- svn:executable =3D * Propchange: incubator/directory/network/mina/trunk/src/java/org/apache/mina= /util/AvailablePortFinder.java ---------------------------------------------------------------------------= --- svn:keywords =3D HeadURL Id LastChangedBy LastChangedDate LastChangedRe= vision From directory-cvs-return-danielmartin@example.com Wed Mar 02 14:07:56 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 59858 invoked from network); 2 Mar 2005 14:07:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 14:07:55 -0000 Received: (qmail 43589 invoked by uid 500); 2 Mar 2005 14:07:53 -0000 Delivered-To: danielmartin@example.com Received: (qmail 43509 invoked by uid 500); 2 Mar 2005 14:07:53 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 43361 invoked by uid 99); 2 Mar 2005 14:07:52 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Mar 2005 06:07:51 -0800 Received: (qmail 59686 invoked by uid 65534); 2 Mar 2005 14:07:49 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 14:07:49 -0000 Subject: svn commit: r155921 - in incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server: db/jdbm/JdbmDatabase.java jndi/ServerContextFactory.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Wed Mar 2 06:07:47 2005 New Revision: 155921 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155921 Log: committing endi partion patch Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/db/jdbm/JdbmDatabase.java incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/db/jdbm/JdbmDatabase.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java?view=3Ddiff&= r1=3D155920&r2=3D155921 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/db/jdbm/JdbmDatabase.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/db/jdbm/JdbmDatabase.java Wed Mar 2 06:07:47 2005 @@ -58,8 +58,10 @@ { /** the JDBM record manager used by this database */ private final RecordManager recMan; - /** the suffix of this backend database */ - private final Name suffix; + /** the user provided suffix of this backend database */ + private final Name upSuffix; + /** the normalized suffix of this backend database */ + private final Name normSuffix; /** the working directory to use for files */ private final String wkdir; /** the master table storing entries by primary key */ @@ -96,14 +98,16 @@ /** * Creates a Databased based on JDBM B+Trees. * - * @param suffix the user provided suffix name=20 + * @param upSuffix the user provided suffix name + * @param normSuffix the normalized suffix name * @param wkdirPath the path to the working directory where the db res= ides * @throws NamingException if db cannot be created */ - public JdbmDatabase ( final Name suffix, final String wkdirPath ) + public JdbmDatabase ( final Name upSuffix, final Name normSuffix, fina= l String wkdirPath ) throws NamingException { - this.suffix =3D suffix; + this.upSuffix =3D upSuffix; + this.normSuffix =3D normSuffix; this.wkdir =3D wkdirPath; =20 try=20 @@ -495,14 +499,14 @@ * make all other aliases to the target inconsistent. *=20 * We need to walk up the path of alias ancestors until we reach t= he=20 - * suffix, deleting each ( ancestorId, targetId ) tuple in the=20 + * upSuffix, deleting each ( ancestorId, targetId ) tuple in the * subtree scope alias. We only need to do this for the direct pa= rent * of the alias on the one level subtree. */ oneAliasIdx.drop( ancestorId, targetId ); subAliasIdx.drop( ancestorId, targetId ); =20 - while ( ! ancestorDn.equals( suffix ) ) + while ( ! ancestorDn.equals( upSuffix ) ) { ancestorDn =3D ancestorDn.getSuffix( 1 ); ancestorId =3D getEntryId( ancestorDn.toString() ); @@ -568,13 +572,13 @@ * id may be null but the alias may be to a valid entry in=20 * another namingContext. Such aliases are not allowed and we * need to point it out to the user instead of saying the target - * does not exist when it potentially could outside of this suffix. + * does not exist when it potentially could outside of this upSuff= ix. */ - if ( ! targetDn.startsWith( suffix ) ) + if ( ! targetDn.startsWith( upSuffix ) ) { // Complain specifically about aliases to outside naming conte= xts throw new NamingException( "[36] aliasDereferencingProblem -" - + " the alias points to an entry outside of the " + suffix + + " the alias points to an entry outside of the " + upSuff= ix + " namingContext to an object whose existance cannot be" + " determined." ); } @@ -636,14 +640,14 @@ /* * Handle Sub Level Scope Alias Index *=20 - * Walk the list of relatives from the parents up to the suffix, t= esting + * Walk the list of relatives from the parents up to the upSuffix,= testing * to see if the alias' target is a descendant of the relative. I= f the * alias target is not a descentant of the relative it extends the= scope - * and is added to the sub tree scope alias index. The suffix nod= e is + * and is added to the sub tree scope alias index. The upSuffix n= ode is * ignored since everything is under its scope. The first loop=20 * iteration shall handle the parents. */ - while ( ! ancestorDn.equals( suffix ) && null !=3D ancestorId ) + while ( ! ancestorDn.equals( upSuffix ) && null !=3D ancestorId ) { if ( ! NamespaceTools.isDescendant( ancestorDn, targetDn ) ) { @@ -672,7 +676,7 @@ // entry sequences start at 1. // =20 - if ( dn.equals( suffix ) ) + if ( dn.equals( normSuffix ) ) { parentId =3D BigInteger.ZERO; } @@ -760,7 +764,7 @@ updnIdx.drop( id ); heirarchyIdx.drop( id ); =20 - // Remove parent's reference to entry only if entry is not the suf= fix =20 + // Remove parent's reference to entry only if entry is not the upS= uffix if ( ! parentId.equals( BigInteger.ZERO ) ) { heirarchyIdx.drop( parentId, id ); @@ -811,7 +815,7 @@ */ public Name getSuffix() { - return suffix; + return upSuffix; } =20 =20 @@ -820,7 +824,7 @@ */ public Attributes getSuffixEntry() throws NamingException { - BigInteger id =3D getEntryId( suffix.toString() ); + BigInteger id =3D getEntryId( upSuffix.toString() ); =20 if ( null =3D=3D id ) { @@ -1637,7 +1641,7 @@ * make all other aliases to the target inconsistent. *=20 * We need to walk up the path of alias ancestors right above the = moved=20 - * base until we reach the suffix, deleting each ( ancestorId,=20 + * base until we reach the upSuffix, deleting each ( ancestorId, * targetId ) tuple in the subtree scope alias. We only need to d= o=20 * this for the direct parent of the alias on the one level subtre= e if * the moved base is the alias. @@ -1649,7 +1653,7 @@ =20 subAliasIdx.drop( ancestorId, targetId ); =20 - while ( ! ancestorDn.equals( suffix ) ) + while ( ! ancestorDn.equals( upSuffix ) ) { ancestorDn =3D ancestorDn.getSuffix( 1 ); ancestorId =3D getEntryId( ancestorDn.toString() ); Modified: incubator/directory/apacheds/trunk/core/src/main/java/org/apache/= ldap/server/jndi/ServerContextFactory.java URL: http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/= src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?view=3D= diff&r1=3D155920&r2=3D155921 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java (original) +++ incubator/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/s= erver/jndi/ServerContextFactory.java Wed Mar 2 06:07:47 2005 @@ -447,7 +447,7 @@ =20 LdapName suffix =3D new LdapName(); suffix.add( SystemPartition.SUFFIX ); - Database db =3D new JdbmDatabase( suffix, wkdir ); + Database db =3D new JdbmDatabase( suffix, suffix, wkdir ); =20 AttributeTypeRegistry attributeTypeRegistry; attributeTypeRegistry =3D bootstrapRegistries @@ -628,7 +628,7 @@ .getNormalizer(); Name normSuffix =3D new LdapName( ( String ) dnNorm .normalize( configs[ii].getSuffix() ) ); - Database db =3D new JdbmDatabase( upSuffix, wkdir ); + Database db =3D new JdbmDatabase( upSuffix, normSuffix, wkdir = ); =20 // -----------------------------------------------------------= ----- // create the search engine using db, enumerators and evaluato= rs From directory-cvs-return-danielmartin@example.com Wed Mar 02 14:23:52 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 84137 invoked from network); 2 Mar 2005 14:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 14:23:51 -0000 Received: (qmail 86857 invoked by uid 500); 2 Mar 2005 14:23:47 -0000 Delivered-To: danielmartin@example.com Received: (qmail 86779 invoked by uid 500); 2 Mar 2005 14:23:46 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 86736 invoked by uid 99); 2 Mar 2005 14:23:46 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Mar 2005 06:23:45 -0800 Received: (qmail 84052 invoked by uid 65534); 2 Mar 2005 14:23:44 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 14:23:44 -0000 Subject: svn commit: r155923 - in incubator/directory/network/mina/trunk/src: java/org/apache/mina/io/datagram/DatagramAcceptor.java java/org/apache/mina/io/socket/SocketAcceptor.java java/org/apache/mina/util/AvailablePortFinder.java test/org/apache/mina/examples/echoserver/Test.java To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: trustin Date: Wed Mar 2 06:23:42 2005 New Revision: 155923 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155923 Log: Fixed DIRMINA-9: Add AvaliablePortFinder from apseda to scan for ports. Fixed: SocketAcceptor and DatagramAcceptor cannot bind to port 0. It seems= that open server socket channel is closed just before it is registered to = the selector. So I made acceptors to throw IllegalArgumentException if the= port number is 0. Modified: incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/data= gram/DatagramAcceptor.java incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/sock= et/SocketAcceptor.java incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/Av= ailablePortFinder.java incubator/directory/network/mina/trunk/src/test/org/apache/mina/example= s/echoserver/Test.java Modified: incubator/directory/network/mina/trunk/src/java/org/apache/mina/i= o/datagram/DatagramAcceptor.java URL: http://svn.apache.org/viewcvs/incubator/directory/network/mina/trunk/s= rc/java/org/apache/mina/io/datagram/DatagramAcceptor.java?view=3Ddiff&r1=3D= 155922&r2=3D155923 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/data= gram/DatagramAcceptor.java (original) +++ incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/data= gram/DatagramAcceptor.java Wed Mar 2 06:23:42 2005 @@ -89,6 +89,8 @@ if( !( address instanceof InetSocketAddress ) ) throw new IllegalArgumentException( "Unexpected address type: = " + address.getClass() ); + if( ( ( InetSocketAddress ) address ).getPort() =3D=3D 0 ) + throw new IllegalArgumentException( "Unsupported port number: = 0" ); =20 DatagramChannel ch =3D DatagramChannel.open(); boolean bound =3D false; Modified: incubator/directory/network/mina/trunk/src/java/org/apache/mina/i= o/socket/SocketAcceptor.java URL: http://svn.apache.org/viewcvs/incubator/directory/network/mina/trunk/s= rc/java/org/apache/mina/io/socket/SocketAcceptor.java?view=3Ddiff&r1=3D1559= 22&r2=3D155923 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/sock= et/SocketAcceptor.java (original) +++ incubator/directory/network/mina/trunk/src/java/org/apache/mina/io/sock= et/SocketAcceptor.java Wed Mar 2 06:23:42 2005 @@ -99,6 +99,8 @@ if( !( address instanceof InetSocketAddress ) ) throw new IllegalArgumentException( "Unexpected address type: = " + address.getClass() ); + if( ( ( InetSocketAddress ) address ).getPort() =3D=3D 0 ) + throw new IllegalArgumentException( "Unsupported port number: = 0" ); =20 ServerSocketChannel ssc =3D ServerSocketChannel.open(); boolean bound =3D false; Modified: incubator/directory/network/mina/trunk/src/java/org/apache/mina/u= til/AvailablePortFinder.java URL: http://svn.apache.org/viewcvs/incubator/directory/network/mina/trunk/s= rc/java/org/apache/mina/util/AvailablePortFinder.java?view=3Ddiff&r1=3D1559= 22&r2=3D155923 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/Av= ailablePortFinder.java (original) +++ incubator/directory/network/mina/trunk/src/java/org/apache/mina/util/Av= ailablePortFinder.java Wed Mar 2 06:23:42 2005 @@ -39,7 +39,7 @@ /** * The minimum number of server port number. */ - public static final int MIN_PORT_NUMBER =3D 0; + public static final int MIN_PORT_NUMBER =3D 1; =20 /** * The maximum number of server port number. Modified: incubator/directory/network/mina/trunk/src/test/org/apache/mina/e= xamples/echoserver/Test.java URL: http://svn.apache.org/viewcvs/incubator/directory/network/mina/trunk/s= rc/test/org/apache/mina/examples/echoserver/Test.java?view=3Ddiff&r1=3D1559= 22&r2=3D155923 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/network/mina/trunk/src/test/org/apache/mina/example= s/echoserver/Test.java (original) +++ incubator/directory/network/mina/trunk/src/test/org/apache/mina/example= s/echoserver/Test.java Wed Mar 2 06:23:42 2005 @@ -57,7 +57,11 @@ // Find an availble test port and bind to it. boolean socketBound =3D false; boolean datagramBound =3D false; - for( port =3D 1024; port <=3D 65535; port ++ ) + =20 + // Let's start from port #1 to detect possible resource leak + // because test will fail in port 1-1023 if user run this test + // as a normal user. + for( port =3D 1; port <=3D 65535; port ++ ) { socketBound =3D false; datagramBound =3D false; From directory-cvs-return-danielmartin@example.com Wed Mar 02 15:14:51 2005 Return-Path: <directory-cvs-return-danielmartin@example.com> Delivered-To: danielmartin@example.com Received: (qmail 16681 invoked from network); 2 Mar 2005 15:14:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 15:14:51 -0000 Received: (qmail 12720 invoked by uid 500); 2 Mar 2005 15:14:50 -0000 Delivered-To: danielmartin@example.com Received: (qmail 12678 invoked by uid 500); 2 Mar 2005 15:14:50 -0000 Mailing-List: contact danielmartin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:danielmartin@example.com> List-Unsubscribe: <mailto:danielmartin@example.com> List-Post: <mailto:danielmartin@example.com> List-Id: <directory-cvs.incubator.apache.org> Reply-To: danielmartin@example.com Delivered-To: mailing list danielmartin@example.com Received: (qmail 12664 invoked by uid 99); 2 Mar 2005 15:14:50 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Mar 2005 07:14:49 -0800 Received: (qmail 16621 invoked by uid 65534); 2 Mar 2005 15:14:48 -0000 Message-ID: <danielmartin@example.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 02 Mar 2005 15:14:47 -0000 Subject: svn commit: r155926 [2/2] - in incubator/directory/asn1/trunk: ber/src/java/org/apache/asn1/ber/ ber/src/java/org/apache/asn1/ber/digester/rules/ ber/src/test/org/apache/asn1/ber/ ber/src/test/org/apache/asn1/ber/digester/rules/ ber/xdocs/ codec/src/java/org/apache/asn1/codec/stateful/ xdocs/ To: danielmartin@example.com From: danielmartin@example.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Modified: incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/D= efaultMutableTupleNodeTest.java URL: http://svn.apache.org/viewcvs/incubator/directory/asn1/trunk/ber/src/t= est/org/apache/asn1/ber/DefaultMutableTupleNodeTest.java?view=3Ddiff&r1=3D1= 55925&r2=3D155926 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/Default= MutableTupleNodeTest.java (original) +++ incubator/directory/asn1/trunk/ber/src/test/org/apache/asn1/ber/Default= MutableTupleNodeTest.java Wed Mar 2 07:14:39 2005 @@ -1,5 +1,5 @@ /* - * Copyright 2004 The Apache Software Foundation + * Copyright 2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ { public DefaultMutableTupleNodeTest() { - super ( DefaultMutableTupleNodeTest.class.getName() ) ;=20 + super ( DefaultMutableTupleNodeTest.class.getName() ) ; } =20 =20 @@ -85,7 +85,7 @@ DefaultMutableTupleNode node =3D new DefaultMutableTupleNode() ; parent.insert( (MutableTupleNode) node, 0 ) ; node.setParent( (MutableTupleNode) parent) ; - =20 + assertEquals(1,parent.getChildCount()) ; node.removeFromParent() ; assertEquals(0,parent.getChildCount()) ; @@ -147,7 +147,7 @@ assertTrue( parent.getChildren().hasNext()) ; } =20 - =20 + public void testGetChildTupleNodeAt() { } @@ -175,13 +175,13 @@ DefaultMutableTupleNode node =3D new DefaultMutableTupleNode() ; parent.insert( (MutableTupleNode) node, 0 ) ; node.setParent( (MutableTupleNode) parent) ; - =20 + Tuple primitive =3D new Tuple( 1, 3, true, TypeClass.APPLICATION )= ; Tuple constructed =3D new Tuple ( 2, TypeClass.APPLICATION ) ; parent.setTuple( constructed ) ; node.setTuple( primitive ) ; - =20 - // fact that we use the indefinate form we automatically add two to + + // fact that we use the indefinite form we automatically add two to // the contained size assertEquals(9, parent.size()) ; } @@ -192,12 +192,12 @@ DefaultMutableTupleNode node =3D new DefaultMutableTupleNode() ; parent.insert( (MutableTupleNode) node, 0 ) ; node.setParent( (MutableTupleNode) parent) ; - =20 + Tuple primitive =3D new Tuple( 1, 3, true, TypeClass.APPLICATION )= ; Tuple constructed =3D new Tuple ( 2, 5, TypeClass.APPLICATION ) ; parent.setTuple( constructed ) ; node.setTuple( primitive ) ; - =20 + assertEquals(7, parent.size()) ; } =20 @@ -206,7 +206,7 @@ DefaultMutableTupleNode parent =3D new DefaultMutableTupleNode() ; Tuple constructed =3D new Tuple ( 2, TypeClass.APPLICATION ) ; parent.setTuple( constructed ) ; - =20 + assertEquals(4, parent.size()) ; } =20 @@ -219,7 +219,7 @@ ByteBuffer buf =3D ByteBuffer.allocate( 4 ) ; parent.encode( buf ) ; =20 - =20 + /* final ArrayList list =3D new ArrayList() ; TupleTreeDecoder decoder =3D new TupleTreeDecoder() ; @@ -228,10 +228,10 @@ { list.add( arg1 ) ; }}) ; - =20 + decoder.decode(buf.flip()) ; - DefaultMutableTupleNode decoded =3D ( DefaultMutableTupleNode )=20 - list.get(0);=20 + DefaultMutableTupleNode decoded =3D (
{'source': 'Apache Software Foundation Public Mail Archives'}