Issue Details (XML | Word | Printable)

Key: DIRSERVER-40
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Emmanuel Lecharny
Reporter: Ersin Er
Votes: 0
Watchers: 0
Operations

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

StringUtils methods' names and javadocs does not reflect exactly what they do

Created: 02/Dec/05 02:47 AM   Updated: 07/Feb/06 01:29 PM
Return to search
Component/s: asn1
Affects Version/s: pre-1.0
Fix Version/s: pre-1.0

Time Tracking:
Not Specified

Resolution Date: 03/Dec/05 09:13 PM


 Description  « Hide
There are to conversion methods in StringUtils class for String <-> UTF-8 transformation.

Here is the first one:

/**
  * Return an UTF-8 encoded String
  * @param bytes The byte array to be transformed to a String
  * @return A String.
  */
public static String toUtf8( byte[] bytes )
{
   ...

It name should be changed to something like fromUtf8 or Utf8ToString and the definition in javadoc may be "Return a String converted from its UTF-8 encoded byte[] representation"

And one more method:

/**
  * Return an UTF-8 encoded String
  * @param string The string to be transformed to a byte array
  * @return The transformed byte array
*/
public static byte[] getBytesUtf8( String string )
{
   ...

This methods javadoc may be "Return UTF-8 encoded byte[] representation of a String"

(PS: Sorry for filing this trivial issue but currently I work on a branch and I do not want to cause a mess here.)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny added a comment - 03/Dec/05 09:13 PM
Fixed ! Thans a lot Ersin to pointed out this stupid method name and inacurrate javaDoc.

Trustin Lee added a comment - 19/Dec/05 03:51 PM
Why don't you close this issue if you think it is fixed now? :)

Emmanuel Lecharny added a comment - 19/Dec/05 06:15 PM
Because I can't ! It's marked as resolved, and the only worklow action possible for it is "Reopen Issue" ...

Trustin Lee added a comment - 19/Dec/05 06:25 PM
I was talking to Ersin, Emmanuel. :) Ersin is the reporter, so he's the only one who can close this issue.

Ersin Er added a comment - 19/Dec/05 09:45 PM
OK, sorry :-)