Issue Details (XML | Word | Printable)

Key: DIR-112
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Alex Karasulu
Reporter: Jacob S. Barrett
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory

The implementation of LdapName#getSuffix(int) does not match that of Java 1.5's LDAP.

Created: 15/Jun/05 12:58 AM   Updated: 06/May/09 03:56 PM
Return to search
Component/s: miscellaneous
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works name-prefix-suffix.patch 2005-06-15 12:58 AM Jacob S. Barrett 10 kB
Java Source File Licensed for inclusion in ASF works NameTest.java 2005-09-14 07:14 AM Jacob S. Barrett 11 kB
Java Source File Licensed for inclusion in ASF works NameTest.java 2005-06-17 03:14 AM Jacob S. Barrett 10 kB
Java Source File Licensed for inclusion in ASF works NameTest.java 2005-06-15 01:00 AM Jacob S. Barrett 7 kB

Resolution Date: 14/Sep/05 08:25 AM


 Description  « Hide
The attached patch fixes the LdapName#getSuffix(int) method to match the one on Java 1.5. The current getSuffix returns a prefix of sorts, but not exactly that of getPrefix. This patch also contains fixes for all (hopefully) places where getSuffix(int) was called. It also corrects the JUnit test. I have also attached a JUnit test that must be compiled and run under Java 1.5 to make sure the naming classes behave the same as Java 1.5's version.

This patch does NOT change the ContextPartion's concet of suffix even though it is really a prefix. So it is called a suffix still, but it is really the prefix.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jacob S. Barrett added a comment - 15/Jun/05 12:58 AM
Patch to correct getSuffix.

Jacob S. Barrett added a comment - 15/Jun/05 01:00 AM
Tests Apaching's LdapName against Sun's LdapName for consitency. Depends on Java 1.5.

Jacob S. Barrett added a comment - 15/Jun/05 01:02 AM

Alex Karasulu added a comment - 16/Jun/05 03:11 PM
Sorry can't apply this (really want to though) because it binds us to 1.5 with the test case. All users will have to run builds using the 1.5 jdk. Can you generate the results of using the JDK 1.5 LdapName and use them (generated values) as String based expected values? This way there is no 1.5 dependency and the compilations will work for everyone ;).

Jacob S. Barrett added a comment - 17/Jun/05 03:14 AM
This one replaces the 1.5 results with strings.

Jacob S. Barrett added a comment - 14/Sep/05 07:14 AM
Replaces all other versions of this file. Checks against the com.sun.jndi.ldap.LdapName class in Java 1.4.

Trustin Lee added a comment - 14/Sep/05 08:20 PM
Alex, does your fix include changes in ContextPartition.getSuffix( boolean )? It should be reopen if it doesn't.