Commons Lang
  1. Commons Lang
  2. LANG-267

Support char array converters on ArrayUtils

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      I don't know it the following methods have been overlooked, but they will make a fine addition to ArrayUtils:

      public static char[] toPrimitive(Character[] array)
      public static char[] toPrimitive(Character[] array, char valueForNull)
      public static Object[] toObject(char[] array)

      1. commons-lang_ArrayUtils-with-test.patch
        6 kB
        Andres Almiray
      2. commons-lang_ArrayUtils.patch
        3 kB
        Andres Almiray
      3. ArrayUtils.txt
        3 kB
        Andres Almiray

        Activity

        Andres Almiray created issue -
        Hide
        Andres Almiray added a comment -

        Implementation based on similar methods

        Show
        Andres Almiray added a comment - Implementation based on similar methods
        Andres Almiray made changes -
        Field Original Value New Value
        Attachment ArrayUtils.txt [ 12336295 ]
        Hide
        Henri Yandell added a comment -

        They seem like fine additions. Patches definitely welcomed (then I can push it in to the 2.2 release).

        Show
        Henri Yandell added a comment - They seem like fine additions. Patches definitely welcomed (then I can push it in to the 2.2 release).
        Henri Yandell made changes -
        Fix Version/s 2.3 [ 12311948 ]
        Hide
        Andres Almiray added a comment -

        Here is the code in patch format

        Show
        Andres Almiray added a comment - Here is the code in patch format
        Andres Almiray made changes -
        Attachment commons-lang_ArrayUtils.patch [ 12336337 ]
        Hide
        Henri Yandell added a comment -

        Ugh - sorry for not noticing you'd already attached the ArrayUtils.txt, Andres.

        Do you have any time to write a unit test for each method?

        Show
        Henri Yandell added a comment - Ugh - sorry for not noticing you'd already attached the ArrayUtils.txt, Andres. Do you have any time to write a unit test for each method?
        Hide
        Andres Almiray added a comment -

        Yes, of course. I'm terribly sorry for forgetting the test, I left it behind =)

        Show
        Andres Almiray added a comment - Yes, of course. I'm terribly sorry for forgetting the test, I left it behind =)
        Andres Almiray made changes -
        Attachment commons-lang_ArrayUtils-with-test.patch [ 12336341 ]
        Hide
        Henri Yandell added a comment -

        Resolved in time for 2.2:

        svn ci -m "Adding the missing char/Character methods in ArrayUtils, as pointed out (and pat
        ched) by Andres Almiray in LANG-267" src/java/org/apache/commons/lang/ArrayUtils.java src/test/org/apache/commons/lang/ArrayUtilsTest.java
        Sending src/java/org/apache/commons/lang/ArrayUtils.java
        Sending src/test/org/apache/commons/lang/ArrayUtilsTest.java
        Transmitting file data ..
        Committed revision 419122.

        Show
        Henri Yandell added a comment - Resolved in time for 2.2: svn ci -m "Adding the missing char/Character methods in ArrayUtils, as pointed out (and pat ched) by Andres Almiray in LANG-267 " src/java/org/apache/commons/lang/ArrayUtils.java src/test/org/apache/commons/lang/ArrayUtilsTest.java Sending src/java/org/apache/commons/lang/ArrayUtils.java Sending src/test/org/apache/commons/lang/ArrayUtilsTest.java Transmitting file data .. Committed revision 419122.
        Henri Yandell made changes -
        Fix Version/s 2.2 [ 12311702 ]
        Fix Version/s 2.3 [ 12311948 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        ggregory@seagullsw.com added a comment -

        Is [lang] the right project for this instead of [primitives]? Where do we draw the line between [primitives] and [lang]?

        Show
        ggregory@seagullsw.com added a comment - Is [lang] the right project for this instead of [primitives] ? Where do we draw the line between [primitives] and [lang] ?
        Hide
        Stephen Colebourne added a comment -

        [lang] is the correct location, as [primitives] is solely about priimtive implementations of collections

        Show
        Stephen Colebourne added a comment - [lang] is the correct location, as [primitives] is solely about priimtive implementations of collections
        Henri Yandell made changes -
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12374797 ] Default workflow, editable Closed status [ 12602147 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 3h 22m 1 Henri Yandell 05/Jul/06 07:04
        Resolved Resolved Closed Closed
        216d 16h 43m 1 Henri Yandell 06/Feb/07 23:47

          People

          • Assignee:
            Unassigned
            Reporter:
            Andres Almiray
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development