commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Sawle (JIRA)" <>
Subject [jira] [Issue Comment Deleted] (LANG-1050) Change nullToEmpty methods to generics
Date Mon, 08 Dec 2014 08:31:13 GMT


James Sawle updated LANG-1050:
    Comment: was deleted

(was: Sorry for the delay to the response. The change I was referring to was the change not
to use Validate.notNull. On a previous fix, I was told it would be changed during the merge.
I can make the change today or tomorrow if needed to try and make the weekend deadline for

> Change nullToEmpty methods to generics
> --------------------------------------
>                 Key: LANG-1050
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: James Sawle
>            Assignee: Duncan Jones
>             Fix For: Review Patch
> Currently there are multiple Object based methods which could be replaced by a single
generic method.
> - public static Long[] nullToEmpty(final Long[] array)
> - public static Integer[] nullToEmpty(final Integer[] array)
> - public static Short[] nullToEmpty(final Short[] array)
> - public static Character[] nullToEmpty(final Character[] array)
> - public static Byte[] nullToEmpty(final Byte[] array)
> - public static Double[] nullToEmpty(final Double[] array)
> - public static Float[] nullToEmpty(final Float[] array)
> - public static Boolean[] nullToEmpty(final Boolean[] array)
> Recommendation, replace all of these with a single method that would also allow a defensive
programming style when not using wrapped primitives.
> - public static <T> T[] nullToEmpty(final T[] array)

This message was sent by Atlassian JIRA

View raw message